Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MenuBar: support for reverse collapsing order #5018

Closed
7 of 10 tasks
rolfsmeds opened this issue Feb 8, 2024 · 6 comments
Closed
7 of 10 tasks

MenuBar: support for reverse collapsing order #5018

rolfsmeds opened this issue Feb 8, 2024 · 6 comments
Labels
acceptance criteria used for the acceptance criteria checklist DS Design System feature (e.g. component) v24.4

Comments

@rolfsmeds
Copy link
Collaborator

rolfsmeds commented Feb 8, 2024

Description

An option to have Menu Bar buttons collapse into the overflow menu starting from the left (start) end of the bar instead of the right (end) end of the bar.

Use cases

As a user
I want the rightmost buttons in a menubar to stay visible as long as possible, because they're the most important ones
So that I can find and use them easily

Acceptance criteria

  • Flow API for toggling the mode, e.g. MenuBar:setReverseCollapseOrder(boolean)
  • WC/React API for toggling the mode, e.g. <vaadin-menu-bar reverse-collapse ...>
  • When the mode is enabled, MenuBarButtons collapse into the overflow menu starting from the START end of the bar.
  • The overflow menu itself is at the END end of the bar regardless of mode.

General criteria

  • APIs reviewed
  • UX/DX tests in Alpha
  • Limitations:

Security

  • Security implications have been taken into account (elaborate or link to product security requirement specification if there are implications)
@rolfsmeds rolfsmeds added acceptance criteria used for the acceptance criteria checklist DS Design System feature (e.g. component) labels Feb 8, 2024
@rolfsmeds rolfsmeds added this to Roadmap Feb 8, 2024
@github-project-automation github-project-automation bot moved this to Under consideration in Roadmap Feb 8, 2024
@rolfsmeds rolfsmeds moved this from Under consideration to March 2024 in Roadmap Feb 8, 2024
@tomivirkki
Copy link
Member

Just to clarify, if you set the menubar items as:

menuBar.items = [
  { text: 'First' },
  { text: 'Second' },
  { text: 'Third' },
  { text: 'Fourth' },
  { text: 'Fifth' }];

should reverseCollapse keep the current item ordering:

keep-items-order.mp4

...or reverse it also:

reverse-items-order.mp4

@rolfsmeds
Copy link
Collaborator Author

Keep the current ordering of items.

@lipisak
Copy link

lipisak commented Feb 14, 2024

Hello,
Wouldn't it be better to have the overflow menu on the other side of menu? If you colapse the leftmost items to the overflow menu that is on the "end" side, it could be confusing.
We use the menu on the top right of item detail and one of "actions" is Close cross. With your proposal the Cross would be the one before the last because of the overflow menu which appears next to it on the right side.
JS

@rolfsmeds
Copy link
Collaborator Author

Hi @lipisak. It depends a lot on your use case. I agree that if your rightmost item is Close / X, then it would be better to have the overflow menu on the left. However, in other use cases it makes more sense on the right, as that is where you would typically have your "miscellaneous" functions.

If you have one item in the menu that should never collapse (as I suspect is the case with the close button), I would propose having that as a separate button next to the MenuBar instead.

So while we could support having the overflow menu on the left, that would be a separate feature. Feel free to make a ticket about that.

@lipisak
Copy link

lipisak commented Feb 15, 2024

Hi @rolfsmeds,
I guess we discussed this feature in Frankfurt on Vaadin event 🙂

My opinion in this is: put the overflow menu on that side from which you "remove" the items....
Close action was just an example. What I tried to suggest was that it could be confusing that there are item on the "left side" that are disappearing and the "Show more" menu is on the other side.
I also understand your opinion on this.
Actually my example is valid only in case the menu is on the right side of the screen. So I guess there could be also API to define placement of the overflow. Let's say:

menu.setOverflowPosition(BEGIN/END)

This API could be RTL/LTR specific as each of these settings takes BEGIN/END differently.
I suggest this change here because you are changing menu bar and this is very related to the change you are making and I guess I am not alone who would appreciate this and if I raise issue for this in your GitHub it could take long time before you get to it - but you are considering to make changes in menu bar now 🙂
I hope you understand why my motivation about add my suggestion to this "pack of changes".

Thank you
JS

@rolfsmeds
Copy link
Collaborator Author

@lipisak I think we did discuss this in Frankfurt, yes! And I do agree that it would also be useful to be able to set the position of the overflow menu. However, this was built as a sponsored feature with a specific, fixed scope, so the overflow position will need to be done separately. Here's a ticket for it: vaadin/web-components#7130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acceptance criteria used for the acceptance criteria checklist DS Design System feature (e.g. component) v24.4
Projects
Status: June 2024 (24.4) - Released
Development

No branches or pull requests

4 participants