Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .changeset/curvy-walls-exist.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fresh-spiders-push.md

This file was deleted.

17 changes: 0 additions & 17 deletions .changeset/optimized-page-layout-resize.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/perf-autocomplete-context-split.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/perf-basestyles-has-selector.md

This file was deleted.

10 changes: 0 additions & 10 deletions .changeset/perf-dialog-has-selector.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/perf-hasinteractivenodes-cleanup.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/swift-keys-thank.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/codesandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.3",
"@primer/react": "38.6.2",
"@primer/react": "38.6.3",
"@primer/styled-react": "1.0.2",
"styled-components": "5.x",
"typescript": "^5.9.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"@primer/react": "38.6.2",
"@primer/react": "38.6.3",
"@primer/styled-react": "1.0.2",
"next": "^16.0.10",
"react": "^19.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@primer/octicons-react": "^19.21.0",
"@primer/react": "38.6.2",
"@primer/react": "38.6.3",
"@primer/styled-react": "1.0.2",
"clsx": "^2.1.1",
"next": "^16.0.10",
Expand Down
47 changes: 47 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# @primer/react

## 38.6.3

### Patch Changes

- [#7354](https://github.com/primer/react/pull/7354) [`efbebdf`](https://github.com/primer/react/commit/efbebdf6589bf454ab78f17c83dc84ce88145e7b) Thanks [@llastflowers](https://github.com/llastflowers)! - update SelectPanel Multi Select Modal story

- [#7349](https://github.com/primer/react/pull/7349) [`713d5a5`](https://github.com/primer/react/commit/713d5a5c5616e005cf8e939f33f8526210d3d634) Thanks [@mattcosta7](https://github.com/mattcosta7)! - PageLayout: Optimize drag/resize performance with inline styles and new optimizations

**Refactored:**

- Use direct attribute selectors (`.Pane[data-dragging='true']`) instead of descendant selectors for CSS containment (O(1) vs O(n) selector matching)
- Extract optimization utilities to `paneUtils.ts`
- Apply drag handle visual feedback via inline styles and CSS variables

**Added:**

- `content-visibility: auto` during drag/resize to skip off-screen content rendering
- rAF throttle for drag updates (one update per frame, latest position wins)
- Containment during window resize (parity with drag)

These changes improve style recalculation performance on large DOMs (100k+ nodes) by eliminating descendant selector traversal.

- [#7337](https://github.com/primer/react/pull/7337) [`de970d6`](https://github.com/primer/react/commit/de970d6682f4e9a3aa5e3c637e0245da2a7a9d84) Thanks [@mattcosta7](https://github.com/mattcosta7)! - perf(Autocomplete): Split context to reduce unnecessary re-renders

Split AutocompleteContext into separate contexts for static values, setters, and dynamic state.
Components now subscribe only to the context slices they need, reducing re-renders.

- [#7325](https://github.com/primer/react/pull/7325) [`cc7e10e`](https://github.com/primer/react/commit/cc7e10e7c0bee7ef9694ca94928446f704ada552) Thanks [@mattcosta7](https://github.com/mattcosta7)! - perf(BaseStyles): Remove expensive :has([data-color-mode]) selectors

Remove `:has([data-color-mode])` selectors that scanned the entire DOM on every style recalculation.
Input color-scheme is already handled by global selectors in the codebase.

- [#7329](https://github.com/primer/react/pull/7329) [`501a41f`](https://github.com/primer/react/commit/501a41fc44e5c0edfca69af022676e0d26e1a1a0) Thanks [@mattcosta7](https://github.com/mattcosta7)! - perf(Dialog): Add feature flag for CSS :has() selector performance optimization

- Add `primer_react_css_has_selector_perf` feature flag (default: false)
- When flag is OFF: uses legacy `body:has(.Dialog.DisableScroll)` selector
- When flag is ON: uses optimized direct `body[data-dialog-scroll-disabled]` data attribute with ref counting
- Enables gradual rollout and easy rollback of performance optimization

- [#7342](https://github.com/primer/react/pull/7342) [`a8b42b2`](https://github.com/primer/react/commit/a8b42b2e4cff9575eae8df897e64c1ca67ee180a) Thanks [@mattcosta7](https://github.com/mattcosta7)! - perf(hasInteractiveNodes): Optimize with combined selector and early attribute checks

- Use combined querySelectorAll selector instead of recursive traversal
- Check attribute-based states (disabled, hidden, inert) before getComputedStyle
- Only call getComputedStyle when CSS-based visibility check is needed

- [#7399](https://github.com/primer/react/pull/7399) [`06c8320`](https://github.com/primer/react/commit/06c83203cd3f200b337aa34618174934317494e2) Thanks [@TylerJDev](https://github.com/TylerJDev)! - ToggleSwitch: Adds `overflow: hidden` to `.StatusTextItem` when hidden

## 38.6.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@primer/react",
"type": "module",
"version": "38.6.2",
"version": "38.6.3",
"description": "An implementation of GitHub's Primer Design System using React",
"main": "./dist/index.js",
"module": "./dist/index.js",
Expand Down
Loading