New in ui
- Transforms:
Translate,Scale,RotateandTransformOriginon any element, and composableTransformvalues (Translation,Scaling,Rotation,Then). Layout keeps its space; drawing, clips, hit testing, editors and IME carets, accessibility bounds and anchored overlays follow the transform.LayoutBounds,LocalToWindowandWindowToLocalsit besideBounds. See Transforms. (#110) - Motion: springs that keep their velocity when their target changes on the way (
AnimateTo,Spring, presetsui.Smooth,ui.Snappyandui.Bouncy,SpringOptionsby duration and bounce or by stiffness and damping), solved exactly rather than stepped, and timedKeyframes. Every animation shares the same core, frame scheduling and reduced-motion preference. See Motion. (#110) - Charts: package
ui/chart, chart components without a look of their own: scales with round ticks (linear, band, time), a plot with axes, marks that are elements (Rect,Point,RuleX,RuleY,Anchor), paths of lines, areas and pie slices, stacking, and a selection the pointer and the keyboard move. See Charts. (#236)
Fixes
- Keyboard shortcuts work on layouts that type no Latin letters (Ctrl+ы as Ctrl+S): input events gain
PhysicalKey, and chords with Ctrl, Alt or Super match by it on macOS, Linux and Windows. IME conversion keys no longer fire shortcuts on Windows. (#220, by @StringNick) - A Combobox selects its choice when a click or its chevron opens the options, so typing filters instead of appending to the choice. (#226, by @hwj123hwj)
- An element with an
Exittransition no longer makes every rebuild reallocate the element arena: a steady frame allocates 3.3 KB instead of 297 KB. (#234, by @baoziv587) - A press on the anchor of a focusable flyout closes it without opening it again on macOS. (#235)
Native UI in browsers
- Native UI apps build for
GOOS=js GOARCH=wasmand run in a page, drawn with WebGL 2 by the OpenGL renderer and its shaders (falling back to the CPU renderer without WebGL 2). Pointer, wheel, keys, input methods, the clipboard, context menus, dark mode and reduced motion follow the browser. Web-page windows, trays, menus, notifications and file dialogs report unsupported. See docs/ui/browsers.md. (#230) mygo dev -webruns a native UI app in the browser with live reload, andmygo build -platform webbuilds it into a static site. (#233)- Every native UI component in the website's docs now has a live preview. (#231)
New Contributors
- @hwj123hwj made their first contribution in #226
- @baoziv587 made their first contribution in #234
- @StringNick made their first contribution in #220
Full Changelog: v0.4.2...v0.4.3