-
Notifications
You must be signed in to change notification settings - Fork 4.7k
UI Components: Add theme support for FormTokenField and ComboboxControl
#69638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ciampo
merged 7 commits into
WordPress:trunk
from
yogeshbhutkar:enhance/theme-support-combobox
Apr 3, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
006c53e
feat: add dark theme support for `form-token-field`
yogeshbhutkar f9eee13
feat: add dark theme support for `combobox-control`
yogeshbhutkar 77f334c
chore: add CHANGELOG
yogeshbhutkar 30d5a46
chore: use consistent spacing
yogeshbhutkar ff83a9b
refactor: update `input-style__focus` to support custom accents
yogeshbhutkar 4c9319b
feat: enhance `input-control` mixin to accept custom accent colors
yogeshbhutkar d63c346
chore: move `CHANGELOG` to unreleased section
yogeshbhutkar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should expose the same
$accent-colorargument in theinput-controlmixin too (in the same file) (also cc @mirka for a quick check about this idea making sense)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit conflicted, now that you bring it up. I'm looking at how these generic mixins are used in the repo, and it's mostly just the components package. Almost as if these shared styles should be internal to the components package now and deprecated from base-styles — I assume they were once used more in other packages, and we've been able to remove them as we've consolidated our component usage better.
However, I like what @yogeshbhutkar is doing here, and I think it's fine to do it in the
input-controlmixin too, like you suggest. I'm just not sure if that scales to "let's do it for all the base-style mixins with accent colors".I don't have a strong preference either way, given that I want to eventually overhaul these bits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. In a perfect world,
@wordpress/componentwould offer a set of input components that can satisfy all usecases in Gutenberg, allowing us to move the mixing to the component package.At the same, we need to consider whether the base-style package should exist as a lower-level (even lower that the components package) for literally any UI build in Gutenberg, even when the components from the
@wordpress/componentspackage can't be usedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great discussions!
Following this, I've updated the PR to expose the
$accent-colorargument in theinput-controlmixin and made some adjustments to the codebase.cc: @ciampo @mirka