Skip to content

Commit 633fe97

Browse files
committed
chore: add changeset for INP performance optimizations
1 parent 4c7db34 commit 633fe97

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@primer/react": patch
3+
---
4+
5+
Performance: Optimize CSS `:has()` selectors and JavaScript hooks for improved INP
6+
7+
- Scope CSS `:has()` selectors to direct children across Dialog, PageHeader, ActionList, Banner, ButtonGroup, AvatarStack, Breadcrumbs, SegmentedControl, TreeView, and SelectPanel
8+
- Simplify `useResizeObserver` API with automatic requestAnimationFrame throttling and native resize events for window
9+
- Optimize `useAnchoredPosition` to use refs instead of state for non-rendering values
10+
- Add `useTreeItemCache` hook for caching TreeView DOM queries with MutationObserver invalidation
11+
- Throttle MutationObserver callbacks in AvatarStack and Announce components
12+
- Add rAF throttling to `useOverflow` hook
13+
- Optimize `hasInteractiveNodes` utility with querySelectorAll and attribute-first checks

0 commit comments

Comments
 (0)