vaadin / flow

Vaadin Flow is a Java framework binding Vaadin web components to Java. This is part of Vaadin 10+.
Apache License 2.0
618 stars 167 forks source link

MenuRegistry should have method to get List of ordered menu items #19905

Closed caalador closed 1 month ago

caalador commented 2 months ago

MenuRegistry should have a method to get the available menu items as a list that is ordered instead of getting only the current Map<String, AvailableViewInfo>.

This would mean that the list would be List<AvaiableViewInfo> and that the route in the AvailableViewInfo should be fixed so it is the correct route and not only the view route for client routes.

Ordering would be done according to the AvailableViewInfo.Menu.order and/or alphabetically using Collator.getInstance() to get the same result as Hilla menu ordering

Legioth commented 2 months ago

Ordering would be done according to the AvailableViewInfo.Menu.order or alphabetically?

Same ordering as the corresponding Hilla API. First order by the order property and then resolve ties by the alphabetic order of the route paths.

vaadin-bot commented 3 weeks ago

This ticket/PR has been released with Vaadin 24.5.0.