Repository navigation
Widgets: Migrate the Options menu to Menu from @wordpress/ui - #87622
Conversation
Migrate the Options menus of the widgets editor and the widgets Customizer from DropdownMenu to Menu, like the post and site editors. Remove the unused EditWidgetsToolsMoreMenuGroup slot, and close the Customizer menu when the preview is clicked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
🤖 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: +113 kB (+1.3%) Total Size: 8.85 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. As a user I want to be able to add multiple close buttons so that users can close the overlay from different positions in
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
ciampo
left a comment
There was a problem hiding this comment.
Thanks! Every item from the old menus is still there and works the same, so this looks close. Two inline comments, plus a few nits:
packages/base-styles/_z-index.scss:104:.components-popover.more-menu__contenthas no users left after this PR. It could be removed here or in a follow-up, with a base-styles CHANGELOG note.- The two
more-menu-preference-item.tsxfiles differ only inSCOPE. Some duplication is unavoidable sinceMenucontext doesn't cross bundles, but the checked state, toggle and announcement could live in a private@wordpress/preferenceshook later. Fine as a follow-up. - Optional: the
edit-widgetsCHANGELOG lists the slot removal under "Enhancements". Since the slot was never exported, the clause could also just be dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
|
@ciampo, thanks for the review!
Since similar code exists not only in the widgets and Customizer but also in the editor, we should be able to eliminate the duplication across all three. I would like to address this in a follow-up. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
What?
Menufrom@wordpress/ui#87619Migrates the Options menus of the widgets editor and the widgets Customizer from
DropdownMenutoMenufrom@wordpress/ui, like the post and site editors.Why?
The post and site editors already use
Menufor their Options menu. This makes the widgets editors match them.How?
Menu, following the editor's Options menu.@wordpress/editor, so they can't reuse itsMoreMenuPreferenceItemand each needs its own component built withMenu.With this PR,
PreferenceToggleMenuItemis no longer used anywhere in Gutenberg. Consumers can keep using it inside aDropdownMenuas before.Testing Instructions
Screenshots or screencast
###Widghets
Customizer
Use of AI Tools
This PR was authored with Claude Code, and reviewed by the author.