Skip to content

chore(styled-react): remove TabNav, SegmentedControl, Header, FormControl, LinkButton from @primer/styled-react - #7794

Merged
jonrohan merged 2 commits into
mainfrom
remove_more_styled_react_exports
Apr 28, 2026
Merged

chore(styled-react): remove TabNav, SegmentedControl, Header, FormControl, LinkButton from @primer/styled-react#7794
jonrohan merged 2 commits into
mainfrom
remove_more_styled_react_exports

Conversation

@jonrohan

Copy link
Copy Markdown
Member

Closes #

Removes TabNav, SegmentedControl, Header, FormControl, and LinkButton components from the @primer/styled-react package, continuing the effort to slim down the styled-react compatibility layer.

Changelog

New

None

Changed

None

Removed

  • FormControl and FormControlProps from @primer/styled-react
  • Header and HeaderProps from @primer/styled-react
  • LinkButton and LinkButtonProps from @primer/styled-react
  • SegmentedControl, SegmentedControlProps, SegmentedControlButtonProps, and SegmentedControlIconButtonProps from @primer/styled-react
  • TabNav, TabNavProps, and TabNavLinkProps from @primer/styled-react/deprecated

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

Testing & Reviewing

  • Verified export snapshot tests are updated to reflect the removed components.
  • Removed corresponding browser tests that validated sx prop support for these components.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Storybook)
  • Changes are SSR compatible
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge
  • (GitHub staff only) Integration tests pass at github/github-ui

@changeset-bot

changeset-botBot commented Apr 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 651cf3c

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

This PR includes changesets to release 1 package
NameType
@primer/styled-reactPatch

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

@github-actionsgithub-actionsBot added the staff Author is a staff member label Apr 28, 2026
@github-actions
github-actionsBot requested a deployment to storybook-preview-7794 April 28, 2026 18:01 Abandoned
@github-actions
github-actionsBottemporarily deployed to storybook-preview-7794 April 28, 2026 18:11 Inactive

@francineluccafrancinelucca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@jonrohan
jonrohan marked this pull request as ready for review April 28, 2026 19:37
CopilotAI review requested due to automatic review settings April 28, 2026 19:37
@jonrohan
jonrohan requested a review from a team as a code ownerApril 28, 2026 19:37
@jonrohan
jonrohan requested a review from TylerJDevApril 28, 2026 19:37
@jonrohanjonrohan added the Canary Release Apply this label when you want CI to create a canary release of the current PR label Apr 28, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes several deprecated @primer/styled-react wrapper components to further slim down the styled-components compatibility layer, and updates tests/snapshots accordingly.

Changes:

  • Remove FormControl, Header, LinkButton, and SegmentedControl exports from @primer/styled-react, and TabNav from @primer/styled-react/deprecated.
  • Delete the corresponding wrapper component source files.
  • Update export snapshot and browser tests to reflect removed exports.
Show a summary per file
FileDescription
packages/styled-react/src/index.tsxDrops exports for FormControl/Header/LinkButton/SegmentedControl from the main entrypoint.
packages/styled-react/src/deprecated.tsxDrops TabNav export from the deprecated entrypoint.
packages/styled-react/src/components/deprecated/TabNav.tsxDeletes the styled-react TabNav wrapper implementation.
packages/styled-react/src/components/SegmentedControl.tsxDeletes the styled-react SegmentedControl wrapper implementation.
packages/styled-react/src/components/LinkButton.tsxDeletes the styled-react LinkButton wrapper implementation.
packages/styled-react/src/components/Header.tsxDeletes the styled-react Header wrapper implementation.
packages/styled-react/src/components/FormControl.tsxDeletes the styled-react FormControl wrapper implementation.
packages/styled-react/src/tests/primer-react.browser.test.tsxRemoves sx browser tests for deleted non-deprecated entrypoint components.
packages/styled-react/src/tests/primer-react-deprecated.browser.test.tsxRemoves sx browser tests for deleted deprecated entrypoint component (TabNav).
packages/styled-react/src/tests/snapshots/exports.test.ts.snapUpdates export snapshot expectations to remove the deleted exports.
.changeset/smart-points-explain.mdAdds a changeset for the removal.

Copilot's findings

  • Files reviewed: 11/11 changed files
  • Comments generated: 1

Comment thread.changeset/smart-points-explain.md
@primer-integration

Copy link
Copy Markdown

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/19564

@jonrohan
jonrohan enabled auto-merge April 28, 2026 20:03
@primer-integration

Copy link
Copy Markdown

Integration test results from github/github-ui:

Passed CI  Passed
Passed VRT  Passed
Passed Projects  Passed

All checks passed!

@jonrohan
jonrohan added this pull request to the merge queueApr 28, 2026
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks Apr 28, 2026
@jonrohan
jonrohan added this pull request to the merge queueApr 28, 2026
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks Apr 28, 2026
@jonrohan
jonrohan added this pull request to the merge queueApr 28, 2026
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks Apr 28, 2026
@jonrohan
jonrohan added this pull request to the merge queueApr 28, 2026
Merged via the queue into main with commit 0b6dabbApr 28, 2026
73 of 74 checks passed
@jonrohan
jonrohan deleted the remove_more_styled_react_exports branch April 28, 2026 20:53
@primerprimerBot mentioned this pull request Apr 28, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Canary ReleaseApply this label when you want CI to create a canary release of the current PRstaffAuthor is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jonrohan@francinelucca