Repository navigation
Customize Widgets: Polish the header - #87504
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: -114 B (0%) Total Size: 8.73 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. should give the image its context menu while selected @WebKit @Firefox in
|
…olbar The Options menu was rendered inside the `NavigableToolbar`, so it picked up the `toolbar` variant through the components context system and its popover used the black block toolbar styles. Render it after the toolbar, like the widgets editor and the post editor, and use a plain `DropdownMenu`. Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
7aaca7f to
b0bbf93
Compare
ciampo
left a comment
There was a problem hiding this comment.
LGTM 🚀
As a follow-up, it'd be worth looking into moving this menu to Menu from @wordpress/ui. Nothing can fill this menu today, so plugins shouldn't be affected. A few things to keep in mind, though:
PreferenceToggleMenuItemrenders a@wordpress/componentsMenuItem, which doesn't work insideMenu. The editor'sMoreMenuPreferenceItemis private to@wordpress/editor, so we'd need a localMenu.CheckboxItemthat toggles the preference and announces the change.- All the items need to move at once. A leftover
MenuItemwould be skipped by arrow-key navigation. - Layering might need some work. The current z-index rule targets
.more-menu-dropdown__content, and we'd need to check that a click in the preview still closes the menu. - We should keep edit-widgets in step, since that's the editor this one matches. It has the
ToolsMoreMenuGroupslot, so it'd also need an adapter like the editor'sMoreMenuItem.
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
* Customize Widgets: Move the Options menu out of the document tools toolbar The Options menu was rendered inside the `NavigableToolbar`, so it picked up the `toolbar` variant through the components context system and its popover used the black block toolbar styles. Render it after the toolbar, like the widgets editor and the post editor, and use a plain `DropdownMenu`. Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu * Add changelog entry Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu * Remove redundant assertion Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu * Remove the side gaps around the fixed block toolbar Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu * Use width: auto for the fixed block toolbar offset Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu * Scope the Options toggle locators to the header Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
What?
Polishes the header of the widgets Customizer:
Why?
Toolbarpassesvariant: 'toolbar'to every dropdown inside it. Because the Options menu is inside the toolbar, its popover gets the black block toolbar styles, unlike the other editors.How?
MoreMenuafter theNavigableToolbar, and useDropdownMenuinstead ofToolbarDropdownMenu.Testing Instructions
Testing Instructions for Keyboard
The Options menu toggle is now reached with the Tab key from the "Document tools" toolbar, instead of the Right arrow key. This matches the other editors.
Screenshots or screencast
Use of AI Tools
This PR was authored with Claude Code, and reviewed by the author.