Repository navigation
A colour typed in the Hex field stays with the node it was typed for - #663
Merged
Merged
Conversation
The Inspector's Hex draft and its error now belong to the colour targets they were typed for. When the targets change, an unconfirmed draft is dropped, as Escape drops it: it is not shown for the new targets, and a later Enter or blur cannot apply it to them, even while the field keeps the focus (a Shift+click on the canvas does). Enter and blur still apply a draft to its own targets, and a canvas click still leaves the field first, so the draft goes to the node it was typed for. Part of #615
Deploying cozy-loop-studio with
|
| Latest commit: |
e633aa2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e4d9bcea.cozy-loop-studio.pages.dev |
| Branch Preview URL: | https://accent-hex-draft-per-selecti.cozy-loop-studio.pages.dev |
This was referenced Nov 24, 2026
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.
Part of #615 (item 3).
What was wrong
The Inspector's Colour ▸ Hex field kept its draft and its error as local state, and nothing reset them when the selection changed.
#zz12) and its message "Not a colour. Use three or six hex digits, such as #336699." showed for every node selected next, and again on returning to the first node. Nothing was written.#333333without Enter, then Shift+click node B on the canvas: the selection moves to B while the Hex field keeps the focus, and the field still shows#333333. Tab then writes#333333to B (autosaved, one Undo entry); A is unchanged. Measured on main3864ce9athrough the real UI.The change
AccentFieldstores the draft with the key of the targets it was typed for (node ids and edge ids).docs/flow-colour-and-compact-nodes.mdFC-5 states the rule; its test list names the new tests.Tests
New
e2e/flow-colour.spec.tsdescribe "the Hex draft is dropped when the selection changes (#615 item 3)":On main's
AccentField, tests 1–3 fail and test 4 passes. Each of the three fails at its first display check (#zz12,#333333,#123456still in the field for B), so the write checks after it were not reached on main; the wrong write itself was measured by the reproduction probe before the tests were written.On this branch,
--workers=1 --retries=0:e2e/flow-colour.spec.tsande2e/flow-colour-views.spec.ts(chromium): 28 passed.e2e/flow-colour-visual.spec.ts(chromium): 5 passed, snapshots compared.e2e/flow-colour-mobile.spec.ts(mobile): 3 passed.Every
check:*script,tsc -b, lint (88 warnings, the baseline, none inAccentField) andvitest run(5758 passed) pass.