Releases: primer/react
@primer/react@38.14.0
Minor Changes
- #7531
0cfb938Thanks @hectahertz! - SelectPanel: Add built-in client-side list virtualization via a newvirtualizedprop. When enabled, only the visible items plus a small overscan buffer are rendered in the DOM, dramatically improving performance for large lists.
Patch Changes
-
#7497
931740bThanks @hectahertz! - Remove render phase setStates on SelectPanel -
#7532
39a2151Thanks @hectahertz! - PageLayout: Eliminate forced reflow (~614ms) on mount by replacinggetComputedStylecall with a pure JS viewport width check for the--pane-max-width-diffCSS variable. -
#7555
64c2243Thanks @hectahertz! - perf(useSlots): short-circuit iteration and skip filled slots -
#7547
4943d67Thanks @hectahertz! - perf(useScrollFlash): defer scroll read/write to requestAnimationFrame to avoid forced reflow -
#7497
931740bThanks @hectahertz! - Improve SelectPanel performance -
#7551
2fbfc49Thanks @hectahertz! - perf(Text): remove unnecessary useRef and useImperativeHandle hooks -
#7571
59ab235Thanks @liuliu-dev! - AnchoredOverlay: changedoverflowfromhiddentoautoto prevent content clipping at small viewports. -
#7553
6225ba2Thanks @hectahertz! - perf(useRefObjectAsForwardedRef): add dependency array to useImperativeHandle
@primer/mcp@0.3.0
Minor Changes
- #7574
14c5a6cThanks @lukasoppermann! - Replace design token tools with enhanced search and bundle system. The singlelist_tokenstool is replaced byfind_tokens,get_token_group_bundle,get_design_token_specs, andget_token_usage_patternsfor improved token discovery and usage guidance.
@primer/react@38.13.0
Minor Changes
-
#7099
4720c2fThanks @copilot-swe-agent! - Banner: Usearia-labelledbyto reference the title for the landmark region instead of generic variant labels. -
#7521
12dda86Thanks @TylerJDev! - PageLayout: AddPageLayout.Sidebarsub-component
Patch Changes
-
#7537
4fd987cThanks @hectahertz! - perf(ActionList): enable React Compiler -
#7546
86d6897Thanks @hectahertz! - perf(Announce): skip getComputedStyle when there is no text content to announce -
#7568
aa46098Thanks @HiroAgustin! - Blankslate: Addtext-wrap: balanceto Heading and Description -
#7552
551ec63Thanks @hectahertz! - perf(Button): fix CounterLabel remount and remove conditional DEV hook -
#7504
d91e78eThanks @TylerJDev! - UnderlineNav: Addsoverflow: hiddenwhen the "More" button isn't present -
#7526
0c2358aThanks @hectahertz! - Addcontent-visibility: autoto ActionList items to improve rendering performance for large lists by allowing the browser to skip layout and paint for off-screen items. -
#7556
6dc1858Thanks @hectahertz! - perf(ActionList): replace:has([aria-disabled])child scan withdata-is-disabledattribute for faster style recalculation -
#7548
d4b32c3Thanks @hectahertz! - perf(useIsMacOS): replace useState+useEffect with useSyncExternalStore to eliminate unnecessary re-render
@primer/mcp@0.2.0
@primer/react@38.12.0
Minor Changes
-
#7348
3c160b2Thanks @mattcosta7! - AddcurrentWidthandonResizeEndprops to PageLayout.Pane for controlled resizable widthThe
PageLayout.Panecomponent now supports controlled width:onResizeEnd— callback fired when a resize operation ends (pointer release or keyboard key up). Replaces localStorage persistence. RequirescurrentWidth.currentWidth— sets the current displayed width in pixels (number | undefined). Passundefinedwhen the persisted value hasn't loaded yet. RequiresonResizeEnd.
Both props must be provided together (enforced by TypeScript).
resizableremains a plainbooleanprop.These props are only meaningful when
resizable={true}— without it, no drag handle renders soonResizeEndnever fires.New export:
defaultPaneWidth— Record of preset width values:{small: 256, medium: 296, large: 320}
Example usage:
import {PageLayout, defaultPaneWidth} from '@primer/react' // Default behavior (unchanged) — localStorage persistence <PageLayout.Pane resizable /> // Controlled width with custom persistence const [width, setWidth] = useState(defaultPaneWidth.medium) <PageLayout.Pane resizable currentWidth={width} onResizeEnd={(newWidth) => { setWidth(newWidth) myStorage.save('pane-width', newWidth) }} /> // Async load — pass undefined until value is fetched <PageLayout.Pane resizable currentWidth={savedWidth ?? undefined} onResizeEnd={handleResizeEnd} />
Patch Changes
-
#7527
c87db98Thanks @llastflowers! - Update PageHeader story to have semantic headings -
#7535
d86c970Thanks @francinelucca! - fix: ActionBar overflow menu not closing on select
@primer/react@38.11.0
Minor Changes
- #7509
2e563b4Thanks @francinelucca! - feat: implement displayInViewport for ActionMenu and AnchoredOverlay
Patch Changes
-
#7501
81ab065Thanks @copilot-swe-agent! - Fix PageLayout horizontal overflow by adding width constraint to ContentWrapper -
#7483
fe999caThanks @francinelucca! - remove primer_react_overlay_overflow FF from the codebase
@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.