chore: ensure max-height does not surpass viewport height in Overlay, ActionMenu#7510
chore: ensure max-height does not surpass viewport height in Overlay, ActionMenu#7510francinelucca wants to merge 11 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: bb352c8 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 |
|
👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Or, apply the |
Ensure that the max-height of Overlay and ActionMenu does not exceed the viewport height.
…eact into chore/fix-max-height-attributes
There was a problem hiding this comment.
Pull request overview
This PR updates overlay-like components in @primer/react to ensure their max-height constraints don’t exceed the viewport, and adds a Storybook example demonstrating scrollable overlay content when a max-height is applied.
Changes:
- Update
OverlayandActionMenumax-height size tokens to clamp against the viewport height. - Add a new
Overlayfeatures story demonstratingmaxHeight+ scrollable content. - Add story-only CSS for the new example’s layout.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/react/src/Overlay/Overlay.module.css | Clamp max-height size tokens against viewport height. |
| packages/react/src/ActionMenu/ActionMenu.module.css | Clamp ActionMenu container max-height size tokens against viewport height. |
| packages/react/src/Overlay/Overlay.features.stories.tsx | Add “SettingMaxHeight” Storybook example showcasing scrollable overlay content. |
| packages/react/src/Overlay/Overlay.features.stories.module.css | Add styles for the new scrollable-content story layout. |
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@francinelucca I've opened a new pull request, #7519, to work on those changes. Once the pull request is ready, I'll request review from you. |
…iewport handling (#7519) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: francinelucca <40550942+francinelucca@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@francinelucca I've opened a new pull request, #7522, to work on those changes. Once the pull request is ready, I'll request review from you. |
… support (#7522) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: francinelucca <40550942+francinelucca@users.noreply.github.com>
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/13615 |
This pull request improves the handling of maximum height for overlays and action menus, ensuring they never exceed the viewport height and remain usable on smaller screens. It also introduces a new story example demonstrating scrollable overlay content when the maximum height is reached.
Changelog
New
Changed
Rollout strategy
Testing & Reviewing
Merge checklist