-
Notifications
You must be signed in to change notification settings - Fork 115
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 overflow issue in ActionMenu #2383
Conversation
🦋 Changeset detectedLatest commit: a8b8ae0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Only thing I can think of is to write a new preview with a max height set and the menu open. Then we can pickup a screenshot of it through snapshot testing. I think that could be a followup later though! |
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.
Nice!
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.
Given this is a visual change it might be nice to add a snapshot to test the overflow bug.
Adding @snapshot interactive
to an appropriate preview should be all you need.
Other than that this LGTM
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 👍🏻
Authors: Please fill out this form carefully and completely.
Reviewers: By approving this Pull Request you are approving the code change, as well as its deployment and mitigation plans.
Please read this description carefully. If you feel there is anything unclear or missing, please ask for updates.
Reviewers: This PR is best viewed with whitespace changes hidden.
What are you trying to accomplish?
This PR updates the
ActionMenu
component to use theOverlay
component'sbody
slot, which will allow the menu to properly scroll its overflown contents.Thanks @langermank for help in solving this!
Screenshots
List the issues that this change affects.
Closes #2380
Risk Assessment
What approach did you choose and why?
Originally I intended to add customizable overflow options to
ActionMenu
, but @langermank helpfully pointed out that we can just make use of Overlay'sbody
slot which would give us the proper overflow behavior 🎉I couldn't think of a good way to write a test to cover overflow behavior in ActionMenu, I'm open to suggestions!
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.