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

fix: do not remove menu item component theme #3459

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

web-padawan
Copy link
Member

@web-padawan web-padawan commented Feb 17, 2022

Description

The theme feature (#2401) introduced a regression: removal of the theme attribute set on the item.component.
This PR checks if the component already has a theme to make sure it's preserved.

Fixes vaadin/flow-components#2559

Type of change

  • Bugfix

},
{ text: 'foo-1' }
];
open();
await nextFrame();
await nextRender();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to use nextRender() which seems to be needed to make all the nested menus rendered properly when debugging (otherwise the elements are in the DOM but not visible).

@@ -567,7 +579,7 @@ describe('items', () => {
});
});

it('should override the component theme with the item theme', async () => {
it('should override the host theme with the item theme', async () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to use host which better describes the actual behavior.

@sonarcloud
Copy link

sonarcloud bot commented Feb 17, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@web-padawan web-padawan merged commit fc67eeb into master Feb 17, 2022
@web-padawan web-padawan deleted the fix/menu-component-theme branch February 17, 2022 10:46
web-padawan added a commit that referenced this pull request Feb 17, 2022
Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Theme-Variants (padding, spacing) not added to element on frontend
3 participants