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! |
keithamus
left a comment
There was a problem hiding this comment.
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
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
ActionMenucomponent to use theOverlaycomponent'sbodyslot, 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'sbodyslot 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.