Hello,
I'm wondered about the remove of the MenuBar component. I used it for my navigation between the views in my UI. I need it because of sub MenuItems.
Would you reimplement it in Vaadin 10?
What are the reasons for the remove of the MenuBar?
Greetings!
One of the main reasons why a replacement for MenuBar hasn't been a high priority is that it's usually not a very mobile-friendly way of allowing navigation.
For simple cases, a more mobile-friendly approach is to use <vaadin-tabs> similarly to how it's used in our Bakery starter example or just some simple <div> with a little bit of CSS as in the Bewerage Buddy starter.
For more complex cases, a sidebar is usually preferable.
We do have plans for making Java integration for the drop-down-menu https://vaadin.com/components/vaadin-dropdown-menu/html-examples/dropdown-menu-basic-demos, but it does not support hierarchical displaying of data at the moment.
What are the reasons for the remove of the MenuBar?
For clarity, I want to emphasize that _we have not removed anything_, the framework and the component sets are totally new, we have just deemed MenuBar to not be a high priority for us to add at this point, or in the near future to be honest.
A better one, in my case, for the navigation would be the context-menu. Can you also add a Java integration for this one?
Yes, we are going to the Java API for vaadin-context-menu. I would hope to get it done quite soon after V10 GA release, but I can't give any promises.
FYI, on this topic there is this Forum thread and this Stack Overflow question.
Just an update, there is already a vaadin-context-menu version 1.0.0.alpha1 that is compatible with V10, but will not be added to the platform, so you need to declare it separately in your dependency management. We are doing some additional fixes to it, to make it work better with Grid and are then going to release 1.0.0.beta1 version of it.
Currently it looks like we'll have a stable ContextMenu component shipped in V11 in the beginning of September.
ContextMenu has been available since Vaadin 12, and hierarchy support for it is currently WIP for Vaadin 13.
The issue to follow for full MenuBar component is https://github.com/vaadin/vaadin-core/issues/208 but I'll keep this open for now for discoverability. The Menubar is targeted for Vaadin 14.
Menubar is available in Vaadin 14.
Most helpful comment
Yes, we are going to the Java API for
vaadin-context-menu. I would hope to get it done quite soon after V10 GA release, but I can't give any promises.