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

refactor: use overlay-position-mixin with context-menu and menu-bar #2917

Merged
merged 15 commits into from
Nov 5, 2021

Conversation

tomivirkki
Copy link
Member

@tomivirkki tomivirkki commented Oct 23, 2021

This PR completes the planned overlay positioning refactor by removing internal logic from <vaadin-context-menu> and <vaadin-menu-bar> in favour of using the vaadin-overlay-position-mixin.

The change not only cleans up the codebase but also makes (re)positioning of nested menus more fluent and stable:

Before:

menu-overlay-positioning-before.mp4

After:

menu-overlay-positioning-after.mp4

Related #2497, #2510 and #2567

Copy link
Contributor

@sissbruecker sissbruecker left a comment

Choose a reason for hiding this comment

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

Sorry, not a very productive review on this one. It's hard to figure out what's going on without knowing the component better. I can mostly ask for clarifications. Maybe someone with more experience should take a second look.

packages/context-menu/src/vaadin-context-menu-overlay.js Outdated Show resolved Hide resolved
packages/context-menu/src/vaadin-context-menu.js Outdated Show resolved Hide resolved
packages/context-menu/src/vaadin-context-menu.js Outdated Show resolved Hide resolved
Copy link
Member

@web-padawan web-padawan left a comment

Choose a reason for hiding this comment

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

Some comments on the code expanding the ideas by @sissbruecker. I still have yet to test context-menu and menu-bar manually, maybe then I will have more ideas.

@sonarcloud
Copy link

sonarcloud bot commented Nov 5, 2021

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

Copy link
Member

@web-padawan web-padawan left a comment

Choose a reason for hiding this comment

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

Tested locally and everything works fine, and updated screenshots are actually correct 👍

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with platform 22.0.0.beta2 and is also targeting the upcoming stable 22.0.0 version.

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.

None yet

4 participants