Repository navigation
merge: sync upstream main (79c3557b) into fork - #65
Merged
Merged
Conversation
statistic shows one formatted number (decimals, digit groups, affixes, status color). inputtag enters several values as tags; Backspace in the empty field is reported through the new Editor.OnDeleteAtEdge hook, since the platform text system takes that key. autocomplete suggests completions while the value stays free text. indicator pins a count or a dot to a control's corner without taking room. TextFieldBase now takes the options of TextField.
Shows as many icon actions as the width allows and puts the rest, from the end, in a More menu with their disabled state kept; Min keeps a floor. The count is measured from the container's laid-out width with the page's container queries, so it follows a resize without polling.
The DirectWrite fallback builder searched the system font collection, which never holds a font registered with RegisterFont, so a face that named such a family as a fallback drew .notdef while the same family as the primary drew its glyphs. Build the fallback against the collection text formats are made from, the system's fonts and the application's, and key the cached fallback by that collection's revision. Companion: Motty's bundled icon font (t8y2/motty#1629). Refs: t8y2/motty#1629
The focus settling, the publish and the semantic mirror each compared the painted hits with the published ones, on different field subsets: the whole hit, the region fields, and again the whole hit to collect dirty ids. A repaint that changed one label walked the 4k-hit list three times. diffHits now makes one pass per paint and answers all three; once too many hits changed to patch the mirror, the rest of the list compares the region fields only. publish no longer asks again what settleFocus decided for the same paint: the decision is unsettled, synced or reused, and only an unsettled one (a canvas painted outside repaint) is decided in publish. Hits are compared as bytes first and by value when the bytes differ. The published list keeps the previous frame's strings reachable, so equal bytes are equal hits; a label formatted again with the same words still compares equal by value. M2 Pro, interleaved: LabelledPage 4k 315 -> 227 us, OneChanged 4k -42%, Changed 4k -12%; still zero allocations.
… text Arrow keys on a short mixed line cost 1.25 us after the UTF-8 store, 2-3x what they did on runes: every step scanned the whole line for characters that need bidi, and Next and Prev decoded a 64-rune window into a []rune. The window also cut context: in a run of regional indicators longer than a leaf, Prev paired flags wrongly (rune 66 gave 64, not 65). Leaves now count the characters bidi.NeedsBidiRune reports, kept beside the running sums so edits do not widen them; text without one skips the visual step outright. Next and Prev read the leaves in place through a grapheme.Source (NextIn, PrevIn) with all the context the rules ask for. M2 Pro, interleaved: CursorMoveMixedText 1248 -> 543 ns; typing and large document edits unchanged. A run of 100k flags costs 2.4 ms per Prev, as the parity rule requires counting the run.
A batch that deleted and inserted shapes re-flattened and re-uploaded the whole page. Deleted instances now leave the list first, in one pass shared with delete-only batches, and the update is the suffix from the first changed instance, with Shrink when the list ended shorter; every backend already applies that form. New nodes are linked after the new parents and previous siblings they name. A shape inserted between a new one and its predecessor was queued after it, so the store rejected the batch and the builder resynced the page. The splice path also requires every new shape to sit under the root, so a shape inserted into a group in the same batch goes through the rebuild. M2 Pro: delete plus append on 10k instances 65.7 us -> 250 ns.
The store's batch scratch (paint order, walk stack, deleted instances, link stack) kept the capacity of the largest batch for the rest of the session: closing a 100k-row page left about 800 KB behind. The scratch holds nothing between batches and only looks oversized after the page shrinks, so compact now gives back any of it past four times the page, above a 4096 floor. A page that stays large keeps what its batches use; frames without a shrinking batch do no extra work.
Random batches that delete, insert in the middle and recolor shapes go through render.Store, and the Direct3D 11 renderer is sent only the updates it reports (ranges that grow the list or end it shorter with Shrink); every frame is compared pixel for pixel with a renderer given the whole list. The test requires both shrinking and growing ranges, so it keeps exercising the suffix path. Run on the physical Windows 11 machine; an off-by-one range in the store fails it at the first batch.
ui.TextSelectionArea(c, &state) declares a column whose Text, Paragraph and Wrap the user can drag across, double/triple-click, extend with Shift, copy with Primary+C or the page's Copy/Select All menu, and drop with Escape. Text inside elements that act on a press (buttons, links, LabelFor labels) keeps its own presses; Box.Unselectable takes a text out. Copies are the source text: an ellipsis copies whole, texts side by side in a row join with a tab, others with a newline. Boundary: hit regions, focus, paint and page routing are framework concerns, so the area lives in base. The cross-text selection engine (TextSelection, TextPoint) moves from components to base and components.MarkdownSelection becomes base.TextRange, re-exported by ui, with no aliases left behind. gfx gains HitOptions.Presentational: a pointer-only region that shows the text cursor over the words without an accessibility node of its own. Desktop checklist: - Keyboard: no Tab stop (as SwiftUI/Flutter/Compose); Primary+C/A, Shift+arrows, Escape. Guarded by headless tests. - Pointer: drag, double/triple press, Shift-press, secondary press opens the in-page edit menu; drag past a scroll area's edge autoscrolls. - Focus: a press focuses the area without a ring; the selection drops when another control takes the keyboard; the menu gives it back. - Text: offsets snap to graphemes; words via text.WordRange. - Density/Window: no new control sizes; inactive-window selection color not done (the canvas does not know window activation; fields share the gap). - Accessibility: words stay the painted static text; selection is not yet exposed through AX/UIA/AT-SPI. Steady paint allocates nothing (40 rows, ~30 texts selected: 28.5us vs 20.8us for the same texts outside an area on M2 Pro). Companion: motty commit adopting it for host keys, errors and details.
Adds Window.SetDecorated, which toggles native decorations on a shown window and reports the confirmed result once through done. Squashed from vivaui#432 onto current main (the branch conflicted in ci.yml).
A window restored onto a monitor with a different DPI received WM_DPICHANGED before the renderer was ready and ignored it, so the first frame used the old scale. Update the scale and take the suggested bounds in that case, since placement sized the window at the old scale. Squashed from vivaui#466 with the bounds follow-up.
Adds StatusItem.SetHoverPreview and RefreshMenu, backed by native pointer entry and exit on Windows and macOS. Linux reports false. Squashed from vivaui#445 with documentation of the suppressed tooltip and the Windows overflow-area behavior.
Squashed from vivaui#439, rebased onto the ellipsis hover hints. A label search in progress now keeps its letters instead of being interrupted by a mnemonic, and the mnemonic spacing is a named constant.
# Conflicts: # base/page.go # cmd/viva/templates/combobox.go.txt # cmd/viva/templates/dropdown_menu.go.txt # cmd/viva/templates/hierarchy_menu.go.txt # cmd/viva/templates/multi_select.go.txt # cmd/viva/templates/select.go.txt # cmd/viva/templates/single_select.go.txt # components/combobox.go # components/dropdown_menu.go # components/hierarchy_menu.go # components/multi_select.go # components/select.go # components/single_select.go # gfx/hover_hint.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sync vivaui/viva main (91da94a..79c3557, 16 commits) into Lithe-IDEA/Lithe-viva main before Lithe desktop-v0.8.19 release.