Repository navigation
Try: Hide the Popover and Menu stroke and strengthen light elevation - #87288
Closed
jameskoster wants to merge 1 commit into
Closed
jameskoster wants to merge 1 commit into
jameskoster wants to merge 1 commit into
Conversation
Make the Popover, Menu and item popup (Select, Combobox, Autocomplete) borders transparent in @wordpress/ui, and drop the stroke ring from the @wordpress/components Popover and Menu, so the elevation shadow alone separates them from the page. Forced-colors mode keeps a visible border or outline. Raise the minimum elevation shadow opacity from 0.05 to 0.08 to make up for the missing stroke on light backgrounds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 of 12 tasks
🤖 PR meta 🤖📦 Bundle sizeSize Change: +325 B (0%) Total Size: 8.7 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
|
Contributor
Author
|
Closing for now: review on #87287 favours keeping the popover and menu stroke, since on dark seeds it does most of the separating. We can revisit hiding it later. |
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, stacked on top of it. This needs design review before merging: it's an experiment to answer that PR's open question.
It hides the stroke on Popover and Menu in both
@wordpress/uiand@wordpress/components, and raises the elevation shadow's minimum opacity to make up for it on light backgrounds. This makes elevation treatment consistent across consumers; no strokes.Why?
In #87287 the stroke on popovers and menus competes with the new top-edge highlight on dark seeds. The stroke is lighter than the surface there, so it draws a light outline on all four sides. This PR shows what the shadow alone looks like, so the two approaches can be compared in the real components.
How?
@wordpress/ui: the Popover surface, the Menu popup and the shared item popup (Select, Combobox, Autocomplete) keep their 1px border but make ittransparent, so the layout and the Popover arrow alignment don't change. The Popover arrow's stroke is transparent too. In forced-colors mode, which removes box shadows, the border switches toCanvasText, as Dialog and Drawer already do.@wordpress/components: Popover and Menu drop the stroke ring from theirbox-shadow, and the triangle on Popover drops its stroke. Theis-alternatePopover style and the toolbar Menu keep theirs. Both already have outlines that only show in forced-colors mode, so high contrast still gets an edge.Things to look at
@wordpress/uiMenu or Select over white content. That's where the stroke mattered most, and it decides whether 0.08 is enough.Screenshots
Testing Instructions
npm run storybook:dev.@wordpress/uiMenu, Popover and Select stories and the@wordpress/componentsMenu, Popover and DropdownMenu stories. Check that the popups still stand out from the page on the default light background and on a dark one (Storybook theme toolbar).Testing Instructions for Keyboard
No interaction changes. The affected popups open, close and move focus with the keyboard as before.
Use of AI Tools
Written with Claude Code (Claude Opus 5.5), based on a discussion of the open question in #87287.
🤖 Generated with Claude Code