Repository navigation
Menu: Align group labels and separators with indented item labels. - #83993
Conversation
When a radio or checkbox column shifts item labels, headings and dividers follow that same inset so the menu reads as one column. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.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. Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: +328 B (0%) 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
|
|
Seems a good small step. One thing I'd love is to make the icons smaller, and to make the reserved space/indentation on the left smaller too. Not in this branch, but is that feasible now we have stroke icons? |
|
Here my thoughts:
But how is it recognizable before interacting which options are single-select or multi-select? To me, this is the main problem, and the check or dot visual language is already used in checkboxes and radio buttons, so there is nothing new to learn.
I was thinking about this too. I don’t dislike the all caps version, but as part of the practices, we need to avoid using it because menus are contextual to the element that triggered them. The ellipsis menu in the Editor is trickier because it gathers different types of actions, but in most cases, the options displayed are already contextualized. IE, the ellipsis menu of a block in the ListView sidebar. In addition to the above, I was thinking about using icons to highlight certain items. In the Editor’s options menu, showing an icon for the “Style” item makes sense, as it’s a section some users might not be aware of, but “Export” seems unnecessary, as the action is widely understood and the help text clearly explains what it does.
The rule that makes sense there is to show an icon on all group items if one item shows it. |
I think this doc is how most libraries or guidelines communicate similar requirements. "Yes, you can, but we recommend against it since it will look bad." Warnings add extra complexity and could also be ignored by consumers. |
|
I opened #84015 stacked on top of this PR to work on spacing around checkbox/radio and prefix icon sizing. I will also open a separate PR soon to test the "checkmark for radio items" change. |
ciampo
left a comment
There was a problem hiding this comment.
I think this is an improvement over what we have on trunk 🚀
Implementation is clean and reuses current grid tracks
Implementation suggestionsI acknowledge the lack of control over what others can do, my suggestion points to the default system and the patterns we can document for designing menus. In that vein, the design itself suggests a preferred outcome, as showing just one icon adds empty space for the whole group and breaks the layout. Removing the icon in Export fixes that unnecessary indentation. So the "Yes, you can, but we recommend against it since it will look bad” sounds good to me. Checkmark or notI trust you all instincts in using checkmark as a single language, I’m mainly concern of cases where both single- and multi-selection are side by side, but that can also be addressed by putting these elements inside submenus. In that vein, given the extender’s flexibility and adaptability, can it automatically generate a menu instead of creating a set menu when only one item exists? A submenu with a single option is not a good decision. I haven’t looked at #82974 where this work happened.
Design ideaHere is an idea that involves all points mentioned by @jameskoster here
And here adapted to the current Editor's options menu in 7.1
Design |
|
I'm going to merge this, let's continue to discuss the other details elsewhere. |
…ordPress#83993) Co-authored-by: jameskoster <jameskoster@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: fcoveram <fcoveram@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Need to double-check the internals, but I think that should be possible. I'll have a look on Monday. |
|
Trying an approach in #84033, which also adds an Inspector panel entry |













Follow-up to #81564.
What?
Align
Menugroup labels and separators with item labels when a radio or checkbox column indents those labels.Why?
A radio or checkbox reserves a column for the whole menu, so every item label shifts right. Group headings and dividers kept the original inset, which left them sitting to the left of the text and made the menu harder to scan.
How?
Group labels and separators now start after the shared selection track and end with the item content column. Prefix icons stay in their own per-group column, so an icon in one group does not shift headings and dividers in the rest of the menu.
--wp-ui-menu-group-head-padding-inlinestill nudges both edges; its default adds no extra offset.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Use of AI Tools
Cursor (Grok 4.7) assisted with the implementation. The change was reviewed before commit.