Releases: primer/react
@primer/styled-react@1.0.3
Patch Changes
- #7499
4f43e82Thanks @copilot-swe-agent! - Remove deprecated component exports from @primer/styled-react that no longer have usage tracked in primer query
@primer/react@38.10.0
@primer/react@38.9.0
Minor Changes
- #7472
661d16fThanks @copilot-swe-agent! - StateLabel: Add alert status variants (alertOpened, alertFixed, alertClosed, alertDismissed) with corresponding shield icons for displaying security alert states
Patch Changes
-
#7471
df4bd30Thanks @llastflowers! - Add breakpoint to shrink gutter around dialog on very small screen heights -
#7468
731fb71Thanks @jonrohan! - feat(ActionList): Optimizes CSS selector performance in ActionList by replacing expensive universal selectors (*) and broad:has()queries with targeted class selectors.
@primer/react@38.8.0
Minor Changes
-
#7455
a86c183Thanks @HiroAgustin! - Remove ConfirmationDialog custom renders to ensure visual parity with Dialog -
#7438
160c1c4Thanks @francinelucca! - feat: make Spinner's delay customizable -
#7436
9a4e46cThanks @TylerJDev! - FilteredActionList: Adds new propscrollBehaviorto allow customization of scroll behavior -
#7448
838859dThanks @francinelucca! - feat(SkeletonBox): add customizable delay
Patch Changes
- #7451
0fc4523Thanks @daantosaurus! - UnderlineNav.Item: Fix layout issues when children contain React elements by extracting only direct text content for thedata-contentattribute.
@primer/react@38.7.1
Patch Changes
-
#7439
ceb4337Thanks @liuliu-dev! - Fix PageLayout whitespace gap on narrow viewports. -
#7364
d239382Thanks @francinelucca! - fix(Autocomplete.Overlay): prevent user-defined className from overriding default styles -
#7408
e3592d9Thanks @TylerJDev! - ActionMenu: Ensures that uncontrolled ActionMenu(s) retain tab-focus when fullscreen -
#7445
4072e44Thanks @mattcosta7! - Fixed a bug where scroll might jump when resizing by removing content-visibility from dragging elements in PageLayout. -
#7431
43d1d89Thanks @llastflowers! - Fix positioning of Autocomplete overlay menu when tokens are present
@primer/react@38.7.0
Minor Changes
- #7293
d418509Thanks @lindseywild! - Adds character counts to TextInput and TextArea components
Patch Changes
-
#7354
efbebdfThanks @llastflowers! - update SelectPanel Multi Select Modal story -
#7426
094be60Thanks @kelsey-myers! - Add focusPrependedElements prop to useFocusZone, FilteredActionList, and SelectPanel -
#7349
713d5a5Thanks @mattcosta7! - PageLayout: Optimize drag/resize performance with inline styles and new optimizationsRefactored:
- 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: autoduring 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.
- Use direct attribute selectors (
-
#7337
de970d6Thanks @mattcosta7! - perf(Autocomplete): Split context to reduce unnecessary re-rendersSplit 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
cc7e10eThanks @mattcosta7! - perf(BaseStyles): Remove expensive :has([data-color-mode]) selectorsRemove
: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
501a41fThanks @mattcosta7! - perf(Dialog): Add feature flag for CSS :has() selector performance optimization- Add
primer_react_css_has_selector_perffeature 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
- Add
-
#7342
a8b42b2Thanks @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
@primer/react@38.6.2
Patch Changes
-
#7334
ea4789fThanks @mattcosta7! - perf(TreeView): Cache tree items in typeahead for better INP- Add useTreeItemCache hook to cache DOM queries for tree items
- Update useRovingTabIndex and useTypeahead to use cached items
- Add documentation for acceptable :has() selector usage
-
#7347
72c7a7fThanks @owenniblock! - Only shows the aria-describedby id for loading when the component is in the loading state
@primer/react@38.6.1
Patch Changes
- #7307
5dcc87cThanks @mattcosta7! - reapplies PageLayout resizable enhancements without INP drop from expensive selectors
@primer/react@38.6.0
Minor Changes
-
#7157
eddd934Thanks @joshblack! - Add feature flag to control whether Spinner animations are synchronized -
#7277
4a1c9a5Thanks @kendallgassner! - Added callback prop onActiveDescendantChanged to FilteredActionList
Patch Changes
- #7305
335e9e8Thanks @llastflowers! - Revert PR #7275
@primer/react@38.5.0
Minor Changes
-
#7240
79a6df1Thanks @TylerJDev! - FilteredActionList: Adds new propsetInitialFocuswhich will preventaria-activedescendantfrom being set until user action -
#7240
79a6df1Thanks @TylerJDev! - FilteredActionList: Add propdisableSelectOnHoverwhich will disable the ability where hovering over an item sets it as thearia-activedescendantvalue
Patch Changes
-
#7259
c32b964Thanks @TylerJDev! - AvatarStack: Border was incorrectly applying to elements that were notAvatarchildren. -
#7259
c32b964Thanks @TylerJDev! - AvatarStack: The square prop was not applying to individualAvatarcomponents. -
#7275
822c3e7Thanks @mattcosta7! - Improve drag performance for PageLayout -
#7242
32faa80Thanks @pksjce! - useFocusTrap - Fix bug related to restoring focus on scrolling