github egoist/mygo v0.3.4
MyGo 0.3.4

latest releases: v0.10.0, v0.9.2, v0.9.1...
one month ago

MyGo 0.3.4 adds system vibrancy behind native UI on Windows and fixes native UI input, repaint scheduling, tray menus, and early window resizing. It includes every change since 0.3.3.

Native UI and rendering

  • Windows native UI shows system materials. On Windows 11 22H2 and later, windows created with WindowOptions.Vibrancy can show Mica, Acrylic, and Tabbed backdrops behind transparent native UI. GPU frames use a premultiplied DirectComposition swap chain; CPU-rendered frames also preserve transparency through the compositor. If DirectComposition is unavailable, native content remains visible with an opaque fallback. (#155)
  • Views can detect effective vibrancy. ui.Context.Vibrancy() reports whether the window's material is visible on macOS and Windows, allowing views to draw a fallback background elsewhere. SetVibrancy rebuilds the view when the material changes. On Windows, text inside opaque panes retains ClearType even when the root is transparent. (#155)
  • Composed frames keep their size during resizing. Windows native UI over a material no longer appears magnified after maximizing or restoring while its larger swap-chain buffers settle. (#155)
  • Press-based selection and focus paint together. Handling Element.Pressed() rebuilds the view before painting, so the newly selected row and its focus colors appear in the same frame, including virtualized lists. Holding the pointer does not cause repeated rebuild passes, and button clicks still activate on release. (8bf0035)
  • Scheduled repaints survive unrelated events. A Painter.After frame remains due when an event, such as a pointer move, requests no frame. This prevents timed drawings from stopping; a newly requested build still replaces the scheduled repaint. (#152, fixes #149)
  • Editor commands apply queued input once. Clipboard paste no longer runs twice when Linux's clipboard read pumps GTK's event loop and draws a nested frame. The editor takes its pending input queue before applying commands. (#153)

Platform and CLI fixes

  • Linux preserves early native window resizes on Wayland. A delayed activation configure no longer restores the old buffer size after a first-frame OpenGL resize. The backend preserves the latest requested bounds and reapplies them after activation while respecting maximized, full-screen, and tiled states. Regression coverage includes growing, shrinking, successive startup requests, and later resizes. (#151)
  • macOS tray popups use AppKit's status-item menus. Tray.PopUpMenu places the menu below the status item and highlights its button while open. It safely restores the previous menu and respects callbacks that replace the menu or destroy the tray. The tray documentation now explains how to keep primary-click handling while showing a menu on right-click. (#150)
  • TypeScript config loading works with Windows runtime shims. The CLI passes its loader to Bun or Node through standard input, avoiding multiline command truncation when npm installs Bun as bun.cmd. An empty result now reports that the runtime wrote no configuration, and Windows tests exercise .cmd shims for both runtimes. (#156, fixes #154)

Examples and documentation

  • New native menu bar window example. examples/menubar-native demonstrates a frameless Quick Notes panel drawn entirely in Go: positioning beside a tray icon, hiding on outside clicks or Escape, clipboard copying, keyboard shortcuts, and preserving text, selection, and undo history while hidden. macOS runs as a menu bar app, Windows hides its taskbar button, and Linux opens the panel from its AppIndicator menu. (b6acf67)
  • The vibrancy example now uses native UI. It shows a material selector in a translucent sidebar, a toggle that slides the sidebar away, the Go call for the selected material, and a theme background when vibrancy is unavailable. Tests cover the view with and without a material. (#155)
  • Documentation is available as Markdown. The website publishes llms.txt, llms-full.txt, and individual /docs/*.md downloads, with a Markdown link on documentation pages. These build-time assets omit repository-only sections and rewrite links for use outside the website. Documentation also covers the new native window examples, vibrancy detection, press-based selection, repaint behavior, and platform fixes. (#147)

New contributors

Upgrade

go get github.com/egoist/mygo@v0.3.4

If your project pins the CLI as a Go tool:

go get -tool github.com/egoist/mygo/cmd/mygo@v0.3.4

For projects with a web frontend, update the matching packages:

bun add mygo-runtime@0.3.4
bun add -d mygo-cli@0.3.4

Update any installed @mygo-plugins/fetch, @mygo-plugins/websocket, or @mygo-plugins/sqlite packages to 0.3.4 as well. The Go module, CLI, six CLI platform packages, runtime, and official JavaScript plugins share this release version.

Full changelog: 0.3.3 → 0.3.4

Don't miss a new mygo release

NewReleases is sending notifications on new releases.