Skip to content

chore: feature flag Overlay and ActionMenu max-height viewport clamping#7679

Merged
francinelucca merged 4 commits intochore/fix-max-height-attributesfrom
copilot/sub-pr-7510
Mar 18, 2026
Merged

chore: feature flag Overlay and ActionMenu max-height viewport clamping#7679
francinelucca merged 4 commits intochore/fix-max-height-attributesfrom
copilot/sub-pr-7510

Conversation

Copy link
Contributor

Copilot AI commented Mar 18, 2026

Gates the min(Xpx, 100dvh) max-height behavior for Overlay and ActionMenu behind a single shared feature flag.

Changelog

New

  • Feature flag primer_react_overlay_max_height_clamp_to_viewport (default false) in DefaultFeatureFlags.ts — controls viewport-clamped max-height for both Overlay and ActionMenu

Changed

  • Overlay.module.css: max-height size tokens revert to fixed px values; viewport-clamped variants (min(Xpx, 100dvh)) now only apply when [data-max-height-clamp-to-viewport] is present
  • Overlay.tsx: reads primer_react_overlay_max_height_clamp_to_viewport and conditionally sets data-max-height-clamp-to-viewport on the overlay element
  • ActionMenu.tsx: updated to use primer_react_overlay_max_height_clamp_to_viewport (same shared flag as Overlay)

Removed

  • primer_react_action_menu_max_height_clamp_to_viewport feature flag — replaced by the shared primer_react_overlay_max_height_clamp_to_viewport flag

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

Enable primer_react_overlay_max_height_clamp_to_viewport via FeatureFlags and verify that both overlays and action menus with a maxHeight prop clamp correctly against the viewport on narrow screens.

Merge checklist


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

@changeset-bot
Copy link

changeset-bot bot commented Mar 18, 2026

⚠️ No Changeset found

Latest commit: 65c1434

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Co-authored-by: francinelucca <40550942+francinelucca@users.noreply.github.com>
Copilot AI changed the title [WIP] [IMPROV-101] Ensure max-height does not surpass viewport height in Overlay, ActionMenu chore: feature flag Overlay max-height viewport clamping Mar 18, 2026
Copilot AI requested a review from francinelucca March 18, 2026 18:30
@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 Mar 18, 2026
@github-actions
Copy link
Contributor

⚠️ Action required

👋 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. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

@github-actions github-actions bot requested a deployment to storybook-preview-7679 March 18, 2026 22:05 Abandoned
@francinelucca
Copy link
Member

@copilot delete primer_react_action_menu_max_height_clamp_to_viewport and use primer_react_overlay_max_height_clamp_to_viewport instead for both implementations

…verlay_max_height_clamp_to_viewport

Co-authored-by: francinelucca <40550942+francinelucca@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 18, 2026

@copilot delete primer_react_action_menu_max_height_clamp_to_viewport and use primer_react_overlay_max_height_clamp_to_viewport instead for both implementations

Done in 65c1434. Removed primer_react_action_menu_max_height_clamp_to_viewport from DefaultFeatureFlags.ts and updated ActionMenu.tsx to use primer_react_overlay_max_height_clamp_to_viewport, so a single flag now controls viewport-clamped max-height for both components.

Copilot AI changed the title chore: feature flag Overlay max-height viewport clamping chore: feature flag Overlay and ActionMenu max-height viewport clamping Mar 18, 2026
@francinelucca francinelucca added skip changeset This change does not need a changelog integration-tests: skipped manually Changes in this PR do not require an integration test labels Mar 18, 2026
@francinelucca francinelucca marked this pull request as ready for review March 18, 2026 22:29
@francinelucca francinelucca requested a review from a team as a code owner March 18, 2026 22:29
@francinelucca francinelucca merged commit adeb242 into chore/fix-max-height-attributes Mar 18, 2026
46 of 47 checks passed
@francinelucca francinelucca deleted the copilot/sub-pr-7510 branch March 18, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm integration-tests: skipped manually Changes in this PR do not require an integration test skip changeset This change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants