Skip to content

Conversation

@joshblack
Copy link
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 owner September 11, 2025 16:31
@changeset-bot
Copy link

changeset-bot bot commented Sep 11, 2025

🦋 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
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

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 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
File Description
packages/react/src/Header/Header.tsx Removes sx prop types and BoxWithFallback usage, implements direct element rendering
packages/react/src/Header/Header.stories.tsx Migrates sx props to CSS modules in default and playground stories
packages/react/src/Header/Header.stories.module.css Adds CSS classes to replace sx styling in stories
packages/react/src/Header/Header.features.stories.tsx Updates feature stories to use CSS modules instead of sx props
packages/react/src/Header/Header.features.stories.module.css Provides CSS classes for feature story styling
packages/react/src/Header/Header.docs.json Removes sx prop documentation from component and subcomponents
packages/react/src/Header/Header.dev.stories.tsx Removes sx-based dev stories, keeps CSS-only examples
packages/styled-react/src/index.tsx Adds sx-enabled Header wrapper for backward compatibility in styled-react package
.changeset/twelve-sloths-flow.md Documents the breaking change for version release

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

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 88.68 KB (+0.05% 🔺)
packages/react/dist/browser.umd.js 88.7 KB (-0.04% 🔽)

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

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

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

@francinelucca francinelucca added this pull request to the merge queue Sep 22, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-6839 September 22, 2025 19:03 Inactive
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Sep 22, 2025
@github-actions github-actions bot 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
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-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 22, 2025
@francinelucca francinelucca added this pull request to the merge queue Sep 22, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-6839 September 22, 2025 19:18 Inactive
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Sep 22, 2025
@github-actions github-actions bot 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
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 queue Sep 22, 2025
Merged via the queue into main with commit 32febac Sep 22, 2025
40 of 41 checks passed
@francinelucca francinelucca deleted the 6763-remove-sx-from-header branch September 22, 2025 19:34
@primer primer bot mentioned this pull request Sep 22, 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 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 Header component

4 participants