Skip to content

Conversation

jonrohan
Copy link
Member

@jonrohan jonrohan commented Sep 17, 2025

Closes #6779

Changelog

New

Changed

Removed

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

Merge checklist

Copy link

changeset-bot bot commented Sep 17, 2025

🦋 Changeset detected

Latest commit: 6de983d

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

This PR includes changesets to release 2 packages
Name Type
@primer/react Major
@primer/styled-react Major

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-actions github-actions bot added staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Sep 17, 2025
Copy link
Contributor

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

@github-actions github-actions bot temporarily deployed to storybook-preview-6864 September 17, 2025 01:14 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-6864 September 17, 2025 01:23 Inactive
@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Sep 17, 2025
@github-actions github-actions bot requested a deployment to storybook-preview-6864 September 25, 2025 14:17 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6864 September 25, 2025 14:27 Inactive
@github-actions github-actions bot requested a deployment to storybook-preview-6864 September 25, 2025 21:38 Abandoned
@primer-integration
Copy link

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

@primer-integration
Copy link

🟢 ci completed with status success.

@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: failing Changes in this PR cause breaking changes in gh/gh labels Sep 25, 2025
@francinelucca francinelucca marked this pull request as ready for review September 25, 2025 22:02
@francinelucca francinelucca requested a review from a team as a code owner September 25, 2025 22:02
@francinelucca francinelucca requested review from Copilot and francinelucca and removed request for francinelucca September 25, 2025 22:02
Copy link
Contributor

@Copilot 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 PR removes support for the sx prop from the TabNav component in the main @primer/react package while maintaining backward compatibility by providing a styled-components wrapper in the @primer/styled-react package.

  • Removes SxProp from TabNavProps and TabNavLinkProps in the main React package
  • Replaces BoxWithFallback usage with plain HTML elements to eliminate sx styling
  • Creates a new styled-components wrapper in the styled-react package that preserves sx functionality

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/react/src/TabNav/TabNav.tsx Removes sx prop support and BoxWithFallback usage from main component
packages/styled-react/src/components/TabNav.tsx Creates new styled-components wrapper that preserves sx functionality
packages/styled-react/src/deprecated.tsx Updates exports to use local TabNav implementation
packages/styled-react/src/tests/primer-react-deprecated.browser.test.tsx Updates test to include polymorphic rendering validation
.changeset/lucky-wasps-nail.md Documents the breaking change

Comment on lines +16 to +17
// @ts-ignore forwardedAs is valid here but I don't know how to fix the typescript error
const TabNavImpl = ({as, ...props}: TabNavProps) => <StyledTabNav forwardedAs={as} {...props} />
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

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

Instead of using @ts-ignore, consider using a proper TypeScript assertion or interface extension to handle the forwardedAs prop. This improves type safety and code maintainability.

Copilot uses AI. Check for mistakes.

Comment on lines +25 to +26
// @ts-ignore forwardedAs is valid here but I don't know how to fix the typescript error
const TabNavLink = ({as, ...props}: TabNavLinkProps) => <StyledTabNavLink forwardedAs={as} {...props} />
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

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

Instead of using @ts-ignore, consider using a proper TypeScript assertion or interface extension to handle the forwardedAs prop. This improves type safety and code maintainability.

Copilot uses AI. Check for mistakes.

Copy link
Member

@francinelucca francinelucca left a comment

Choose a reason for hiding this comment

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

🎉

@jonrohan jonrohan enabled auto-merge September 25, 2025 22:59
@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Sep 26, 2025
Copy link
Contributor

👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks!

@jonrohan jonrohan added this pull request to the merge queue Sep 26, 2025
Merged via the queue into main with commit b0abd78 Sep 26, 2025
39 of 41 checks passed
@jonrohan jonrohan deleted the remove_sx_support_tabnav branch September 26, 2025 19:47
@primer primer bot mentioned this pull request Sep 26, 2025
llastflowers pushed a commit that referenced this pull request Sep 29, 2025
Co-authored-by: Marie Lucca <francinelucca@github.com>
Co-authored-by: Marie Lucca <40550942+francinelucca@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove support for sx from the TabNav component in @primer/react/deprecated

3 participants