Skip to content

feat(FilteredSearch): remove support for sx and styled - #6840

Merged
francinelucca merged 2 commits into
mainfrom
refactor/update-filtered-search-to-css-modules
Sep 22, 2025
Merged

feat(FilteredSearch): remove support for sx and styled#6840
francinelucca merged 2 commits into
mainfrom
refactor/update-filtered-search-to-css-modules

Conversation

@joshblack

Copy link
Copy Markdown
Member

Closes#6777
Part of: https://github.com/github/primer/issues/5421 (for removal of styled)

Changelog

New

Changed

  • Update styled usage to CSS Modules

Removed

  • Remove support for sx from deprecated component

Rollout strategy

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

This component has no sx usage downstream and can safely be migrated

@joshblack
joshblack requested a review from a team as a code ownerSeptember 11, 2025 17:00
@changeset-bot

changeset-botBot commented Sep 11, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cd06b2a

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

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 removes support for the sx prop and migrates from styled-components to CSS Modules for the deprecated FilteredSearch component, as part of the broader effort to remove styled-components from the codebase.

  • Converts FilteredSearch from a styled-component to a regular React function component
  • Migrates styles from styled-components to CSS Modules using CSS custom properties
  • Removes the sx prop support which was provided by the styled-components implementation

Reviewed Changes

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

FileDescription
packages/react/src/deprecated/FilteredSearch/FilteredSearch.tsxConverts from styled-component to function component, removes sx prop support
packages/react/src/deprecated/FilteredSearch/FilteredSearch.module.cssNew CSS Module containing migrated styles with CSS custom properties
.changeset/rotten-carpets-raise.mdDocuments the breaking change for major version release

@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 Sep 11, 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!

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js88.64 KB (0%)
packages/react/dist/browser.umd.js88.73 KB (0%)

@siddharthkpsiddharthkp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's go!

@primer-integration

Copy link
Copy Markdown

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

@primer-integration

Copy link
Copy Markdown

🟢 ci completed with status success.

@github-actionsgithub-actionsBot added integration-tests: passing Changes in this PR do NOT 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 Sep 16, 2025
@francinelucca
francinelucca added this pull request to the merge queueSep 22, 2025
Merged via the queue into main with commit aba8050Sep 22, 2025
43 checks passed
@francinelucca
francinelucca deleted the refactor/update-filtered-search-to-css-modules branch September 22, 2025 19:18
@primerprimerBot mentioned this pull request Sep 22, 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/ghstaffAuthor is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove support for sx from the FilteredSearch component in @primer/react/deprecated

4 participants

@joshblack@siddharthkp@francinelucca