Skip to content

Conversation

joshblack
Copy link
Member

Closes #6764

Changelog

New

Changed

Removed

  • Remove support for sx from Heading
  • Remove support for sx from PageHeader.Title

Rollout strategy

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

We are using the @primer/styled-react migration method for sx for this component

@joshblack joshblack requested a review from a team as a code owner September 16, 2025 17:26
Copy link

changeset-bot bot commented Sep 16, 2025

🦋 Changeset detected

Latest commit: c6400b2

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

@joshblack joshblack changed the title Refactor/remove sx from heading feat(Heading): remove support for sx prop Sep 16, 2025
@github-actions github-actions bot added the staff Author is a staff member label Sep 16, 2025
Copy link
Contributor

@Copilot 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 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 sx prop support from the core Heading component implementation
  • Add compatibility wrapper in @primer/styled-react package for gradual migration
  • Clean up related tests, stories, and documentation that used the deprecated sx prop

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

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 16, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-6860 September 16, 2025 17:35 Inactive
@github-actions github-actions bot requested a deployment to storybook-preview-6860 September 22, 2025 19:39 Abandoned
@github-actions github-actions bot requested a deployment to storybook-preview-6860 September 22, 2025 19:48 Abandoned
@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
@primer-integration
Copy link

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

@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: failing Changes in this PR cause breaking changes in gh/gh labels Sep 24, 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 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 Heading component
3 participants