Skip to content

Conversation

liuliu-dev
Copy link
Contributor

Closes #5832

  • sx usage: 0 are still using sx props with SideNav.

Changelog

Removed

Removed sx props and BoxWithFallback from SideNav.

Rollout strategy

  • Major release; if selected, include a written rollout or migration plan

Copy link

changeset-bot bot commented Sep 5, 2025

🦋 Changeset detected

Latest commit: 0c136d0

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

Copy link
Contributor

github-actions bot commented Sep 5, 2025

👋 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 added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Sep 5, 2025
Copy link
Contributor

github-actions bot commented Sep 5, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 87.91 KB (-0.07% 🔽)
packages/react/dist/browser.umd.js 88.17 KB (+0.11% 🔺)

@primer-integration
Copy link

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

@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: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Sep 8, 2025
@liuliu-dev liuliu-dev marked this pull request as ready for review September 8, 2025 21:52
@Copilot Copilot AI review requested due to automatic review settings September 8, 2025 21:52
@liuliu-dev liuliu-dev requested a review from a team as a code owner September 8, 2025 21:52
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 the sx prop support from the SideNav component as part of a major breaking change. The component is being migrated away from the styled-system approach to a more standard CSS-based implementation.

  • Removes sx prop and SxProp type from SideNav component
  • Replaces BoxWithFallback wrapper with direct element rendering
  • Updates component to use standard HTML elements instead of Box abstraction

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/react/src/SideNav.tsx Removes sx prop support, replaces BoxWithFallback with direct element rendering, and simplifies component structure
.changeset/rich-walls-fold.md Documents the breaking change for the major version release

variant={variant}
{...rest}
>
<Link aria-current={isReactRouter || selected ? 'page' : undefined} className={newClassName} {...rest}>
Copy link
Preview

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

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

The variant prop is being removed from the Link component but it was previously passed to BoxWithFallback. This may cause a prop validation warning if Link doesn't accept a variant prop.

Copilot uses AI. Check for mistakes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The variant is already handled in newClassName and Link does not accept variant

Copy link
Contributor

@llastflowers llastflowers left a comment

Choose a reason for hiding this comment

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

Looks good ✅ 😸

@liuliu-dev liuliu-dev added this pull request to the merge queue Sep 8, 2025
Merged via the queue into main with commit 45a52c1 Sep 8, 2025
44 checks passed
@liuliu-dev liuliu-dev deleted the liuliu/remove-sx-from-sidenav branch September 8, 2025 23:01
@primer primer bot mentioned this pull request Sep 8, 2025
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants