Repository navigation
Conversation
Use internal accent-purpose profiles while preserving semantic colors and contrast checks. Remove redundant base foreground solves and record parity and benchmark results. Include the requested active-fill change to follow the ramp main direction.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
🤖 PR meta 🤖📦 Bundle sizeSize Change: +837 B (+0.01%) Total Size: 8.01 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
|
|
@WordPress/gutenberg-components While self-reviewing the changes in #82294, I realized that some components in
I created this draft PR to see what it would take to migrate What do we think is best here? Try this new approach and cross fingers that it won't introduce regressions? Keep Last thought: while |
aba276e to
9684824
Compare
339cd39 to
d2544e9
Compare
|
The two big considerations for me are (1) visual consistency between buttons in the interface and (2) centralizing touchpoints such that system changes apply uniformly. If we have some guarantee that As I've been exploring how tokens could be used in |
The main reason why I started work on this PR is that the legacy Another aspect is that So refactoring to using WPDS tokens would increase consistency and remove contrast issues, at the cost of potential regressions. Hard to understand what's the best compromise |
3e55806 to
7af12f5
Compare
Superseded by #86681 and #86683, plus the pressed-control follow-up in #86684. The color-ramp work remains tracked in #82294; the automated Button color tests can be extracted separately.
What?
Follow-up to #82294. Uses the Button color mapping from #79994 as precedent, without its sizing and spacing migration.
Aligns the legacy
@wordpress/componentsButton's color declarations with WPDS semantic tokens across variants and states.Why?
After #82294, the legacy primary Button combined HSL-darkened backgrounds with a foreground calculated for a different semantic background. With primary
#608010and background#4f386e, contrast was about 4.59:1 at rest, 3.36:1 on hover, and 2.45:1 while pressed.The same legacy color variables also kept secondary, tertiary, link, destructive, pressed, disabled, and busy states from following the token pairs used by the WordPress Design System.
How?
.is-primaryblock and updates its declarations in place.The compiled CSS retains design-token fallbacks for use outside
ThemeProvider. The internal--wp-components-color-accent*variables no longer control Button colors.Testing Instructions
npm run build.npm run storybook:e2e:devin one terminal.npm run test:e2e:storybook -- --grep "WPDS colors"in another terminal.#608010and background#4f386e.Testing Instructions for Keyboard
Screenshots or screencast
Left is trunk, center is the locally rebased PR, right is Playwright’s diff:
Here is the custom ThemeProvider seed with the primary Button active:
Use of AI Tools
Codex assisted with implementation, test authoring, verification, and this draft text. Please review the changes before merge.