-
Notifications
You must be signed in to change notification settings - Fork 647
Fix: ActionMenu with overflow doesn’t contain scrollbars within its rounded border #7046
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
Conversation
🦋 Changeset detectedLatest commit: 71218ce The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
|
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
|
With the same fix on copilot chat, it looks like this Before Screen.Recording.2025-10-14.at.3.01.30.pm.movAfter Screen.Recording.2025-10-14.at.3.02.03.pm.mov |
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.
Pull Request Overview
This PR fixes an issue where ActionMenu scrollbars extended beyond the component's rounded border by applying overflow and max-height styles to an inner container element rather than the Overlay itself. The solution moves these styling properties from the Overlay component to the ActionMenuContainer div, ensuring scrollbars remain within the bordered area.
Key changes:
- Added data attributes to ActionMenuContainer to conditionally apply overflow and max-height styles
- Introduced CSS rules that mirror Overlay's size tokens for consistent sizing behavior
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| packages/react/src/ActionMenu/ActionMenu.tsx | Added conditional data attributes to ActionMenuContainer for overflow and max-height props |
| packages/react/src/ActionMenu/ActionMenu.module.css | Added CSS rules for overflow variants and max-height size tokens matching Overlay sizes |
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/5137 |
|
🟢 ci completed with status |
|
@siddharthkp - These are the same changes as the previous PR. Somehow it wasn't creating an appropriate integration PR. But this one seems to work fine 👍 |
| "@primer/react": patch | ||
| --- | ||
|
|
||
| Fix: ActionMenu with overflow contains scrollbars within its rounded border |
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.
nit: we should say what the new state is
for example:
| Fix: ActionMenu with overflow contains scrollbars within its rounded border | |
| ActionMenu: Scrollbars no longer overflow outside the menu's rounded border |
Closes ##4938
Changelog
The fix is to have an element inside the Overlay that has overflow and max-height set to it.

This kind of works here. Not sure if there is a better way.
Rollout strategy
Testing & Reviewing
Merge checklist