chore: graduate primer_react_overlay_max_height_clamp_to_viewport#7733
chore: graduate primer_react_overlay_max_height_clamp_to_viewport#7733francinelucca wants to merge 4 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: b90c0ce 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 |
|
There was a problem hiding this comment.
Pull request overview
Removes the primer_react_overlay_max_height_clamp_to_viewport feature flag and makes viewport-clamped max-height behavior the default for Overlay and ActionMenu.
Changes:
- Removes the feature-flag gating and related
data-max-height-clamp-to-viewportattribute usage inOverlayandActionMenu. - Updates CSS so max-height size tokens use
min(<token>, 100dvh)by default. - Deletes the flag from
DefaultFeatureFlags.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/Overlay/Overlay.tsx | Removes feature-flag logic and stops conditionally adding the clamp data attribute |
| packages/react/src/Overlay/Overlay.module.css | Makes viewport clamping the default for max-height size tokens |
| packages/react/src/FeatureFlags/DefaultFeatureFlags.ts | Removes the graduated feature flag from defaults |
| packages/react/src/ActionMenu/ActionMenu.tsx | Removes feature-flag logic and stops conditionally adding the clamp data attribute |
| packages/react/src/ActionMenu/ActionMenu.module.css | Makes viewport clamping the default for max-height size tokens |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 3
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
Agent-Logs-Url: https://github.com/primer/react/sessions/63c4dcf7-79fd-4d70-83db-9b7507eeb6f5 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/18054 |
|
Integration test results from github/github-ui:
CI check runs linting, type checking, and unit tests. Check the workflow logs for specific failures. VRT check ensures that when visual differences are detected, the PR cannot proceed until someone acknowledges the changes by adding the "visual difference acknowledged" label. Need help? If you believe this failure is unrelated to your changes, please reach out to the Primer team for assistance. |
This pull request removes the feature flag controlling the "max-height clamp to viewport" behavior for overlays and action menus, making the viewport-clamped max-height the default. Now, all overlays and action menus will have their max-height restricted to the viewport without needing a feature flag.
Max-height size token rules use
min(Xpx, 100vh)as the default fallback for browsers that don't support dynamic viewport units, and progressively enhance tomin(Xpx, 100dvh)via@supports (height: 100dvh)in supporting browsers.Changelog
New
Changed
Overlay.module.cssandActionMenu.module.cssnow usemin(Xpx, 100vh)as a fallback, with@supports (height: 100dvh)overriding tomin(Xpx, 100dvh)for browsers that support dynamic viewport unitsRemoved
primer_react_overlay_max_height_clamp_to_viewportFF and associated codeRollout strategy
Testing & Reviewing
Merge checklist