Skip to content

Conversation

@francinelucca
Copy link
Member

@francinelucca francinelucca commented Oct 17, 2025

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

francinelucca and others added 2 commits October 17, 2025 09:51
Co-authored-by: Siddharth Kshetrapal <siddharthkp@github.com>
Co-authored-by: siddharthkp <1863771+siddharthkp@users.noreply.github.com>
@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2025

🦋 Changeset detected

Latest commit: fb90a6e

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

@github-actions github-actions bot added staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 17, 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 temporarily deployed to storybook-preview-7027 October 17, 2025 13:00 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 17, 2025
@github-actions github-actions bot requested a deployment to storybook-preview-7027 October 17, 2025 22:13 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-7027 October 17, 2025 22:27 Inactive
@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 17, 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 20, 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!

@siddharthkp siddharthkp added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Oct 20, 2025
@siddharthkp
Copy link
Member

reset UnderLineNav snapshots

my bad shouldn't have completely reset them. added update snapshots label

@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 Oct 20, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-7027 October 20, 2025 15:16 Inactive
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 styled-components and styled-system dependencies from @primer/react, completing a major migration away from CSS-in-JS. The feature flag primer_react_use_styled_react_theming has reached 100% rollout, allowing safe removal of the fallback theming implementation.

Key changes:

  • Removed styled-components from @primer/react dependencies and migrated theming logic to use CSS variables
  • Moved styled-components support to @primer/styled-react package for legacy consumers
  • Eliminated Box component and sx prop that relied on styled-system

Reviewed Changes

Copilot reviewed 52 out of 66 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/react/src/ThemeProvider.tsx Removed styled-components ThemeProvider wrapper, replaced with native div using data attributes for theming
packages/react/src/BaseStyles.tsx Removed styled-system props and theme context dependency
packages/react/src/index.ts Removed themeGet export
packages/react/package.json Removed styled-components, styled-system, and related dependencies
packages/styled-react/src/index.tsx Updated exports to provide theming components from styled-react package
packages/styled-react/src/components/FeatureFlaggedTheming.tsx Deleted feature-flagged theming wrapper (no longer needed at 100%)
packages/styled-react/src/theme-get.ts New file exporting themeGet for styled-react consumers
packages/react/src/Box/* Removed deprecated Box component entirely
Example apps Updated to import theming components from @primer/styled-react
Test files Updated imports and replaced Box usage with native HTML elements

nightScheme: fallbackNightScheme,
} = useTheme()

// Initialize state
Copy link

Copilot AI Oct 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The theme variable is now only used internally for color scheme resolution but is still included in the ThemeContext. Consider documenting that this theme object is now primarily for backward compatibility with hooks like useTheme() and is no longer passed to styled-components.

Suggested change
// Initialize state
// Initialize state
/**
* The `theme` object is now only used internally for color scheme resolution.
* It is still included in ThemeContext primarily for backward compatibility with hooks like `useTheme()`.
* The `theme` object is no longer passed to styled-components.
* Consider this when updating or refactoring theme-related logic.
*/

Copilot uses AI. Check for mistakes.
@primer-integration
Copy link

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

@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 25, 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 27, 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 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 Oct 27, 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 requested a deployment to storybook-preview-7027 October 27, 2025 13:36 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-7027 October 27, 2025 13:47 Inactive
@TylerJDev TylerJDev enabled auto-merge October 27, 2025 16:04
@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 Oct 27, 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!

@TylerJDev TylerJDev added this pull request to the merge queue Oct 27, 2025
Merged via the queue into main with commit 415fafc Oct 27, 2025
40 of 41 checks passed
@TylerJDev TylerJDev deleted the bye-bye-styled-components branch October 27, 2025 16:58
@primer primer bot mentioned this pull request Oct 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 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.

4 participants