Repository navigation
Button: Align pressed colors and simplify Toolbar overrides - #86684
Conversation
🤖 PR meta 🤖🎉 PropsIf 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. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: +872 B (+0.01%) Total Size: 8.65 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
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Navigates the list via UP/DOWN arrow keys from action buttons in
|
03bff48 to
7477255
Compare
3e176a7 to
2961c9a
Compare
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the pressed-control color alignment changes.
No open issues 🎉
What changed in this PR
Continues the Button color alignment work by using paired WordPress Design System colors for pressed controls and their Toolbar and header compositions.
Changes:
- Align pressed Button foregrounds and fills across themes and interaction states, including disabled busy controls.
- Preserve inset Toolbar fills and let numbered icons inherit the Button foreground.
- Update editor, Widgets, and Customizer header colors and package changelogs.
| File | Description |
|---|---|
packages/editor/src/components/document-tools/style.scss |
Uses theme-aware pressed and disabled header fills. |
packages/editor/CHANGELOG.md |
Records the document-tool color fix. |
packages/edit-widgets/src/components/header/style.scss |
Aligns pressed and disabled Widgets header fills. |
packages/edit-widgets/CHANGELOG.md |
Records the Widgets header color fix. |
packages/customize-widgets/src/components/header/style.scss |
Aligns header colors and adds disabled forced-colors styling. |
packages/customize-widgets/CHANGELOG.md |
Records the Customizer header color fixes. |
packages/components/src/toolbar/toolbar/style.scss |
Uses the Button’s pressed background for inset fills. |
packages/components/src/toolbar/toolbar-button/style.scss |
Removes the fixed white subscript color. |
packages/components/src/button/style.scss |
Pairs pressed colors and preserves disabled busy stripes. |
packages/components/CHANGELOG.md |
Records the Button and Toolbar color fixes. |
Review effort: Balanced
|
Seems fine from just a glance, though it also seems like the numbered toolbar item either needs deprecation or a revisit. Separate, sure. |
|
For sure Toolbar needs separate attention - from deprecations (as you mentioned), to a potential new coat of paint (as @jameskoster explored), and technically we'll need to create a new |
Follows #86683 and continues the Button color changes from #85073. The busy spinner is tracked in #85960.
What?
Use paired WPDS colors for pressed Buttons and their Toolbar, editor and Widgets compositions.
Why?
Fixed foreground and fill overrides can produce unreadable pressed controls in dark or custom themes.
How?
Use paired neutral WPDS colors for pressed Buttons. Numbered Toolbar icons inherit the Button foreground. The block toolbar paints its fill behind the icon, while the editor, Widgets, and Customizer headers fill the whole button. Disabled pressed Buttons keep their busy stripes.
Pressed colors now follow
ThemeProvider, like the ordinary colors in the preceding PR.Testing Instructions
npm run storybook:e2e:devand open Button → Variant States. Compare all variants with pressed, destructive, busy and disabled props in light, dark and custom orange themes.Testing Instructions for Keyboard
Tab to a pressed control, move the pointer away, and hold Space. Its foreground and fill should remain paired. Repeat with busy controls. Focusable disabled controls should retain their disabled appearance and remain unavailable for activation.
Screenshots or screencast
Compared trunk
16bb8f905d2with2961c9a81d7in Chromium.Pressed controls in a dark theme
The post editor and Widgets inserter icons become visible against their new fill. The numbered icon and its subscript share a foreground. The primary Button keeps its text readable on hover, and disabled busy Buttons retain their stripes. These examples use the production components inside a dark
ThemeProvider.Controls in the running editors
Bold is active in the paragraph toolbar. Each inserter is open. The header buttons keep their full fill and Bold keeps its inset fill. All four crops use the same default editor colors and scale.
Full editor views
The post editor, Widgets screen, and Customizer use the same Twenty Twenty-One test site at 1280 × 900. Each view loads the compiled styles from its revision.
Light theme · pressed Button variants and interactions
Each row combines the pressed state with destructive, busy, native disabled, or focusable disabled props. Columns show all five Button variants. Hover, focus, and active are browser-forced CSS states. The keyboard check uses a real Space keypress.
Dark theme · pressed Button variants and interactions
Each row combines the pressed state with destructive, busy, native disabled, or focusable disabled props. Columns show all five Button variants. Hover, focus, and active are browser-forced CSS states. The keyboard check uses a real Space keypress.
Custom cream and orange theme · pressed Button variants and interactions
Each row combines the pressed state with destructive, busy, native disabled, or focusable disabled props. Columns show all five Button variants. Hover, focus, and active are browser-forced CSS states. The keyboard check uses a real Space keypress.
Chromium forced-colors emulation · pressed Button variants and interactions
Each row combines the pressed state with destructive, busy, native disabled, or focusable disabled props. Columns show all five Button variants. Hover, focus, and active are browser-forced CSS states. The keyboard check uses a real Space keypress.
Use of AI Tools
Implemented with Codex, including independent local agent review and one-off browser checks. No tests were added.