fix: type colors into the Background field and keep its label in sync - #816
Merged
surajshetty3416 merged 3 commits intoSep 10, 2026
Merged
Conversation
The field selects its text on focus (Text Color too), accepts a typed hex, rgb, hsl or image path, and ignores anything else. The Autocomplete now syncs its text on every model change, even under an open list, so a color picked in the popover replaces the "Gradient" label, and it restores the model's text after a submission the owner rejected. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #816 +/- ##
========================================
Coverage 66.89% 66.89%
========================================
Files 94 94
Lines 10505 10505
========================================
Hits 7027 7027
Misses 3478 3478 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
A prefix check let #zzz or an unfinished rgb( through and cleared a real background image. The browser's own parser decides now. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
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.
Follow-ups to #813 for the Background field.
AutocompletegainsselectOnFocus;select()is skipped when a popover already took the focus on that same focus, since it would hand it back and toggle the popover shut.#), rgb, hsl or image path typed into the field sets the background; anything else is ignored and the label restored.parseBackgrounddecides what a value means, for the base value and for state variants, while the "copy current value to state" path still copies the real base styles.Autocompleteskipped syncing its text while its list was open, and the list never closed once the picker popover took the focus, so a color picked there left "Gradient" in the field. Model changes now always sync the text; only option refreshes wait for the list to close.