-
Notifications
You must be signed in to change notification settings - Fork 645
feat(Header): remove support for sx prop #6839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: f810e3b The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
There was a problem hiding this 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
sxprop support fromHeader,Header.Item, andHeader.Linkcomponents - Replaces
BoxWithFallbackwith native HTML elements and direct component rendering - Migrates Storybook examples from
sxprops 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 |
|
👋 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! |
size-limit report 📦
|
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/2666 |
|
🟢 ci completed with status |
|
👋 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! |
|
👋 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! |
|
👋 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! |
Closes #6763
Changelog
New
Changed
Removed
sxfrom theHeadercomponentRollout strategy
This component has no
sxusage in github-ui and can be rolled out. We also introduced this component to@primer/styled-reactto help out with usage outside ofgithub-ui