github egoist/mygo v0.9.1
MyGo 0.9.1

54 minutes ago

Changes in behavior

No breaking changes to the Go API. A few changes builds and apps may notice:

  • mygo build rejects update URLs with a query string or a fragment. Update URLs name a folder, and the CLI adds each file's name to the end, so https://example.com/app?token=x put the name in the query and shipped a feed that could not be read. Put the folder in the path instead. (#1753, @everroam)
  • fileAssociations[].mimeType must be a plain type/subtype. Parameters, line breaks and other malformed names now fail the build instead of ending up in desktop entries. Valid types, including ones with &, are written correctly. (#1241, @everroam)
  • With OnDefinition set, holding Cmd (Ctrl elsewhere) over a word in the code editor shows it as a link, as VS Code does, so users can see what Cmd+click goes to. NoDefinitionLink keeps Cmd+click without the link, and NoDefinitionClick turns both off. (#1729, @prometheusalpha)

Highlights

  • Videos of native UI. The new plugins/render turns a view into a video, for launch videos, changelog clips, animated charts and social clips, as Remotion does with React. Each frame is built from its number, drawn on the GPU by MyGo's own renderers (or the CPU where there is none), and encoded with the system's encoders into MP4, MOV or WebM, with sound; or into PNG and JPEG frames. Animate, Spring and Transition play out exactly as on screen, motion blur is one option, and render.NewPlayer previews a composition in a window. No browser and no window are needed, so it runs in CI and on servers. examples/render and the plugin's docs show how. (#1873)
  • Thousands of shapes in one draw call. shader.DrawInstances draws many quads with one app shader, each with its own rect and up to 16 floats of data, so a node editor, a whiteboard, a piano roll or a particle effect no longer builds a Painter call per shape every frame. It works with Metal, Direct3D, OpenGL and the CPU renderer. (#1851, requested by @tsugumi42 in #1848)
  • Sharp text under transforms. Text in a scaled, rotated or perspective element, and Cache() layers, are drawn at the size they show at, so word-by-word animated lyrics and cards that zoom open stay sharp at rest and while they move. (#1846, reported by @tsugumi42 in #1840)
  • Views for very large repositories. A git client can show a 400k-file change set and a 50 MB diff without stalling: OutlineState.Generation lets an Outline keep its rows between frames, and editor.DiffView compares large texts off the main thread. Screen readers read each diff line as added, deleted or unchanged, and line navigation works in the editor and the diff on macOS. Tables get dense rows with ListState.RowHeight, and Element.TruncateStart keeps the end of a path, as …/theme/picker.go. (#1818, #1819, #1821, requested by @PythonShe in #1813, #1812 and #1814; #1870, #1869, @PythonShe)
  • Faster layout, drawing and audio.
    • Layout takes 8 to 23% less time on the arewelayoutyet workloads. (#1705, #1728, #1735, #1780, @joei4cm)
    • The CPU renderer draws dense fills on small targets about 5 times faster and unscaled images 7 to 17 times faster, and canvas redraws allocate 99.7% less. (#1766, #1778, #1779, #1791, #1794, #1839, @zh239ns)
    • A playing audio.Player makes no garbage on macOS and Linux, uses about half the CPU time, and wakes up to 5 times less often. (#499, @xlanstar)
    • In the rich text editor, Markdown() on a 32,000-paragraph document takes 154 ms instead of 980 ms, and a new theme or font lays out only what is in view. (#1833, #1834, @imhalid; #1695, @jiaz)

New

Windows and the app

  • Window.CornerRadius() gives the radius the system rounds a window's corners to, so content inset from the edges can have corners that match. (#1849, @imhalid)
  • WindowOptions.IgnoreMouseEvents creates a window that lets clicks through from the start, such as the frame around what a screenshot tool is about to capture, and Window.IgnoresMouseEvents() reads it back. (#1758, @echoVic)
  • Clipboard.OnChanged tells a clipboard manager or history panel when anything is copied, in this app or another, without reading the clipboard. (#342, @echoVic)
  • MenuItem.Badge shows a value at the end of a menu item, such as a latency or a count, lined up in a column on macOS. (#738, @Sakurasan)
  • Shell.TrashItemResult returns where an item landed in the trash on macOS, so an app can put it back even after Finder renamed it. (#1453, @echoVic)
  • On Linux, GlobalShortcut.RegisterWith tells the desktop what a shortcut does, and OnKeys tells the app which keys the user gave it, or none. (#1715, @pseudoyu)
  • On Wayland, frameless always-on-top windows that skip the taskbar, such as subtitles over a video or a desktop pet, stay above other windows, full-screen ones included, where the compositor supports layer shell. (#1867, @ACAne0320)
  • Under XWayland, global shortcuts work while another app has the focus. (#1868, @ACAne0320)
  • The mygo_nowebview build tag leaves WebView2 out of a Windows app whose windows all show native UI. (#1748)

Native UI

  • Span.PaddingStart leaves room at the start of a span alone, such as for a site icon before a link. (#1829, @imhalid)
  • ListState.EndReached tells an app when the user scrolls near the end of a list, so it can load the next page. (#1767, requested by @isaced in #1764)
  • Handle.SelectAll focuses a text input and selects its text, as Tab into it does, so a find box that opens again can be typed over. (#825, @sorrycc)
  • PopoverMenuButtonOptions.Item styles the rows of a popover menu and its submenus. (#1742, @imhalid)
  • TokenField(...).Query binds the text being typed, so suggestions can come from a backend. (#1717, @bketelsen, requested in #1714)
  • SVGs draw CSS variables, prefers-color-scheme: dark, <text> and <marker>, as diagrams made for GitHub READMEs use. SVG.Unsupported() lists what an image uses that isn't drawn. (#1698, reported by @saminnet in #1691)
  • chart.MinMaxIndex keeps the min/max queries of streaming charts fast however long the history grows. (#648, @Nigh)
  • The inspector copies an element's markup, its styles and its computed values from the Elements tree's context menu. (#1696, requested by @ushaio in #1693)
  • Each Tester has its own text system, so UI tests can run in parallel. (#1730, @Garfielk, reported by @tsugumi42 in #1722)

Code editor, rich text, Markdown and terminal

  • State.SetLineStyles draws lines in other fonts and sizes, such as a Markdown editor's headings. (#1702, @bketelsen)
  • The code editor auto-closes brackets and quotes next to Chinese, Japanese and Korean text. (#1854, @KurobaRemu)
  • Document.ScrollBy and ScrollToParagraph scroll a rich text editor from the app, such as while a block is dragged near its edge, and the line being typed stays in place when something above it grows. (#1692, requested by @jiaz in #1690)
  • EditorOptions.OnCommand lets an app handle the menus' edit commands, such as its own paste on a Mac, where ⌘V arrives as a command instead of a key. (#1831, @imhalid)
  • ParagraphStyle.QuoteDepth keeps nested quotations, with lists inside them, through editing, HTML and Markdown. (#1731, @bketelsen)
  • In ui/markdown, Options.OnTask makes task check boxes clickable, and Options.AnchorBlock takes a link to a block by its ID, as Obsidian's #^block-id does. (#1716, @bketelsen, requested in #1713)
  • terminal.Options.NoExitMessage leaves out the "[Process exited]" line, for apps that show the end in their own way. (#1738, @xcc3641)

Build and updates

  • mygo build downloads earlier versions' archives for delta updates from updates.s3 when it is set, and retries a download that stalls. (#875, @baranwang)
  • mygo build retries network errors and 5xx responses while fetching the published updates. (#836, @echoVic)
  • mygo dev gives its build an icon on Linux. (#725, @ak4duy)
  • When codesign waits for a locked keychain or for permission to use a key, mygo build and mygo dev say so and how to fix it. (#1757, @echoVic)

Fixes

UI

  • A drag keeps going when the view holding its source goes away, as when dragging a tab onto another project switches to it. (#1736, @sorrycc)
  • A popover menu over a slowly animated drawing highlights every row the pointer passes on ProMotion displays. (#1755, @imhalid)
  • A view that resizes its window while it builds no longer shows a stretched frame. (#1806, @ryuyb)
  • Scenes with thousands of large paths, such as a node graph's links, draw every one in a single paint. (#1847, reported by @tsugumi42 in #1841)
  • Backspace after a combining mark deletes the mark alone, as in Thai, and a click never puts the caret between a letter and its marks. (#1838, @Th1nkK1D)
  • An element named from its content leaves out the copy an exit transition leaves, so screen readers no longer hear "Saving Save". (#1710, @cunninghamcard-bit)
  • A text ending in a line separator (U+2028) has an empty last line for the caret. (#1845, @KurobaRemu)
  • Tester holds back keys pressed while an input method composes, as every platform does. (#1820, reported by @PythonShe in #1815)

Code editor

  • Saving a file with mixed line endings keeps each line's own ending. (#1801)
  • Typing or pasting text with CRLF puts the caret after it. Sorting lines, changing case with several carets in one word, and moving a selected last line keep carets and selections in the text. (#1701, #1703, #1704, @pseudoyu)
  • Completions close when the caret moves other than by typing. A letter typed while another goroutine edits the buffer is never lost. (#1737, #1807, @pseudoyu)
  • In a split diff, a collapsed line's annotation leaves no room, the divider is drawn and can be dragged over the separators, and the find bar shows above the separators and fits in narrow editors. (#1734, @pseudoyu; #1871, @PythonShe; #1775, @Th1nkK1D)

Rich text and Markdown

  • Up and Down move past wide room between paragraphs, and Left and Right move through padded spans and wraps within a word. (#1799, #1823, @jiaz)
  • A selection collapses toward the direction of Up or Down before moving. (#1857, @KurobaRemu)
  • An edit that changes text both above and inside the view keeps the view where it was. (#1774, @jiaz)
  • A quotation that starts with a heading sits as far from the text above as from the text below, and the room above a code block is no longer painted as part of it. (#1825, #1817, @jiaz)
  • The placeholder starts after a list marker, a task's box or a quote's bar. (#1828, @imhalid)
  • Text an input method commits with CRLF becomes one line break. On Linux, undo after an input method's commit works on the first press. (#1711, @pseudoyu; #1859, @KurobaRemu)
  • Input method candidates and macOS Look Up line up with the whole phrase. (#1858, @KurobaRemu)
  • Editing a paragraph that ends in a table, below a list, parses as the whole text does. (#1727, @pseudoyu)
  • Empty list items and closed math blocks report their full source ranges. (#1855, #1856, @KurobaRemu)

Terminal

  • A link that wraps onto the next rows is underlined and opens whole. (#1677)

Video and audio

  • On macOS, a video from a URL no longer freezes the app while it loads, and its first picture shows without anything else redrawing the window. (#1747, reported by @Bloomingg in #1743; #1832, reported by @renyijiu in #1830)
  • On Windows, videos in folders with non-ASCII names play. (#1754, reported by @lizhongyue248 in #1752)
  • A malformed audio file can no longer make decoding reserve gigabytes of memory. (#1688, @pseudoyu)

macOS

Windows

  • Shell.TrashItem returns an error, and keeps the file, when Windows would delete it for good, such as a file too big for the recycle bin. (#629, #1750, @echoVic)
  • After a click on the menu bar while a page has the focus, the keyboard moves through the menus and Alt closes them. (#1802)

Linux

  • TrayOptions.ID names the tray icon, so panels remember its settings across launches. (#1836, reported by @jewei in #1835)
  • A tray no longer crashes the app when the desktop shell restarts. (#1790)
  • A program name the app sets before Run is kept, so its windows match their desktop entry and get its icon. (#1761, @bketelsen)
  • Work posted to the main thread while the app starts no longer stops it running anything posted later. (#1771, reported by @pseudoyu in #1770)
  • With MYGO_GPU=1 and no libepoxy, native UI draws on the CPU instead of showing a black window. (#786, @zs311521)

Build and updates

  • The updater ends a request the network abandoned, so later checks run. (#1803, @2fa0)
  • mygo dev signs with the Apple Development identity of macos.signingIdentity's team when you're on several teams, and keeps the signatures of programs bundled in the app's resources. (#1739, @brodienguyen; #1765, @pseudoyu)

Website

New Contributors

Full Changelog: v0.9.0...v0.9.1

Don't miss a new mygo release

NewReleases is sending notifications on new releases.