-
Notifications
You must be signed in to change notification settings - Fork 66
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
feat: allow theming individual menu items #2066
Conversation
Some concerns:
|
Note that this PR depends on vaadin/web-components#2401 |
b89de56
to
0aba36b
Compare
This change enables theming individual menu bar items, for example to display one item as the primary item. As the menu bar uses the context menu to display submenus, most of the changes are in there.
43a8794
to
9b8aa0c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yuriy-fix My concern here is that this custom implementation of the theming API differs from the custom one we already have in MessageListItem
(see here):
- here we implement the
setThemeName
andgetThemeName
fromHasTheme
- in MessageListItem we implement
addThemeNames
,removeThemeNames
, andhasThemeName
fromHasTheme
Personally I think we should align this:
- we already have quite a few DX issues with differing APIs in Flow components
- here we have a chance to improve on that with just a little bit more effort, and taking a little bit more time
- once we introduce an API it becomes a pain to change it, customers will be angry
Since MessageListItem already has a stable API, it would be much easier to change the API in this PR, so I would suggest to do that.
2a927a7
to
f7037c5
Compare
SonarQube analysis reported 21 issues Top 10 issues
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Just one thing to verify: I assume that the menu bar theme variants can only be applied to root items / buttons, and not to sub items showing up in the context menu - at least the latter did not work from my testing.
This ticket/PR has been released with platform 22.0.0.alpha5 and is also targeting the upcoming stable 22.0.0 version. |
This change enables theming individual menu bar items, for example to display one item as the primary item. As the menu bar uses the context menu to display submenus, most of the changes are in there. * feat: allow theming individual menu items Backported changes for Vaadin 14 from vaadin/web-components#2066. Depends on vaadin/vaadin-menu-bar#140. Part of #880. * Bump vaadin-context-menu 4.6.0-alpha1 and vaadin-menu-bar 1.3.0-alpha1
This change enables theming individual menu bar items, for example to display one item as the primary item. As the menu bar uses the context menu to display submenus, most of the changes are in there.
Depends on vaadin/web-components#2401
Part of #880
Type of change
Checklist
Additional for
Feature
type of change