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. 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: +14.6 kB (+0.16%) Total Size: 9.06 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. Regression: updating a specific option will only change its value and will not corrupt others in
|
mirka
left a comment
There was a problem hiding this comment.
The current "pressed" styling is way too heavy, no?
My sense is that it's too early to try and create horizontal support for the entire Menu component. The reactions menu is likely a pretty special case. And even if it isn't, we don't know exactly what the other use cases are going to need.
I would lean toward keeping it a one-off and not try to absorb it into the wp-ui Menu until we have more use cases.
Given that those are technically checkbox (or radio) items, I didn't know how to otherwise signal that they're "checked" 🤔 It's definitely a design challenge, on top of what's being discussed in #80405
That was my gut instinct, too, as I mentioned in #85222 (comment) and following. That's why I had originally suggested that the "app code" uses Base UI directly and composes it with other existing I'm also on the fence on whether this is a good enough abstraction for all "horizontal menus"; potentially, we may want to eventually create a separate "reaction menu" higher-level component?
That depends on the app logic, ie whether a user can leave more than one reaction on the same "item" — checkbox (and therefore multple selection) if the answer is "yes", radio (and single selection) if the answer is "no" |
|
It seems this isn't something we would like to rush and ship during 7.2 beta, am I correct? |
|
No, but I'm not even sure that it's something we'd like to ship in its current form in general. The Emoji Picker seems enough of a special case that we may want to create a separate high-level component with its own style exceptions compared to |
|
That makes sense. Especially if we decide to ship the full pick on 7.3. Based on that, maybe it's better to ship minimal changes from #85566. Needs some polishing, but it can work as a beta/RC cycle fix. |
See #85222.
What?
Add
orientation="horizontal"toMenu.Rootand a compact horizontal action menu example in Storybook.Why?
Give reaction pickers a compact row while retaining Menu's semantics and keyboard behavior.
How?
Use neutral highlights and a pressed appearance for checked items, without checkmarks. Scope vertical alignment grids to vertical menus. Use horizontal menus for flat icon or emoji actions, and vertical menus for rich content and submenus.
Testing Instructions
npm run storybook:devand open Menu → Compact horizontal action menu.Testing Instructions for Keyboard
rto focus Rocket. In RTL, Left Arrow advances through the row. Keyboard focus should have a separate outline.Screenshots or screencast
Standalone Storybook at
6ac996e47b0, with Heart checked and Rocket focused. Viewport: 360 × 180.Use of AI Tools
Implementation, tests, screenshots, and description prepared with Codex.