Skip to content

feat(Header): remove support for sx prop - #6839

Merged
francinelucca merged 8 commits into
mainfrom
6763-remove-sx-from-header
Sep 22, 2025
Merged

feat(Header): remove support for sx prop#6839
francinelucca merged 8 commits into
mainfrom
6763-remove-sx-from-header

Conversation

@joshblack

Copy link
Copy Markdown
Member

Closes#6763

Changelog

New

Changed

Removed

  • Remove support for sx from the Header component

Rollout strategy

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

This component has no sx usage in github-ui and can be rolled out. We also introduced this component to @primer/styled-react to help out with usage outside of github-ui

@joshblack
joshblack requested a review from a team as a code ownerSeptember 11, 2025 16:31
@changeset-bot

changeset-botBot commented Sep 11, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f810e3b

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

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 support for the sx prop from the Header component as part of a major version release, migrating from styled-components to CSS modules for styling.

  • Removes sx prop support from Header, Header.Item, and Header.Link components
  • Replaces BoxWithFallback with native HTML elements and direct component rendering
  • Migrates Storybook examples from sx props to CSS modules for styling

Reviewed Changes

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

Show a summary per file
FileDescription
packages/react/src/Header/Header.tsxRemoves sx prop types and BoxWithFallback usage, implements direct element rendering
packages/react/src/Header/Header.stories.tsxMigrates sx props to CSS modules in default and playground stories
packages/react/src/Header/Header.stories.module.cssAdds CSS classes to replace sx styling in stories
packages/react/src/Header/Header.features.stories.tsxUpdates feature stories to use CSS modules instead of sx props
packages/react/src/Header/Header.features.stories.module.cssProvides CSS classes for feature story styling
packages/react/src/Header/Header.docs.jsonRemoves sx prop documentation from component and subcomponents
packages/react/src/Header/Header.dev.stories.tsxRemoves sx-based dev stories, keeps CSS-only examples
packages/styled-react/src/index.tsxAdds sx-enabled Header wrapper for backward compatibility in styled-react package
.changeset/twelve-sloths-flow.mdDocuments the breaking change for version release

@github-actionsgithub-actionsBot added the staff Author is a staff member label Sep 11, 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-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 11, 2025
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js88.68 KB (+0.05% 🔺)
packages/react/dist/browser.umd.js88.7 KB (-0.04% 🔽)

@github-actions
github-actionsBot requested a deployment to storybook-preview-6839 September 16, 2025 22:26 Abandoned
@github-actions
github-actionsBot requested a deployment to storybook-preview-6839 September 16, 2025 22:30 Abandoned
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6839 September 16, 2025 22:38 Inactive
@primer-integration

Copy link
Copy Markdown

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

@primer-integration

Copy link
Copy Markdown

🟢 ci completed with status success.

@github-actionsgithub-actionsBot 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 16, 2025
@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 22, 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!

@francinelucca
francinelucca added this pull request to the merge queueSep 22, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6839 September 22, 2025 19:03 Inactive
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to a conflict with the base branch Sep 22, 2025
@github-actionsgithub-actionsBot removed the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Sep 22, 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 the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Sep 22, 2025
@francinelucca
francinelucca added this pull request to the merge queueSep 22, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6839 September 22, 2025 19:18 Inactive
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to a conflict with the base branch Sep 22, 2025
@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 22, 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!

@francinelucca
francinelucca added this pull request to the merge queueSep 22, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6839 September 22, 2025 19:30 Inactive
Merged via the queue into main with commit 32febacSep 22, 2025
40 of 41 checks passed
@francinelucca
francinelucca deleted the 6763-remove-sx-from-header branch September 22, 2025 19:34
@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/tdmpakpmstaffAuthor is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove support for sx from the Header component

4 participants

@joshblack@TylerJDev@francinelucca