github egoist/mygo v0.7.4
MyGo 0.7.4

3 hours ago

Highlights

  • Native UI windows open fully drawn. On Windows, a native UI window stays out of sight until its first frame is ready, so it opens showing its content instead of a white flash. A window made with Hidden: true draws its first frame while hidden on Windows, macOS and Linux, so w.OnReadyToShow(w.Show) shows a splash screen or a settings window only once it's drawn. (#913, #915, reported by @Zbycn in #905)
  • Web views that scroll the native UI around them. WebViewOptions.ScrollToContainer sends the wheel and touchpad over a web view to the native scroll container it sits in, on macOS, Windows and Linux. Use it for a page shown at its full height among native views, such as an article between a native header and its comments, or a message in a mail thread. (#943, with @everpcpc)
  • Another theme for part of a window. ui.Themed(c, theme) builds its children with a theme of their own, so a dark window can hold a light document preview or a card that shows how a theme looks. (#932, requested by @Garfielk in #931)
  • An Edit menu that follows the focus. In native UI windows, Undo, Redo, Cut, Copy, Paste, Delete and Select All are enabled only when the focused content can act on them, in the menu bar, popups and their shortcuts, on macOS, Windows and Linux. A password field can't be copied from, and a read-only one can't be pasted into. (#971, @liby)
  • Arch Linux packages. mygo build writes a PKGBUILD next to each Linux archive, so makepkg -si installs the app with pacman, with its commands, desktop entry, file types and icons, as the Debian package does. (#934, requested by @xmengnet in #933)
  • Idle native UI windows on macOS use less power. An idle window no longer wakes the app over a hundred times a second: wakeups drop from about 135 to 13 a second, and CPU from 0.8% to 0.3%. (#928, @daodao97)

New

Native UI

  • ui.DecimalInput edits an exact decimal kept as a string, such as a price or an amount of money, with the same stepper as NumberInput and none of a float's rounding. It never rounds what the user types: too many decimals or a value out of range is marked as an error. (#937, requested by @CHEUKFUNGWU in #936)
  • Painter.FillRadialGradient and Element.RadialGradient draw radial gradients, for glows, spotlights, vignettes and shaded spheres. (#910, requested by @Garfielk in #907)
  • Element.IgnoreInput lets an element ignore the pointer and the keyboard while screen readers can still press it, such as a delete button that only shows on hover. (#927, requested by @Lynskylate in #926)
  • Calendar(c, &date).Browse() pages through months without choosing a day, so a calendar in a popover closes only when the user picks one. (#903, requested by @tacshi in #898)
  • Element.Scrollbars(false) hides a scroll container's bars for a carousel, a map or a panel with its own chrome. The wheel, the keyboard and assistive technology still scroll it. (#972, @chengliang4810)
  • PlaceholderColor tints an input's hint, such as a warning or a "type DELETE to confirm". CaretWidth sets the caret's width, for a block cursor in a terminal-style input, a thicker caret in a large-print theme, or none in a preview. (#969, #972, @chengliang4810)
  • DottedUnderline underlines text with dots, for links that mark hover the way browsers and editors do. (#969, @chengliang4810)
  • Context.Instant tells a view that animates a value of its own to settle it at once, in the same frames as DisableAnimations settles everything else. (#969, @chengliang4810)
  • ui.Scrollbar and Painter.Scrollbar give a view that scrolls itself, such as a custom list or canvas, the same scroll bars as a scroll container. (#949)
  • Screen readers and voice control can correct the text of an element with its own text handling (HandleInput), such as a chat composer or a terminal, as they can in a TextInput. (#967, @chengliang4810)

Markdown

  • Options.Anchor opens a document at a heading, so an in-app docs reader can open guide.md#install from a search result or reopen where its reader left off. (#969, @chengliang4810)
  • Theme.LinkWeight makes links bolder, so they read as links where color alone doesn't, as in a gray print theme or for a colorblind reader. (#969, @chengliang4810)

Dialogs, notifications and updates

  • MessageOptions.DestructiveButtons marks the buttons of a message that delete data or can't be undone, so they stand out on macOS and Linux. (#938, @liby)
  • Notification.ShowContext stops waiting for the user to answer the notification permission prompt when its context ends, such as when the app quits with the prompt still open. (#952, @chengliang4810)
  • updater.AvailableVersion() gives the version the last update check found, so a settings row or badge can say "Version 1.4 is available" even when the check finished before the UI was built. (#960, @chengliang4810)

Windows

  • WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS and WEBVIEW2_USER_DATA_FOLDER work for MyGo apps, so a test runner or an agent can reach an app's pages with --remote-debugging-port, as it can with other WebView2 apps. (#657, @echoVic)

Build and distribution

  • linux.command takes a list of names, so an app can add a short command, such as ma next to my-app. (#900, @overcat)
  • mygo build -skip-installer builds for Windows without making the installer or downloading NSIS, for apps that ship their own installer or only the update archive. Apps installed earlier keep updating. (#902, requested by @suixinex in #897)

Fixes

UI and apps

  • A grid child's percentages, such as FillWidth() and FillHeight(), are of its own cell, so a card in a two-column grid no longer covers its neighbour. (#909, reported by @Garfielk in #906)
  • A PopoverMenu on an element scrolled partly out of view opens at the pointer. (#896, reported by @tacshi in #894)
  • The scroll bars of the code editor, rich text and the terminal look like a scroll container's: they follow Theme.ScrollbarWidth and High Contrast's colors, and show while the pointer is over the view. (#944, #949)
  • Delta updates of large apps finish building. (#941, reported by @tacshi in #939)

Code editor and terminal

  • Dragging a selection past the editor's left or right edge scrolls sideways. (#735, @xingkaixin)
  • The wheel scrolls a diff with the pointer over a hunk header or an expand bar. (#935, @Zenyet)
  • A diff as high as its content, and the old side of a split diff, show a horizontal scroll bar for long lines. (#947)
  • A split diff's filler between hunks of very different lengths shows its hatching and no longer freezes scrolling. (#911, reported by @Binaryify in #904)
  • The terminal draws block sextants, so QR codes from Expo and similar tools show. (#920, @shqingda)

macOS

  • The first click on a page in a window that isn't in front reaches the page, so buttons and links no longer take two clicks after switching back to the app. (#950, reported by @oxyuan in #946)
  • On macOS 26 with several displays, a tray's flyout opens under the copy of the icon you clicked. (#942, @echoVic)
  • Escape and Cmd+. choose a message's cancel button even when it's also the default, so one-button alerts, Dialog.Error and a page's alert() close with Escape. (#938, @liby)
  • mygo build makes disk images on macOS 27. (#925, @patrickatrender)

Windows

  • Pages show the app's forced light or dark appearance from the start, without a flash of the system's. (#975)
  • A native UI window shows its background, not black, along its edges while it shrinks. (#895)
  • On Windows 10, a frameless window shows its content up to its edges, without a white line around it. (#918, reported by @Zbycn in #916)
  • On Windows 11 at high scaling, menus no longer cut off the end of their longest label. (#923, reported by @Amamiya23 in #922)
  • Pasting text copied from Notepad works with clipboard.ReadData. (#912)
  • mygo build no longer fails when a virus scanner briefly holds a file it just wrote. (#953, @chengliang4810)
  • The installer's "Create a desktop shortcut" box is in the installer's language, and apps can translate it with mygo.desktopShortcut. (#662, @echoVic)

Website

New Contributors

Full Changelog: v0.7.3...v0.7.4

Don't miss a new mygo release

NewReleases is sending notifications on new releases.