Skip to content

Chore: remove styled system components - #6965

Merged
francinelucca merged 25 commits into
mainfrom
revert-6964-revert-6941-chore/remove-styled-system
Oct 10, 2025
Merged

Chore: remove styled system components#6965
francinelucca merged 25 commits into
mainfrom
revert-6964-revert-6941-chore/remove-styled-system

Conversation

@francinelucca

@francineluccafrancinelucca commented Oct 8, 2025

Copy link
Copy Markdown
Member

Migrates leftover styled-system components into css modules

Changelog

Changed

  • Migrate leftover styled-system components into css modules

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

@changeset-bot

changeset-botBot commented Oct 8, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fe9450b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@primer/reactMajor
@primer/styled-reactMajor

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-actionsgithub-actionsBot 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 8, 2025
@github-actions

Copy link
Copy Markdown
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!

@francineluccafrancinelucca changed the title Revert "Revert "Chore: remove styled system components""Chore: remove styled system components"Oct 8, 2025
@francineluccafrancinelucca changed the title Chore: remove styled system components"Chore: remove styled system componentsOct 8, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6965 October 8, 2025 12:13 Inactive
@primer-integration

Copy link
Copy Markdown

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

@github-actionsgithub-actionsBot 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 8, 2025
@github-actionsgithub-actionsBot removed the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Oct 9, 2025
@github-actions

Copy link
Copy Markdown
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-actionsgithub-actionsBot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Oct 9, 2025
@github-actionsgithub-actionsBot removed the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Oct 9, 2025
@github-actions

Copy link
Copy Markdown
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-actionsgithub-actionsBot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Oct 9, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6965 October 9, 2025 22:03 Inactive
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6965 October 9, 2025 22:17 Inactive
@github-actionsgithub-actionsBot 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 9, 2025
@github-actions

Copy link
Copy Markdown
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.com:primer/react into revert-6964-revert-6941-chore/remove-styled-system
@github-actionsgithub-actionsBot 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 9, 2025
@github-actions

Copy link
Copy Markdown
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-actionsBot requested a deployment to storybook-preview-6965 October 9, 2025 22:30 Abandoned
@primer-integration

Copy link
Copy Markdown

🟢 ci completed with status success.

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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 migrates leftover styled-system components to CSS modules as part of the effort to remove styled-components from the Primer React codebase. The changes convert styled-components implementations to modern CSS modules with equivalent styling and functionality.

Key changes:

  • Convert styled-components to CSS modules for multiple components
  • Remove styled-system dependencies and replace with direct CSS properties
  • Update component implementations to use modern polymorphic patterns

Reviewed Changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/styled-react/src/components/Text.tsxUpdated Text component types and forward ref implementation
packages/react/src/internal/utils/sharedCheckboxAndRadioStyles.tsRemoved styled-components shared styles file
packages/react/src/internal/components/ValidationAnimationContainer.tsxMigrated from styled-components to CSS modules
packages/react/src/internal/components/ValidationAnimationContainer.module.cssAdded CSS module for validation animation styles
packages/react/src/internal/components/TextInputWrapper.tsxRemoved styled-system ResponsiveValue types
packages/react/src/experimental/UnderlinePanels/UnderlinePanels.tsxRemoved SxProp from component interfaces
packages/react/src/deprecated/UnderlineNav/UnderlineNav.tsxMigrated from styled-components to CSS modules
packages/react/src/deprecated/UnderlineNav/UnderlineNav.module.cssAdded CSS module for UnderlineNav styles
packages/react/src/deprecated/ActionList/Item.tsxReplaced styled-system get() function with CSS variable
packages/react/src/UnderlineNav/UnderlineNav.tsxRemoved styled MoreMenuListItem component
packages/react/src/Truncate/Truncate.tsxReplaced styled-system MaxWidthProps with direct type
packages/react/src/Tooltip/Tooltip.tsxMigrated from styled-components to CSS modules
packages/react/src/Tooltip/Tooltip.module.cssAdded CSS module for Tooltip styles
packages/react/src/TextInput/TextInput.tsxReordered deprecated props
packages/react/src/TextInput/TextInput.docs.jsonUpdated documentation for width props
packages/react/src/Text/Text.tsxMigrated to modern polymorphic pattern
packages/react/src/SkeletonAvatar/SkeletonAvatar.tsxSimplified style merging without sx utility
packages/react/src/Skeleton/SkeletonBox.tsxSimplified style merging without sx utility
packages/react/src/SegmentedControl/SegmentedControl.features.stories.tsxReplaced display prop with inline style
packages/react/src/PageLayout/PageLayout.examples.stories.tsxRemoved commented code
packages/react/src/LabelGroup/LabelGroup.tsxMigrated from styled-components to CSS modules
packages/react/src/LabelGroup/LabelGroup.module.cssAdded CSS module for LabelGroup styles
packages/react/src/FormControl/FormControlLeadingVisual.tsxReplaced get() function with CSS variables
packages/react/src/DialogV1/Dialog.test.tsxReplaced fontFamily prop with inline style
packages/react/src/BranchName/tests/BranchName.types.test.tsxAdded explicit type annotation for event parameter
packages/react/src/BranchName/BranchName.tsxMigrated to modern polymorphic pattern
.changeset/chilled-spoons-roll.mdAdded changelog entry

Comment threadpackages/react/src/Text/Text.tsx
Comment threadpackages/react/src/BranchName/BranchName.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
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

Copy link
Copy Markdown
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

Copy link
Copy Markdown
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!

@primerprimerBot mentioned this pull request Oct 10, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: passingChanges in this PR do NOT cause breaking changes in gh/ghintegration-tests: recommendedThis change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpmstaffAuthor is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@francinelucca@jonrohan