Repository navigation
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. Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: +538 B (+0.01%) Total Size: 8.25 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
|
|
Maybe we should just remove Styles from the panels submenu. I think it ended up there by accident; we've floated the idea of removing it a couple of times. cc @youknowriad, @jasmussen P.S. There's also an easy way to add Settings to the Panels submenu. Just add |
|
I'll wait for "product" feedback re. whether we want to keep "Styles" in the panels submenu at all, before making further code changes |
|
Not feeling strongly about this. But "Panels" is what we call any sidebar. The inspector panel, the styles panel, or anything a plugin adds. It's possible we omitted these because we needed to save space in the dropdown, but if we do go in the direction of a flyout, then it seems useful to include every available panel so you know the behavior: that selecting another panel closes the one you already have open. |
This was the angle I approach this PR — mentioning all panels in that submenu would make it more complete / correct, and would remove some awkwardness (one extra entry in the submenu, higher likelihood that there is a checked item in the panel) |
Follow-up to the discussion in #83993.
What?
Add Inspector to the Panels submenu and use radios to select the active panel. Inspector is selected when either the document or block inspector is open. Keep Panels hidden when Inspector is the only available panel.
Why?
In the site editor, Panels can contain only an unchecked Styles item while Inspector is open. Listing Inspector makes the active panel clear and gives the submenu two choices. A plain post editor with no plugin panels does not need the submenu.
How?
Use the shared editor menu for the post editor and both site editor versions. Keep the existing plugin menu items, and render the submenu only when another panel contributes an item. Omit Inspector in distraction-free mode, which hides the sidebar.
Selecting an active radio keeps its panel open. Selecting Inspector from another panel opens the document or block inspector according to the current block selection. Closing the sidebar with its close button leaves no radio selected.
Remove the obsolete
@wordpress/interfacetype shim from the Vitest validator so the menu tests use the package's actual store types.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Verification
The production build, type check, changed-file JavaScript lint, changelog validation, and full Vitest convention check passed. All 39 menu tests passed. Native browser checks covered both site editor versions, the post editor, and keyboard selection and reselection of a real plugin sidebar.
The Panels adapter opts default complementary-area items into radios. Older hosts, older interface fills, and explicit checkbox overrides retain checkbox toggles. Generic plugin actions and links remain menu items. The interface package documents the selection behavior.
Use of AI Tools
Codex assisted with investigation, implementation, regression tests, verification, and this description.