Conversation
|
Size Change: +129 B (+0.01%) Total Size: 2.58 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 6386cd4. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19499319480
|
| align-items: center; | ||
| box-sizing: border-box; | ||
| padding: 6px 12px; | ||
| padding: 4px 12px; // Allows 32px min-height. |
There was a problem hiding this comment.
This can appear a sensitive change due to how high level and generic this is, so please give it any attention you feel is necessary. But I think it may not be as controversial after all. The height of the button is based on a default icon size of 24px, and then with padding to make the button have its previously-default height of 36px. The math checks out: 24 + 6 + 6 = 36. This is already paired with height: $button-size, where $button-size === 36.
Which means that even if we apply size="compact", which should make the button 32px tall, it still is 36px tall, because 24+6+6 forces it that way. By changing this padding to 4px, we now allow the button to be just 32px tall, but past default buttons should still be 36px tall because the $button-size still maintains that.
Let me know if this logic makes sense.
|
Denser menus seem worth trying. Should we update the newer |
|
It looks great. Nice improvement ✨ |
|
Not something to solve here, but since it could help inform our direction towards density as an aspect of theming (#73215) I'm curious about any expectations with regards to how |
|
I think there are valid use cases, but they are probably somewhat exotic at this point, so I'd veer towards solving that problem at a later time. And in the mean time just be aware, perhaps. I'm having to shift gears to some writing tasks at the moment, so it's unlikely I'll be able to address the good feedback already shared today. If you're antsy, feel free to push directly, otherwise I'll come back to this as soon as I can. |
|
I agree this is a good case for the new density theming. While |
|
That probably suggests the move toward @jasmussen I think we should update |
|
Okay, I believe I've updated the Menu component correctly now, but since that's using a particular setup, I would really appreciate some extra eyes on my last commit, and if something is off, feel free to push. Other than that, this one is ready for a final review, and then I can start updating changelogs. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If 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. |
|
I have an ever so slight preference for what exists, but it's not at all a strong opinion, and if you prefer the rightmost one, feel free to push it. |
|
No preference really :) |
73d6544 to
198792c
Compare
|
Okay, I rebased, updated the snapshots and the changelog. Assuming things'll be green soon, would anyone like to give it a final check and perhaps a ✅? |
|
Maybe this could be the start of making everything mode condensed :P |
|
@WordPress/gutenberg-design How are we liking this compact item design? If we're moving forward with it, do I understand correctly that we want the default item heights for Select and Combobox popovers to be compact as well? |
|
I like this 32px design for menu items, especially because it helps substantially the density in those contexts. I still think it's useful to have both 40 and 32px sizes for most controls, and that 40px is a useful default. ComboboxControl items are already 32px though, aren't they?
But yes, it makes sense to unify on that density for things like that, which feel very related to menus. |
|
+1 to aligning around 32px item height in popovers. |
|
+1 to 32px |
|
Follow-up question. Assuming we set the default to 32px, should we then either:
I'm slightly leaning towards 2, but 1 may also make sense if we anticipate a lot of images in dropdown items. |
|
I'm drawn to keep the 40px height. There may be use cases we haven’t considered yet where the 8x scale will be necessary to avoid inconsistencies in the spacing approach. |
|
A common item design pattern is thumbnail + label + description. Fitting this into 40px is quite tricky. As an example, in the mockup below each item is 56px tall:
That said, 40px works reasonably well for simpler versions (thumbnail + label):
I think it might be good if sizes were informed by patterns like this rather than arbitrarily. |
That makes sense. So maybe like, remove the 40px item height variant, and keep a single 32px min-height item. And for more content-rich use cases, we'll have standard patterns that will render at appropriate heights, adhering to the grid. |
|
Just to be sure, this doesn't mean we revert this initial PR does it? I still think it's super valuable that most of the regular menu items, like the one shown in OP, is compact and dense so you don't have to scroll kebab menus on laptops. |
Right, we're not going to revert. In fact we'll apply the change to more components (selects and comboboxes, not just menus). 32px will be the default for simple items. |







What?
Menus are getting slightly long as we are adding features:
Aside careful curation of items, as well as future grouping in flyouts, part of the reason they go long (and therefore occasionally have to scroll, or open upwards instead of downwards), is that all menu items are the default 40px size.
This PR proposes changing all menu items to be 32px by default.
Why?
It makes menu items far more compact, yet still comfortable in density.
Screenshots:
Testing Instructions
Check out the branch, then test: