Skip to content

Conversation

siddharthkp
Copy link
Member

@siddharthkp siddharthkp commented Oct 7, 2025

We are in the process of removing styled-components from @primer/react and moving styled-components based styling to @primer/styled-react. This includes ThemeProvider, BaseStyles and useTheme

It's important that ThemeProvider and a component or utility (like useTheme) that depends on the theme uses the same instance of Context from styled-components.

To roll this change out safely, we are using a feature flag that can serve as a kill switch to go back to using theme components from @primer/react like today.

To do this, we are

  1. re-exporting @primer/react theme components (like ThemeProvider) from @primer/styled-react
  2. creating a copy of theme components in @primer/styled-react
  3. using the feature flag to switch between re-exported and local theme components

The plan is to roll this change out slowly over a week and then removing the feature flag

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

@siddharthkp siddharthkp self-assigned this Oct 7, 2025
Copy link

changeset-bot bot commented Oct 7, 2025

🦋 Changeset detected

Latest commit: 0f30134

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 Patch
@primer/styled-react Minor

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

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

github-actions bot commented Oct 7, 2025

👋 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 requested a deployment to storybook-preview-6958 October 7, 2025 20:32 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6958 October 7, 2025 20:40 Inactive
@github-actions github-actions bot added integration-tests: failing Changes in this PR 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 Oct 7, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-6958 October 7, 2025 21:02 Inactive
@github-actions github-actions bot requested a deployment to storybook-preview-6958 October 7, 2025 21:17 Abandoned
@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 Oct 7, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-6958 October 8, 2025 11:57 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-6958 October 8, 2025 12:05 Inactive
@github-actions github-actions bot added integration-tests: failing Changes in this PR 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 integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh labels Oct 8, 2025
@siddharthkp siddharthkp mentioned this pull request Oct 8, 2025
13 tasks
@primer-integration
Copy link

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

Increased wait time for tooltip delay to ensure stable screenshots.
@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 Oct 10, 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 Oct 10, 2025
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 temporarily deployed to storybook-preview-6958 October 10, 2025 12:39 Inactive
@siddharthkp siddharthkp added this pull request to the merge queue Oct 10, 2025
Merged via the queue into main with commit 3032026 Oct 10, 2025
40 of 41 checks passed
@siddharthkp siddharthkp deleted the styled-react-themeprovider branch October 10, 2025 12:54
@primer primer bot mentioned this pull request Oct 10, 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.

2 participants