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

Floating UI safePolygon for non-last MenuItems #2026

Merged
merged 7 commits into from
May 6, 2024

Conversation

r100-stack
Copy link
Member

@r100-stack r100-stack commented May 4, 2024

Changes

After PR TODO from #1942 (#1942 (comment)).

To make the safePolygon work for even the non-last MenuItems, looks like we needed to set blockPointerEvents: true. This PR makes that change.

This change is done in usePopover instead of MenuItem because MenuItem is the only component that has been using the hover trigger so far. So, making this change in usePopover is alright since it will not affect any other user component or our own internal component.

Additionally, to make it easier for users to hover over adjacent items instead of keeping the submenu open, requireIntent: false is removed (#2026 (comment)).

Testing

safePolygon works for non-last MenuItems too.

Screen-recordings

Before:

Enregistrement.de.l.ecran.2024-05-03.a.23.32.42.mov

After:

Enregistrement.de.l.ecran.2024-05-03.a.23.30.52.mov

Docs

Added changesets.

@r100-stack r100-stack self-assigned this May 4, 2024
@r100-stack r100-stack requested review from a team as code owners May 4, 2024 03:36
@r100-stack r100-stack requested review from mayank99 and Ben-Pusey-Bentley and removed request for a team May 4, 2024 03:36
@r100-stack r100-stack added the bug Something isn't working label May 6, 2024
@r100-stack r100-stack enabled auto-merge (squash) May 6, 2024 19:50
@r100-stack r100-stack merged commit 602a5d0 into main May 6, 2024
16 checks passed
@r100-stack r100-stack deleted the rohan/safepolygon-for-non-last-items branch May 6, 2024 19:51
@imodeljs-admin imodeljs-admin mentioned this pull request May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants