Repository navigation
merge: sync upstream main (d36f87e) into fork main - #38
Merged
Merged
Conversation
…with its control Box.Disabled did not reach the hit of an element given Hit or HitWith, so ButtonBase, CheckboxBase and SwitchBase stayed enabled to assistive technology and in the Tab order while the control with a look did not. Merge it into the hit's options. Add a test that declares each styled control and its Base in every state and compares what they tell the pointer, the keyboard and assistive technology, and one that fails for a page Base that is in neither that comparison nor an explained list. Document how a control and its Base are kept the same and what adding a control touches.
The drawing guide opened by telling readers to compute every rectangle in a Paint callback. Lead with Draw, DrawOver and ui.Control on an element the page lays out, with a compiled example, and describe the whole-window canvas as the route for where ui has nothing that fits. Say what a copy made by viva add is and how to change a control's look without copying.
Pin that a Dialog given no Height is as tall as the height an application gets by measuring the header with components.BeginDialog and adding its body's height, so a page does not need that measurement. Motty drops it in the paired commit.
components.Select already declared the trigger's Hint; ui had no way to set it.
components.Input paints an invalid input with the destructive border and ring, but a page text field had no way to ask for it. Field.Invalid feeds the snapshot, as Secure does. Motty's vault unlock dialog needs it.
A page that reserves the room of a button it paints itself, or places beside something else, had to call components.BeginButton with an empty identity just to read its size. ButtonExtent(c, label, size) gives the width and height the element Button is laid out at, with a test per size against the laid-out hit.
This reverts commit 01bf3b8.
…trol The shared field layout already takes an Error, Invalid and the control the title labels (BeginField's For); FormFieldState now sets them. A page declaring a form row no longer needs a hand-painted BeginField for any of them. Tested: the error is painted and For makes the title the control's label.
components.Input paints a disabled input dimmed and out of the Tab order, but a page text field had no way to ask for it, which kept disabled proxy fields hand painted. Field.Disabled feeds the snapshot, as Secure and Invalid do. Tested: painted differently, reported disabled, not focusable.
PageConfig.Styles.Button dresses every button of a page, but a page had no way to dress one: Box.Background does not reach a themed Button, and ButtonBase drops the theme's hover, press, focus and disabled looks. Box.ButtonRecipe takes the typed function components.Button already accepts (start from components.ButtonRecipe and change a color) and wins over the page's Styles. Tested: only that button is dressed, removing the hook fails the test, and a warm declaration allocates nothing. Motty's bookmark editor forces a dark Save button this way.
The shared field layout already places a description under the control, and components.Input already gives its hit a Hint; ui exposed neither. FormFieldState.Description paints the muted help line, Field.Hint feeds the snapshot's Hint. Tested: both are reached, and removing either wiring fails the test. Motty's local proxy port field needs both.
16 of 19 tasks
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.
Merge upstream
vivaui/vivamain(aa89181..d36f87e, 15 commits) into forkmain(412c0d9), ahead of Lithe desktop 0.8.4:d828c8bfix(ui): tell a disabled Base it is disabled, and compare every Base with its control7a46c79docs(guides): lead the drawing guide with painting inside a page86e602ftest(ui): a Dialog without a height fits its description and body1443298feat(ui): give a Select trigger a Hint for assistive technology333a930feat(ui): let a page Field paint as invalid01bf3b8feat(ui): measure a Button's room with ButtonExtent8d814bfRevert "feat(ui): measure a Button's room with ButtonExtent"3eaae58feat(ui): FormField shows an error, the invalid look and labels a control8cf777dfeat(ui): let a page Field be disabled7ae8b6bfeat(ui): give one Button its own recipe9614365feat(ui): FormField takes a Description and Field a Hint3ed35adfix(headless): do not report a selected run painted again in its highlighte1bb4dafix(ui): give the keyboard back to a field after its action is pressedd97f2b6feat(audio): play PCM on the default output deviced36f87echore(testenv): move the Linux harness to its new machineThe merge had no conflicts. Upstream and fork tags are identical, so no tags need pushing. Open fork PRs #36 and #37 are left for a later sync.
Verified locally (macOS 27.2 SDK, Go 1.27.4):
git merge-base --is-ancestor upstream/main HEAD: truegofmt -l .: cleango vet ./...: okGOOS=linux GOARCH=amd64 go vet ./...: okGOOS=windows GOARCH=amd64 go build ./...: okGOOS=windows GOARCH=arm64 go build ./...: okgo test ./...: 94 packages ok;cmd/vivafails 14 packaging tests ("built for macOS 13.0 or later but [mac] min_system says 12.0"). They fail the same way on forkmain412c0d9with this machine's toolchain (Apple clang 21), so the merge does not cause them.Note: Must be merged with a merge commit (
--merge), never squash or rebase.