-
Notifications
You must be signed in to change notification settings - Fork 645
feat(Heading): remove support for sx prop #6860
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: 0bc1f5f 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 Heading component and PageHeader.Title as part of the migration away from styled-components to CSS modules. The refactor introduces a styled-react compatibility layer for consumers still using the sx prop.
Key changes:
- Remove
sxprop support from the coreHeadingcomponent implementation - Add compatibility wrapper in
@primer/styled-reactpackage for gradual migration - Clean up related tests, stories, and documentation that used the deprecated
sxprop
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/react/src/Heading/Heading.tsx |
Remove sx prop support and Box wrapper from core component |
packages/styled-react/src/components/Heading.tsx |
Add compatibility wrapper that preserves sx functionality via Box |
packages/react/src/PageHeader/PageHeader.tsx |
Remove sx prop from PageHeader.Title component |
packages/react/src/Heading/__tests__/Heading.test.tsx |
Remove tests for deprecated sx functionality |
packages/react/src/Heading/Heading.features.stories.tsx |
Remove story demonstrating sx usage |
packages/react/src/Popover/Popover.figma.tsx |
Update Figma example to remove sx usage |
|
👋 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! |
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/3166 |
|
🟢 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! |
Closes #6764
Changelog
New
Changed
Removed
sxfromHeadingsxfromPageHeader.TitleRollout strategy
We are using the
@primer/styled-reactmigration method forsxfor this component