Skip to content

Commit d9199ba

Browse files
authored
Merge branch 'main' into optimize-anchored-overlay=2
2 parents d331c1a + b69325f commit d9199ba

File tree

127 files changed

+2902
-1600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+2902
-1600
lines changed

.changeset/cyan-tigers-reply.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/dry-carrots-bathe.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/fast-pots-say.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/fix-scroll-jump-on-resize.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/gold-snakes-smash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/mcp': minor
3+
---
4+
5+
Adds support for fetching docs via the `/llms.txt` endpoint per-component

.changeset/new-lamps-doubt.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
'@primer/react': minor
3+
---
4+
5+
Add `currentWidth` and `onResizeEnd` props to PageLayout.Pane for controlled resizable width
6+
7+
The `PageLayout.Pane` component now supports controlled width:
8+
9+
- `onResizeEnd` — callback fired when a resize operation ends (pointer release or keyboard key up). Replaces localStorage persistence. Requires `currentWidth`.
10+
- `currentWidth` — sets the current displayed width in pixels (`number | undefined`). Pass `undefined` when the persisted value hasn't loaded yet. Requires `onResizeEnd`.
11+
12+
Both props must be provided together (enforced by TypeScript). `resizable` remains a plain `boolean` prop.
13+
14+
These props are only meaningful when `resizable={true}` — without it, no drag handle renders so `onResizeEnd` never fires.
15+
16+
**New export:**
17+
18+
- `defaultPaneWidth` — Record of preset width values: `{small: 256, medium: 296, large: 320}`
19+
20+
**Example usage:**
21+
22+
```tsx
23+
import {PageLayout, defaultPaneWidth} from '@primer/react'
24+
25+
// Default behavior (unchanged) — localStorage persistence
26+
<PageLayout.Pane resizable />
27+
28+
// Controlled width with custom persistence
29+
const [width, setWidth] = useState(defaultPaneWidth.medium)
30+
<PageLayout.Pane
31+
resizable
32+
currentWidth={width}
33+
onResizeEnd={(newWidth) => {
34+
setWidth(newWidth)
35+
myStorage.save('pane-width', newWidth)
36+
}}
37+
/>
38+
39+
// Async load — pass undefined until value is fetched
40+
<PageLayout.Pane
41+
resizable
42+
currentWidth={savedWidth ?? undefined}
43+
onResizeEnd={handleResizeEnd}
44+
/>
45+
```

.changeset/red-pugs-sing.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/react": patch
3+
---
4+
5+
Update PageHeader story to have semantic headings

.changeset/sixty-keys-perform.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/react": patch
3+
---
4+
5+
fix: ActionBar overflow menu not closing on select

.github/workflows/aat-reports.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix:
1818
shard: [1, 2, 3, 4, 5, 6, 7, 8]
1919
steps:
20-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
20+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
2121
- name: Set up Node.js
2222
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f
2323
with:
@@ -63,7 +63,7 @@ jobs:
6363
runs-on: ubuntu-latest
6464
needs: aat-runner
6565
steps:
66-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
66+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
6767
- name: Set up Node.js
6868
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f
6969
with:

0 commit comments

Comments
 (0)