Repository navigation
update PageLayout to respect Sidebar padding - #8801
Conversation
|
There was a problem hiding this comment.
🟡 Changes recommended
The consumer-facing Sidebar padding fix lacks an @primer/react patch changeset, so release tooling will not record it in the package changelog.
1 open issue
What changed in this PR
Fixes #8470 by making PageLayout.Sidebar honor its existing padding prop, consistent with other PageLayout regions.
Changes:
- Applies the Sidebar’s spacing variable as CSS padding.
- Adds regression tests for condensed and normal Sidebar padding when the parent layout has no padding.
| File | Description |
|---|---|
packages/react/src/PageLayout/PageLayout.test.tsx |
Verifies computed Sidebar padding for both nonzero padding options. |
packages/react/src/PageLayout/PageLayout.module.css |
Applies the configured spacing as Sidebar padding. |
Review effort: Balanced
| width: var(--pane-width-size); | ||
| height: 100%; | ||
| /* stylelint-disable-next-line primer/spacing */ | ||
| padding: var(--spacing); |
🦋 Changeset detectedLatest commit: 3fdc754 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 |
|
Integration test results from github/github-ui PR: |

Closes #8470
PageLayout.Sidebaralready maps itspaddingprop to--spacing, but its CSS never applies that value. Apply it as padding, matching the other PageLayout regions.Changelog
Changed
PageLayout.Sidebarnow respects itspaddingprop.Rollout strategy
Testing & Reviewing
Verified in
PageLayoutSidebar Startstory by temporarily addingpadding="condensed"and comparing it to the story in prod.