-
Notifications
You must be signed in to change notification settings - Fork 650
Fix PageLayout horizontal overflow by constraining ContentWrapper width #7501
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: 0e56f75 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 |
…apper Co-authored-by: TylerJDev <26746305+TylerJDev@users.noreply.github.com>
Co-authored-by: TylerJDev <26746305+TylerJDev@users.noreply.github.com>
|
👋 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 |
|
@copilot, can you add a changeset (patch) and also run format (i.e. |
Co-authored-by: TylerJDev <26746305+TylerJDev@users.noreply.github.com>
|
@copilot, can you remove the |
Co-authored-by: TylerJDev <26746305+TylerJDev@users.noreply.github.com>
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/12644 |
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
Fixes PageLayout horizontal overflow by ensuring the content region’s wrapper is explicitly constrained to the available width, preventing wide children from expanding layout bounds.
Changes:
- Add
width: 100%to.ContentWrapperinPageLayout.module.cssto constrain content sizing within flex layout. - Add a changeset to ship the fix as a patch.
- Update
package-lock.jsonto reflect@primer/react38.9.0references.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/react/src/PageLayout/PageLayout.module.css | Constrains PageLayout.Content wrapper width to prevent horizontal overflow from wide children. |
| package-lock.json | Updates locked @primer/react version references to 38.9.0. |
| .changeset/fix-pagelayout-overflow.md | Declares a patch release for the overflow fix. |
|
No visual changes detected 🎉 https://github.com/github/github-ui/actions/runs/21647724679/job/62404317608?pr=12644 |
Closes https://github.com/github/primer/issues/6360
Content within
PageLayoutwas expanding beyond component boundaries, causing horizontal overflow. The.ContentWrapperusesflex-basis: 0withflex-grow: 1but lacked an explicit width constraint, allowing children (wide tables, code blocks, long text) to ignore flex sizing.Changes
Added
width: 100%to.ContentWrapperinPageLayout.module.css. This constrains child content while preserving all flexbox behavior.Changelog
Changed
.ContentWrappernow explicitly constrains width to prevent horizontal overflowRollout strategy
CSS-only change, no API modifications. Backwards compatible. Includes changeset for automated version management.
Testing & Reviewing
All 17 PageLayout unit tests pass. Verify VRTs in CI, particularly:
Merge checklist
Original prompt
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.