Skip to content

refactor(SubNav): Remove sx support from SubNav component#6602

Merged
jonrohan merged 6 commits intomainfrom
remove_sx/subnav
Aug 14, 2025
Merged

refactor(SubNav): Remove sx support from SubNav component#6602
jonrohan merged 6 commits intomainfrom
remove_sx/subnav

Conversation

@jonrohan
Copy link
Copy Markdown
Member

@jonrohan jonrohan commented Aug 13, 2025

Changelog

New

Changed

Removed

Remove sx support from SubNav component

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

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 13, 2025

🦋 Changeset detected

Latest commit: 5d20042

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

This PR includes changesets to release 3 packages
Name Type
@primer/react Major
@primer/mcp Patch
@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 Aug 13, 2025
@github-actions
Copy link
Copy Markdown
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 requested a deployment to storybook-preview-6602 August 13, 2025 21:31 Abandoned
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 13, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 90.25 KB (+0.12% 🔺)
packages/react/dist/browser.umd.js 90.43 KB (+0.1% 🔺)

@github-actions github-actions bot temporarily deployed to storybook-preview-6602 August 13, 2025 21:41 Inactive
Base automatically changed from chore/enter-prerelease-mode-v38 to main August 14, 2025 16:07
@github-actions github-actions bot requested a deployment to storybook-preview-6602 August 14, 2025 17:05 Abandoned
@primer-integration
Copy link
Copy Markdown

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

@primer-integration
Copy link
Copy Markdown

🟢 golden-jobs 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: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Aug 14, 2025
@jonrohan jonrohan marked this pull request as ready for review August 14, 2025 17:30
Copilot AI review requested due to automatic review settings August 14, 2025 17:30
@jonrohan jonrohan requested a review from a team as a code owner August 14, 2025 17:30
@jonrohan jonrohan requested a review from joshblack August 14, 2025 17:30
@jonrohan jonrohan enabled auto-merge August 14, 2025 17:30
Copy link
Copy Markdown
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 PR removes the sx prop support from the SubNav component, replacing the internal BoxWithFallback implementation with standard HTML elements. This is part of a larger migration away from styled-system props to reduce bundle size and improve performance.

Key changes:

  • Removes sx prop support from SubNav, SubNavLinks, and SubNavLink components
  • Replaces BoxWithFallback wrapper with native HTML elements (nav, div, a)
  • Updates TypeScript interfaces to remove SxProp dependencies

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/react/src/SubNav/SubNav.tsx Main refactor removing sx support and BoxWithFallback usage
packages/react/src/SubNav/SubNav.dev.stories.tsx Removes development stories demonstrating sx usage
e2e/components/SubNav.test.ts Removes visual regression tests for sx-related stories
.changeset/proud-chairs-study.md Documents breaking change for major version release

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@jonrohan jonrohan added this pull request to the merge queue Aug 14, 2025
Merged via the queue into main with commit d6d25dc Aug 14, 2025
43 checks passed
@jonrohan jonrohan deleted the remove_sx/subnav branch August 14, 2025 18:03
@primer primer bot mentioned this pull request Aug 14, 2025
pksjce pushed a commit that referenced this pull request Aug 15, 2025
Co-authored-by: Josh Black <joshblack@github.com>
Co-authored-by: Copilot <175728472+Copilot@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 staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants