-
Notifications
You must be signed in to change notification settings - Fork 648
Remove deprecated component exports from @primer/styled-react #7499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 1a199a8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
Clarified the removal of deprecated component exports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request removes a set of deprecated component wrappers and exports from @primer/styled-react that are no longer needed, simplifying the legacy styled wrapper package as it’s phased out.
Changes:
- Removed deprecated component exports (and associated prop types) from
packages/styled-react/src/index.tsxandsrc/experimental.tsxfor:ProgressBar,Details,Autocomplete,Checkbox,CheckboxGroup,CircleBadge,NavList,RadioGroup,RelativeTime,Select,StateLabel,SubNav, andUnderlinePanels. - Deleted the corresponding wrapper component implementations under
packages/styled-react/src/components/. - Updated browser tests, experimental tests, and the exports snapshot to match the new public surface, and added a changeset describing the removal.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
packages/styled-react/src/index.tsx |
Removes main entrypoint exports for the deprecated components and their types. |
packages/styled-react/src/experimental.tsx |
Removes the experimental UnderlinePanels export and its types. |
packages/styled-react/src/components/UnderlinePanels.tsx |
Deletes the styled UnderlinePanels wrapper implementation and type re-exports. |
packages/styled-react/src/components/SubNav.tsx |
Deletes the styled SubNav wrapper and SubNavLink implementation and types. |
packages/styled-react/src/components/StateLabel.tsx |
Deletes the styled StateLabel wrapper and props type. |
packages/styled-react/src/components/Select.tsx |
Deletes the styled Select wrapper and props type. |
packages/styled-react/src/components/RelativeTime.tsx |
Deletes the styled RelativeTime wrapper and props type. |
packages/styled-react/src/components/RadioGroup.tsx |
Deletes the styled RadioGroup wrapper and its subcomponents (Label, Caption, Validation) plus slot wiring. |
packages/styled-react/src/components/NavList.tsx |
Deletes the styled NavList compound component implementation and props type. |
packages/styled-react/src/components/CircleBadge.tsx |
Deletes the styled CircleBadge wrapper and props type. |
packages/styled-react/src/components/CheckboxGroup.tsx |
Deletes the styled CheckboxGroup wrapper and subcomponents plus slot wiring. |
packages/styled-react/src/components/Checkbox.tsx |
Deletes the styled Checkbox wrapper and props type. |
packages/styled-react/src/__tests__/primer-react.browser.test.tsx |
Removes sx-prop tests and imports for the deleted components from the main styled-react test suite. |
packages/styled-react/src/__tests__/primer-react-experimental.browser.test.tsx |
Removes the UnderlinePanels import and its sx-prop test from the experimental test suite. |
packages/styled-react/src/__tests__/__snapshots__/exports.test.ts.snap |
Updates the exports snapshot to reflect the reduced public API surface. |
.changeset/bright-donkeys-cheat.md |
Adds a changeset describing removal of deprecated @primer/styled-react exports and marking it as a patch release. |
Removes 13 component exports from
@primer/styled-reactthat are no longer needed in the package.Changes
Removed from main exports (
src/index.tsx):ProgressBar,Details(re-exported from@primer/react)Autocomplete,Checkbox,CheckboxGroup,CircleBadge,NavList,RadioGroup,RelativeTime,Select,StateLabel,SubNavRemoved from experimental exports (
src/experimental.tsx):UnderlinePanelsTests and snapshots updated accordingly.
Changelog
New
None
Changed
None
Removed
ProgressBarexportDetailsexportAutocompleteexport andAutocompleteOverlayPropstypeCheckboxexport andCheckboxPropstypeCheckboxGroupexport andCheckboxGroupPropstypeCircleBadgeexportNavListexport andNavListPropstypeRadioGroupexport andRadioGroupPropstypeRelativeTimeexport andRelativeTimePropstypeSelectexport andSelectPropstypeStateLabelexport andStateLabelPropstypeSubNavexport,SubNavPropsandSubNavLinkPropstypesUnderlinePanelsexport from experimental, includingUnderlinePanelsProps,UnderlinePanelsTabProps, andUnderlinePanelsPanelPropstypesRollout strategy
Migration: Users importing these components from
@primer/styled-reactshould import them directly from@primer/reactinstead. The styled-react package is a legacy wrapper that is being phased out.Testing & Reviewing
All existing tests pass. Export snapshots updated to reflect removed components.
Merge checklist
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.