Uh oh!
There was an error while loading. Please reload this page.
chore(styled-react): remove TabNav, SegmentedControl, Header, FormControl, LinkButton from @primer/styled-react - #7794
Conversation
🦋 Changeset detectedLatest commit: 651cf3c 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 |
There was a problem hiding this comment.
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, andSegmentedControlexports from@primer/styled-react, andTabNavfrom@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
| File | Description |
|---|---|
| packages/styled-react/src/index.tsx | Drops exports for FormControl/Header/LinkButton/SegmentedControl from the main entrypoint. |
| packages/styled-react/src/deprecated.tsx | Drops TabNav export from the deprecated entrypoint. |
| packages/styled-react/src/components/deprecated/TabNav.tsx | Deletes the styled-react TabNav wrapper implementation. |
| packages/styled-react/src/components/SegmentedControl.tsx | Deletes the styled-react SegmentedControl wrapper implementation. |
| packages/styled-react/src/components/LinkButton.tsx | Deletes the styled-react LinkButton wrapper implementation. |
| packages/styled-react/src/components/Header.tsx | Deletes the styled-react Header wrapper implementation. |
| packages/styled-react/src/components/FormControl.tsx | Deletes the styled-react FormControl wrapper implementation. |
| packages/styled-react/src/tests/primer-react.browser.test.tsx | Removes sx browser tests for deleted non-deprecated entrypoint components. |
| packages/styled-react/src/tests/primer-react-deprecated.browser.test.tsx | Removes sx browser tests for deleted deprecated entrypoint component (TabNav). |
| packages/styled-react/src/tests/snapshots/exports.test.ts.snap | Updates export snapshot expectations to remove the deleted exports. |
| .changeset/smart-points-explain.md | Adds a changeset for the removal. |
Copilot's findings
- Files reviewed: 11/11 changed files
- Comments generated: 1
Uh oh!
There was an error while loading. Please reload this page.
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/19564 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Closes #
Removes
TabNav,SegmentedControl,Header,FormControl, andLinkButtoncomponents from the@primer/styled-reactpackage, continuing the effort to slim down the styled-react compatibility layer.Changelog
New
None
Changed
None
Removed
FormControlandFormControlPropsfrom@primer/styled-reactHeaderandHeaderPropsfrom@primer/styled-reactLinkButtonandLinkButtonPropsfrom@primer/styled-reactSegmentedControl,SegmentedControlProps,SegmentedControlButtonProps, andSegmentedControlIconButtonPropsfrom@primer/styled-reactTabNav,TabNavProps, andTabNavLinkPropsfrom@primer/styled-react/deprecatedRollout strategy
Testing & Reviewing
sxprop support for these components.Merge checklist