Skip to content

Conversation

@pksjce
Copy link
Contributor

@pksjce pksjce commented Oct 21, 2025

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.
Screenshot 2025-10-10 at 10 35 43 pm

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

Copilot AI review requested due to automatic review settings October 21, 2025 05:20
@pksjce pksjce requested a review from a team as a code owner October 21, 2025 05:20
@pksjce pksjce requested a review from siddharthkp October 21, 2025 05:20
@changeset-bot
Copy link

changeset-bot bot commented Oct 21, 2025

🦋 Changeset detected

Latest commit: 71218ce

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@primer/react Patch
@primer/styled-react Patch

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

@primer primer deleted a comment from github-actions bot Oct 21, 2025
@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Oct 21, 2025
@github-actions
Copy link
Contributor

👋 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!

@pksjce
Copy link
Contributor Author

pksjce commented Oct 21, 2025

With the same fix on copilot chat, it looks like this

Before

Screen.Recording.2025-10-14.at.3.01.30.pm.mov

After

Screen.Recording.2025-10-14.at.3.02.03.pm.mov

Copy link
Contributor

Copilot AI left a 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

@primer-integration
Copy link

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/5137

@primer-integration
Copy link

🟢 ci completed with status success.

@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 21, 2025
@pksjce pksjce self-assigned this Oct 21, 2025
@pksjce
Copy link
Contributor Author

pksjce commented Oct 21, 2025

@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
Copy link
Member

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:

Suggested change
Fix: ActionMenu with overflow contains scrollbars within its rounded border
ActionMenu: Scrollbars no longer overflow outside the menu's rounded border

@pksjce pksjce added this pull request to the merge queue Oct 21, 2025
Merged via the queue into main with commit 4ffe66d Oct 21, 2025
43 checks passed
@pksjce pksjce deleted the pk/action-menu-scrollbars branch October 21, 2025 23:07
@primer primer bot mentioned this pull request Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants