Replies: 1 comment 1 reply
-
Possibly a terrible idea, but sharing to rule it out if nothing else :) A spatially aware menu component, that utilises an ellipsis popover to contain the overflow: Yes, sometimes there would be dropdowns with a single item, but the benefit is that other actions remain a single click away. This could potentially work well if the order has some logic (most common actions listed first). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Splitting this out from #42555
In a few places in the Editor, a dropdown menu is used even when there's only one item in the dropdown. For example:
The template details popover:
The Templates list:
There's some agreement that this pattern is a bit frustrating, because it forces to unnecessarily click twice to access the only item available in the dropdown. Instead, when there's only one UI control, this should be immediately accessible to users and not buried down in a menu.
Generally, the. menu items are shown depending on some conditions. Actually, these menus may contain one or more items, depending on those conditions.
The
DropdownMenu
doesn't seem the most appropriate place to contain logic to count the number of items and show an alternative UI when there's only one item.Possible options that come into my mind:
Any thoughts welcome.
Cc @jameskoster @javierarce @talldan
Beta Was this translation helpful? Give feedback.
All reactions