Repository navigation
Components: Use WPDS stroke tokens on raised surfaces - #87840
Merged
Merged
Conversation
Use the surface stroke tokens for the CustomSelectControl popover border and the Menu border and separator. Note that the toolbar variant strokes in Popover, Dropdown, and Menu are still hard-coded, pending the block toolbar design. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🤖 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: 0 B Total Size: 8.73 MB
🏁 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. Actions are reachable via RIGHT/LEFT arrow keys in
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mirka
approved these changes
Dec 2, 2026
ciampo
enabled auto-merge (squash)
December 2, 2026 22:01
ciampo
disabled auto-merge
December 2, 2026 22:02
ciampo
added a commit
that referenced
this pull request
Dec 2, 2026
This was referenced Dec 2, 2026
ciampo
added a commit
that referenced
this pull request
Dec 2, 2026
…ThemeProvider (#87817) * Tooltip: Invert neutral tokens instead of nesting a dark ThemeProvider Drop the ThemeProvider that Tooltip.Popup rendered with a fixed #1e1e1e background. Swap the neutral content tokens instead, so the tooltip contrasts with the surrounding theme, and remove the --_wp-ui-tooltip-shadow workaround on the positioner. Apply the same tokens to the @wordpress/components Tooltip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tooltip: Test that the popup follows the surrounding theme Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tooltip: Add changelog entries Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tooltip: Note the token change for popup content and update stale references Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tooltip: Clarify which theme the changelogs and comments refer to Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tooltip: Consolidate changelog entries and update the theme compatibility fixture Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tooltip: Scope the fixture's theme dependency notes to the published bundle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tooltip: List the color change as an enhancement Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tooltip: Mark the swapped color tokens as a temporary hack Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * UI: Remove the ThemeProvider compatibility fallback and private APIs dependency No component mounts ThemeProvider since the Tooltip change, so the fallback and its lock-unlock module have no runtime consumer. Tests import ThemeProvider from @wordpress/theme directly. Keep @wordpress/ui in the private APIs allowlist, because published versions still opt in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tooltip: Link the tracking issue for the dark theme decision Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tooltip: Trim mentions of the other Tooltip Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Revert "UI: Remove the ThemeProvider compatibility fallback and private APIs dependency" This reverts commit 06bddba. * Tooltip: Shorten code comments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Components: Move the #87840 changelog entry to Unreleased * Tooltip: Move the changelog entries to Unreleased and describe the consumer impact --------- Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org>
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.
What?
Follow-up to #87287 (follow-up 2a). See #75266.
CustomSelectControlandMenuin@wordpress/componentsnow draw the borders of their raised surfaces with the WPDS surface stroke tokens. The strokes of the toolbar variant stay hard-coded, with a comment that points to the block toolbar work.Why?
Raised surfaces in
@wordpress/componentsuse a mix of WPDS tokens and hard-coded colors for their strokes. The design system hasn't decided yet whether raised surfaces should have a stroke (#87287, follow-up 2), but the strokes that exist today should still follow the theme.How?
CustomSelectControl: the popover border changes from1px solid $components-color-foreground, which is near black, tovar(--wpds-border-width-xs) solid var(--wpds-color-stroke-surface-neutral). This is the stroke that the@wordpress/uiSelectpopup and the@wordpress/componentsPopoveralready use.Menu: the border uses--wpds-color-stroke-surface-neutraldirectly. Inside aThemeProviderit looks the same as before.Menuseparator: it uses--wpds-color-stroke-surface-neutral-weak, which is what the@wordpress/uiMenuseparator and theDropdownmenu group divider use. It's lighter than before.Popover(isAlternate),DropdownandMenu(variant="toolbar") keep their high-contrast$gray-900/ foreground strokes, so they keep matching the block toolbar. A comment at each one links to Applying design system foundations to the Block Toolbar #67426 and Toolbar: Paint the floating toolbar with the Menu surface. #84567. Toolbar: Paint the floating toolbar with the Menu surface. #84567 removes the toolbar variant from these components.Testing Instructions
npm run storybook:dev.@wordpress/uiSelectpopup, not near black.Testing Instructions for Keyboard
No interaction changes. Open the select and the menu with Enter or Space, and check the same results as above.
Screenshots or screencast
Storybook, light color theme. Before is trunk (
1e3f8e76cbb), After is this branch.Menu, and the dark color theme
Menu, light color theme. The border is unchanged, and the separator is lighter.CustomSelectControl, dark color theme:Menu, dark color theme:Use of AI Tools
Written with Claude Code (Claude Opus 5.5), at my direction: Claude made the change, captured the screenshots, and drafted this description.
🤖 Generated with Claude Code