Skip to content

update PageLayout to respect Sidebar padding - #8801

Merged
llastflowers merged 4 commits into
mainfrom
fix/sidebar-padding
Nov 19, 2026
Merged

llastflowers merged 4 commits into
mainfrom
fix/sidebar-padding

Conversation

@llastflowers

@llastflowers llastflowers commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Closes #8470

PageLayout.Sidebar already maps its padding prop to --spacing, but its CSS never applies that value. Apply it as padding, matching the other PageLayout regions.

Changelog

Changed

  • PageLayout.Sidebar now respects its padding prop.

Rollout strategy

  • Patch release
  • Minor release
  • Major release
  • None

Testing & Reviewing

Verified in PageLayout Sidebar Start story by temporarily adding padding="condensed" and comparing it to the story in prod.

@llastflowers
llastflowers requested a review from a team as a code owner November 19, 2026 18:16
@llastflowers
llastflowers requested review from joshblack and a balanced review from Copilot November 19, 2026 18:16
@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 Nov 19, 2026
@github-actions

Copy link
Copy Markdown
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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);

@joshblack joshblack left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just wanted to +1 the review comment for the patch changeset 👀 Would it also be worth adding VRT for this or nah? Ah looks like it might already be covered, ignore this lol

@changeset-bot

changeset-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3fdc754

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

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

@primer-integration

primer-integration Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Integration test results from github/github-ui PR:

Running  Changes   Running
Passed  CI   Passed
Passed  VRT   Passed
Passed  Projects   Passed

@llastflowers llastflowers changed the title fix(PageLayout): respect Sidebar padding update PageLayout to respect Sidebar padding Nov 19, 2026
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8801 November 19, 2026 20:13 Inactive
@llastflowers llastflowers added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh integration-tests: skipped manually Changes in this PR do not require an integration test and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Nov 19, 2026
@llastflowers
llastflowers added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 77a8d08 Nov 19, 2026
81 of 82 checks passed
@llastflowers
llastflowers deleted the fix/sidebar-padding branch November 19, 2026 20:28
@primer primer Bot mentioned this pull request Nov 19, 2026

This branch was successfully deployed

1 active and 1 inactive deployments
storybook-preview-8801 — 3fdc7541 Deployed Nov 19, 2026 by github-actions[bot]
github-pages — 3fdc7541 Deployed Nov 19, 2026 by llastflowers via deploy-preview #34448
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh integration-tests: skipped manually Changes in this PR do not require an integration test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The padding prop seems to have no effect with PageLayout.Sidebar

3 participants