Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Pull request overview
Updates FormTokenField’s disabled appearance so it visually aligns with other disabled form controls in @wordpress/components.
Changes:
- Adjusts disabled container background/border colors and normalizes cursor/opacity.
- Updates disabled token pill (text/remove button) colors to blend with the disabled container.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| background: $gray-100; | ||
| border-color: $gray-400; |
There was a problem hiding this comment.
These disabled colors use raw $gray-* tokens even though this stylesheet already imports theme-variables and uses $components-color-* elsewhere. Using $components-color-gray-100 / $components-color-gray-400 here would respect the --wp-components-color-gray-* CSS variables and keep theming behavior consistent with other controls that rely on semantic/themable tokens.
| background: $gray-100; | |
| border-color: $gray-400; | |
| background: $components-color-gray-100; | |
| border-color: $components-color-gray-400; |
| background: $gray-100; | ||
| color: $gray-600; |
There was a problem hiding this comment.
Same theming concern here: $gray-100 / $gray-600 are hard-coded palette values. Consider switching to $components-color-gray-100 / $components-color-gray-600 so the disabled token pills follow any --wp-components-* color overrides, matching the theme-ready behavior used by other components.
| background: $gray-100; | |
| color: $gray-600; | |
| background: $components-color-gray-100; | |
| color: $components-color-gray-600; |
|
Size Change: +121 B (0%) Total Size: 7.74 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Flaky tests detected in 4afd897. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/24129105779
|
|
There's this conversation about whether we go this route or another that's important to figure out for this PR to land: #77127 (comment) |
Follow-up to #77090
What?
Fix disabled styles for the
FormTokenFieldcomponent to be consistent with other form controls (InputControl, SelectControl, TextareaControl, etc.).Why?
When a
FormTokenFieldis disabled, its background and border colors don't match the disabled appearance of other form controls.How?
Updated the disabled styles in
style.scssfor theFormTokenField:.is-disabled): Changed background from$gray-300to$gray-100and border from$gray-300to$gray-400to match the standard disabled color tokens (COLORS.ui.backgroundDisabled/COLORS.ui.borderDisabled). Addedcursor: defaultandopacity: 1..is-disabled .components-form-token-field__token-textand.components-form-token-field__remove-token): Set background to$gray-100(matching the container) and text color to$gray-600(COLORS.ui.textDisabled) so the pills blend with the disabled container.Testing Instructions
Use of AI Tools
This PR was authored with assistance from Claude Code (Claude Opus 4.6). All changes were reviewed and validated by the author.