From d4c36f702bbd4cfa2536e2b72787381521d6ef39 Mon Sep 17 00:00:00 2001 From: llastflowers Date: Thu, 19 Nov 2026 10:16:32 -0800 Subject: [PATCH 1/4] fix(PageLayout): apply sidebar padding --- .../react/src/PageLayout/PageLayout.module.css | 2 ++ packages/react/src/PageLayout/PageLayout.test.tsx | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/packages/react/src/PageLayout/PageLayout.module.css b/packages/react/src/PageLayout/PageLayout.module.css index 526fa6d8ee5..d2ca689e1f2 100644 --- a/packages/react/src/PageLayout/PageLayout.module.css +++ b/packages/react/src/PageLayout/PageLayout.module.css @@ -840,6 +840,8 @@ .Sidebar { width: var(--pane-width-size); height: 100%; + /* stylelint-disable-next-line primer/spacing */ + padding: var(--spacing); overflow: auto; &:where([data-resizable]) { diff --git a/packages/react/src/PageLayout/PageLayout.test.tsx b/packages/react/src/PageLayout/PageLayout.test.tsx index f5aeb392218..373052f85ad 100644 --- a/packages/react/src/PageLayout/PageLayout.test.tsx +++ b/packages/react/src/PageLayout/PageLayout.test.tsx @@ -342,6 +342,20 @@ describe('PageLayout', async () => { }) describe('PageLayout.Sidebar', () => { + it.each([ + {padding: 'condensed', expectedPadding: '16px'}, + {padding: 'normal', expectedPadding: '24px'}, + ] as const)('applies $padding padding when the layout has no padding', ({padding, expectedPadding}) => { + render( + + Sidebar + Content + , + ) + + expect(getComputedStyle(page.getByText('Sidebar').element()).padding).toBe(expectedPadding) + }) + it('SidebarWrapper should prevent shrinking', () => { const {container} = render( From a34019e3281a376cb6a473314ce77053be36829e Mon Sep 17 00:00:00 2001 From: "Brittany L. Houtz" <55068883+llastflowers@users.noreply.github.com> Date: Thu, 19 Nov 2026 11:12:41 -0800 Subject: [PATCH 2/4] Create sidebar-padding.md --- .changeset/sidebar-padding.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/sidebar-padding.md diff --git a/.changeset/sidebar-padding.md b/.changeset/sidebar-padding.md new file mode 100644 index 00000000000..e7569a5ed15 --- /dev/null +++ b/.changeset/sidebar-padding.md @@ -0,0 +1,5 @@ +--- +"@primer/react": patch +--- + +Fix PageLayout.Sidebar ignoring its padding prop From 35feb47f19fb374432daecb0434e057bc3077907 Mon Sep 17 00:00:00 2001 From: llastflowers Date: Thu, 19 Nov 2026 11:28:20 -0800 Subject: [PATCH 3/4] docs(SplitPageLayout): preserve unpadded sidebar example --- .../src/SplitPageLayout/SplitPageLayout.features.stories.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/SplitPageLayout/SplitPageLayout.features.stories.tsx b/packages/react/src/SplitPageLayout/SplitPageLayout.features.stories.tsx index acc60838f33..2c9f06a1fa4 100644 --- a/packages/react/src/SplitPageLayout/SplitPageLayout.features.stories.tsx +++ b/packages/react/src/SplitPageLayout/SplitPageLayout.features.stories.tsx @@ -42,7 +42,7 @@ export const SettingsPage: StoryFn = () => ( export const WithSidebarStart: StoryFn = () => ( - +

Sidebar

From 3fdc7541448f41214967593c51471a7f9f70958c Mon Sep 17 00:00:00 2001 From: llastflowers Date: Thu, 19 Nov 2026 12:01:09 -0800 Subject: [PATCH 4/4] docs(SplitPageLayout): preserve padding in remaining sidebar examples --- .../SplitPageLayout.features.stories.tsx | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/packages/react/src/SplitPageLayout/SplitPageLayout.features.stories.tsx b/packages/react/src/SplitPageLayout/SplitPageLayout.features.stories.tsx index 2c9f06a1fa4..d2caf02c04e 100644 --- a/packages/react/src/SplitPageLayout/SplitPageLayout.features.stories.tsx +++ b/packages/react/src/SplitPageLayout/SplitPageLayout.features.stories.tsx @@ -86,7 +86,7 @@ export const WithSidebarStart: StoryFn = () => ( export const WithSidebarEnd: StoryFn = () => ( - +

Inspector

@@ -121,7 +121,13 @@ export const WithSidebarEnd: StoryFn = () => ( export const WithResizableSidebar: StoryFn = () => ( - +

Resizable Sidebar

@@ -146,7 +152,13 @@ export const WithResizableSidebar: StoryFn = () => ( export const WithSidebarAndResizablePane: StoryFn = () => ( - +

Sidebar

Full-height resizable sidebar

@@ -178,7 +190,7 @@ export const WithSidebarAndResizablePane: StoryFn = () = export const WithStickySidebar: StoryFn = () => ( - +

Sticky Sidebar

This sidebar stays fixed in the viewport as you scroll the page content.

@@ -207,6 +219,7 @@ export const WithStickySidebar: StoryFn = () => ( export const SidebarFullscreenResponsiveVariant: StoryFn = () => (