web-components icon indicating copy to clipboard operation
web-components copied to clipboard

[menu-bar] Add possibility to mark some items as "pinned" so they are not collapsed into overlay

Open lipisak opened this issue 2 years ago • 5 comments

Describe your motivation

In some cases I would like to mark some menu items as pinned that would help to mark the items that are important and should not be hidden at any circumstance (ie. edit action, close detail action etc.). Of course I can sort the items so the most important are at the beginning (or end - depends on where the menubar is aligned horizontally), but it doesn't ensures this behaviot

Describe the solution you'd like

Add an API (for web-component and flow component) that would allow to "stick/pin" selected items that would never collapse to overlay.

Describe alternatives you've considered

No response

Additional context

No response

lipisak avatar Oct 24 '23 09:10 lipisak

Dear @lipisak, would setting min-width (.setMinWidth(...)) be sufficient to resolve this use-case?

yuriy-fix avatar Oct 25 '23 12:10 yuriy-fix

Dear @yuriy-fix I am not sure, as I would have to manage the exact order of items (put the ones that should stay visible as last). It could the job in some cases but it's kind a "workaround" approach to it.

lipisak avatar Oct 25 '23 13:10 lipisak

Another related use case that a customer brought up is having the most important items aligned to right. In such case it would be useful to "pin" the most important items. An alternative could be a mode that changes the overflowing logic to collapse items from beginning instead of end.

RTL mode could be used, but it will flip the whole presentation of the component. Focus starting from last item is a bit unconventional.

juuso-vaadin avatar Jan 11 '24 09:01 juuso-vaadin

An alternative could be a mode that changes the overflowing logic to collapse items from beginning instead of end.

This will be released in V24.4 https://github.com/vaadin/platform/issues/5018

juuso-vaadin avatar Apr 18 '24 08:04 juuso-vaadin

Hello, yes I've seen that and it's great. The only issue I see in is that the overflow menu remains on right side. It would be great if there is the overflow menu on the left and other items that were not "hidden" remains on the right side of overflow menu. I discussed this in the mentioned issue.

lipisak avatar Apr 18 '24 08:04 lipisak