-
Notifications
You must be signed in to change notification settings - Fork 727
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
MenuBarElement: looking up menu items by ID rather than by a caption #8186
Comments
From @vaadin-bot on December 1, 2015 13:5 Originally by @Legioth Depends on #3653 in the framework. |
Hi, any news about this problem? |
Hello there! It looks like this issue hasn't progressed lately. There are so many issues that we just can't deal them all within a reasonable timeframe. There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):
Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too! |
In our application we use FontIcons in front of the actual captions in the MenuItems. So it is even harder to identify those by captions. Would also very much like to see the ability to set IDs for the items inside the MenuBarElement. |
Moreover it would be useful if we could add/remove stylenames as in button component. |
Hello there! We are sorry that this issue hasn't progressed lately. We are prioritizing issues by severity and the number of customers we expect are experiencing this and haven't gotten around to fix this issue yet. There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):
Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too! |
Please do not stale this ... I think the suggestion to also add and remove stylenames might be good too. |
I think @Artur- was right labeling this as a bug. I just rold our customers "no problem you get the ID for automated UI tests in a second" and then realize that it is not supported. Realy? This is a bug not an enhancement. |
Menu items, do have generated id's. This PR modifies the component to set this id as DOM attribute to the element. This fix is not a perfect solution, but helps significantly testing of the MenuBar. Fixes: #8186
) Use generated IDs for MenuItems when an ID is set for MenuBar. Tying the ID to MenuBar's ID helps with the possible case of having multiple MenuBars on the same view and avoids to have excess id's when not needed. Fixes: #8186
) Use generated IDs for MenuItems when an ID is set for MenuBar. Tying the ID to MenuBar's ID helps with the possible case of having multiple MenuBars on the same view and avoids to have excess id's when not needed. Fixes: #8186
From Vaadin 8.12.1: if you set the MenuBar id, say "my-menu", the menu items will have generated id's "my-menu-1", "my-menu-2", ... |
From @vaadin-bot on December 1, 2015 11:24
Originally by mvysny2
Instead of finding menu items by caption, I would consider adding a support for menu items to have developer-defined string ID, and changing the API to looking up menu items by this ID. This also helps if the application may be localized, which causes menu items to different captions based on locale.
This would also solve https://dev.vaadin.com/ticket/16874
Imported from https://dev.vaadin.com/ issue #19327
Copied from original issue: vaadin/testbench#799
The text was updated successfully, but these errors were encountered: