Skip to content

Conversation

francinelucca
Copy link
Member

@francinelucca francinelucca commented Oct 8, 2025

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

Copy link

changeset-bot bot commented Oct 8, 2025

🦋 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
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 8, 2025
Copy link
Contributor

github-actions bot commented Oct 8, 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!

@francinelucca francinelucca changed the title Revert "Revert "Chore: remove styled system components"" Chore: remove styled system components" Oct 8, 2025
@francinelucca francinelucca changed the title Chore: remove styled system components" Chore: remove styled system components Oct 8, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-6965 October 8, 2025 12:13 Inactive
@primer-integration
Copy link

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

@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 8, 2025
@github-actions github-actions bot requested a deployment to storybook-preview-6965 October 8, 2025 22:42 Abandoned
@francinelucca francinelucca requested a review from pksjce October 9, 2025 23:16
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 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
File Description
packages/styled-react/src/components/Text.tsx Updated Text component types and forward ref implementation
packages/react/src/internal/utils/sharedCheckboxAndRadioStyles.ts Removed styled-components shared styles file
packages/react/src/internal/components/ValidationAnimationContainer.tsx Migrated from styled-components to CSS modules
packages/react/src/internal/components/ValidationAnimationContainer.module.css Added CSS module for validation animation styles
packages/react/src/internal/components/TextInputWrapper.tsx Removed styled-system ResponsiveValue types
packages/react/src/experimental/UnderlinePanels/UnderlinePanels.tsx Removed SxProp from component interfaces
packages/react/src/deprecated/UnderlineNav/UnderlineNav.tsx Migrated from styled-components to CSS modules
packages/react/src/deprecated/UnderlineNav/UnderlineNav.module.css Added CSS module for UnderlineNav styles
packages/react/src/deprecated/ActionList/Item.tsx Replaced styled-system get() function with CSS variable
packages/react/src/UnderlineNav/UnderlineNav.tsx Removed styled MoreMenuListItem component
packages/react/src/Truncate/Truncate.tsx Replaced styled-system MaxWidthProps with direct type
packages/react/src/Tooltip/Tooltip.tsx Migrated from styled-components to CSS modules
packages/react/src/Tooltip/Tooltip.module.css Added CSS module for Tooltip styles
packages/react/src/TextInput/TextInput.tsx Reordered deprecated props
packages/react/src/TextInput/TextInput.docs.json Updated documentation for width props
packages/react/src/Text/Text.tsx Migrated to modern polymorphic pattern
packages/react/src/SkeletonAvatar/SkeletonAvatar.tsx Simplified style merging without sx utility
packages/react/src/Skeleton/SkeletonBox.tsx Simplified style merging without sx utility
packages/react/src/SegmentedControl/SegmentedControl.features.stories.tsx Replaced display prop with inline style
packages/react/src/PageLayout/PageLayout.examples.stories.tsx Removed commented code
packages/react/src/LabelGroup/LabelGroup.tsx Migrated from styled-components to CSS modules
packages/react/src/LabelGroup/LabelGroup.module.css Added CSS module for LabelGroup styles
packages/react/src/FormControl/FormControlLeadingVisual.tsx Replaced get() function with CSS variables
packages/react/src/DialogV1/Dialog.test.tsx Replaced fontFamily prop with inline style
packages/react/src/BranchName/tests/BranchName.types.test.tsx Added explicit type annotation for event parameter
packages/react/src/BranchName/BranchName.tsx Migrated to modern polymorphic pattern
.changeset/chilled-spoons-roll.md Added changelog entry

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@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 requested a deployment to storybook-preview-6965 October 10, 2025 00:33 Abandoned
@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 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 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 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-6965 October 10, 2025 01:00 Inactive
@francinelucca francinelucca added this pull request to the merge queue Oct 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 10, 2025
@francinelucca francinelucca added this pull request to the merge queue Oct 10, 2025
Merged via the queue into main with commit f61238c Oct 10, 2025
59 of 62 checks passed
@francinelucca francinelucca deleted the revert-6964-revert-6941-chore/remove-styled-system branch October 10, 2025 01:41
@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.

3 participants