Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 2, 2026

Removes 13 component exports from @primer/styled-react that 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, SubNav

Removed from experimental exports (src/experimental.tsx):

  • UnderlinePanels

Tests and snapshots updated accordingly.

Changelog

New

None

Changed

None

Removed

  • ProgressBar export
  • Details export
  • Autocomplete export and AutocompleteOverlayProps type
  • Checkbox export and CheckboxProps type
  • CheckboxGroup export and CheckboxGroupProps type
  • CircleBadge export
  • NavList export and NavListProps type
  • RadioGroup export and RadioGroupProps type
  • RelativeTime export and RelativeTimeProps type
  • Select export and SelectProps type
  • StateLabel export and StateLabelProps type
  • SubNav export, SubNavProps and SubNavLinkProps types
  • UnderlinePanels export from experimental, including UnderlinePanelsProps, UnderlinePanelsTabProps, and UnderlinePanelsPanelProps types

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Migration: Users importing these components from @primer/styled-react should import them directly from @primer/react instead. 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

There are components in the packages/styled-react package that are no longer needed in that package. Can you remove the export from the package?

  • ProgressBar
  • Details
  • AutoComplete
  • Checkbox
  • CheckboxGroup
  • Circlebadge
  • NavList
  • RadioGroup
  • RelativeTime
  • Select
  • StateLabel
  • UnderlinePanels
  • SubNav

💡 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.

@changeset-bot
Copy link

changeset-bot bot commented Feb 2, 2026

🦋 Changeset detected

Latest commit: 1a199a8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/styled-react Patch

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>
Copilot AI changed the title [WIP] Remove unused components from styled-react package Remove deprecated component exports from @primer/styled-react Feb 2, 2026
Copilot AI requested a review from jonrohan February 2, 2026 19:03
Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
Clarified the removal of deprecated component exports.
@jonrohan jonrohan marked this pull request as ready for review February 2, 2026 19:13
@jonrohan jonrohan requested a review from a team as a code owner February 2, 2026 19:13
Copilot AI review requested due to automatic review settings February 2, 2026 19:13
Copy link
Contributor

Copilot AI left a 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.tsx and src/experimental.tsx for: ProgressBar, Details, Autocomplete, Checkbox, CheckboxGroup, CircleBadge, NavList, RadioGroup, RelativeTime, Select, StateLabel, SubNav, and UnderlinePanels.
  • 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.

@github-actions github-actions bot requested a deployment to storybook-preview-7499 February 2, 2026 23:32 Abandoned
@primer-integration
Copy link

Integration test results from github/github-ui:

Passed  CI   Passed
Passed  VRT   Passed
Passed  Projects   Passed

All checks passed!

@jonrohan jonrohan enabled auto-merge February 3, 2026 01:10
@jonrohan jonrohan added this pull request to the merge queue Feb 3, 2026
Merged via the queue into main with commit 4f43e82 Feb 3, 2026
74 of 79 checks passed
@jonrohan jonrohan deleted the copilot/remove-unused-components branch February 3, 2026 01:27
@primer primer bot mentioned this pull request Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants