Skip to content

Remove support for sx and Box usage from the UnderlineNav component - #6668

Merged
liuliu-dev merged 44 commits into
mainfrom
liuliu/migrate-underlinenav
Sep 22, 2025
Merged

Remove support for sx and Box usage from the UnderlineNav component#6668
liuliu-dev merged 44 commits into
mainfrom
liuliu/migrate-underlinenav

Conversation

@liuliu-dev

@liuliu-devliuliu-dev commented Aug 25, 2025

Copy link
Copy Markdown
Contributor

Closes#5770

UnderlineNav usage

Changelog

Removed

Removed sx props and Box from UnderlineNav.

Rollout strategy

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

@changeset-bot

changeset-botBot commented Aug 25, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d59c187

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

This PR includes changesets to release 2 packages
NameType
@primer/reactMajor
@primer/styled-reactMajor

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 integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Aug 25, 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-actionsBot commented Aug 25, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js89.8 KB (-0.06% 🔽)
packages/react/dist/browser.umd.js90.05 KB (+0.07% 🔺)

@github-actions
github-actionsBottemporarily deployed to storybook-preview-6668 August 26, 2025 22:58 Inactive
@liuliu-dev
liuliu-dev marked this pull request as ready for review August 26, 2025 22:58
CopilotAI review requested due to automatic review settings August 26, 2025 22:58
@liuliu-dev
liuliu-dev requested a review from a team as a code ownerAugust 26, 2025 22:58

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

This PR removes the deprecated sx prop and Box component usage from the UnderlineNav component as part of a major release. The changes replace styled-system functionality with CSS modules and native HTML elements for better performance and maintainability.

Key Changes

  • Removed sx prop support from both UnderlineNav and UnderlineNavItem components
  • Replaced Box components with native HTML elements (li, div, span)
  • Migrated inline styles to CSS modules for better maintainability

Reviewed Changes

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

Show a summary per file
FileDescription
packages/react/src/UnderlineNav/styles.tsChanged marginRight from theme unit to explicit pixel value
packages/react/src/UnderlineNav/UnderlineNavItem.tsxRemoved sx prop, Box import, replaced Box with li element and CSS module
packages/react/src/UnderlineNav/UnderlineNavItem.module.cssAdded CSS module for UnderlineNavItem styling
packages/react/src/UnderlineNav/UnderlineNav.tsxRemoved sx prop, Box imports, replaced Box elements with native HTML
packages/react/src/UnderlineNav/UnderlineNav.module.cssAdded CSS module for menu item content styling
packages/react/src/UnderlineNav/UnderlineNav.docs.jsonRemoved sx prop from documentation
.changeset/hot-mirrors-feel.mdAdded changeset for major version bump

@github-actionsgithub-actionsBot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Sep 18, 2025
@github-actions

Copy link
Copy Markdown
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!

@github-actionsgithub-actionsBot added integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Sep 18, 2025
@github-actions

Copy link
Copy Markdown
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!

@github-actions
github-actionsBottemporarily deployed to storybook-preview-6668 September 18, 2025 21:03 Inactive

@joshblackjoshblack 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.

Looks great! just left one question

${sx};
`
// Needed for typing the ref with HTMLULListElement
export const NavigationList = styled.ul``

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.

Super random, do we need this export? I couldn't find where it is used 🤔

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Removed 🧹

@github-actionsgithub-actionsBot added integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Sep 18, 2025
@github-actions

Copy link
Copy Markdown
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!

@github-actions

Copy link
Copy Markdown
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!

@primer-integration

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown
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!

@primer-integration

Copy link
Copy Markdown

🟢 ci completed with status success.

@github-actions

Copy link
Copy Markdown
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!

@github-actions

Copy link
Copy Markdown
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!

@github-actions

Copy link
Copy Markdown
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!

@primerprimerBot mentioned this pull request Sep 22, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: passingChanges in this PR do NOT cause breaking changes in gh/ghintegration-tests: recommendedThis change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@liuliu-dev@joshblack@TylerJDev@llastflowers