Skip to content

Update Select stories to no longer use styled-components#6478

Merged
llastflowers merged 12 commits intomainfrom
llastflowers/5625-5626/no-SC-Select-stories
Aug 12, 2025
Merged

Update Select stories to no longer use styled-components#6478
llastflowers merged 12 commits intomainfrom
llastflowers/5625-5626/no-SC-Select-stories

Conversation

@llastflowers
Copy link
Copy Markdown
Contributor

@llastflowers llastflowers commented Aug 6, 2025

Closes https://github.com/github/primer/issues/5625
Closes https://github.com/github/primer/issues/5626
Closes https://github.com/github/primer/issues/5627

Changelog

New

Added 2 new CSS modules

Changed

Changed Select.features.stories.tsx and Select.stories.tsx and Select.dev.stories.tsx to no longer use styled-components

Changed the className prop to be on TextInputWrapper instead of Select, so that using className on Select components styles the wrapper correctly (as was already happening when using the sx prop, which was correctly passed to TextInputWrapper).

Removed

Removed anything associated with styled-components

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

@llastflowers llastflowers self-assigned this Aug 6, 2025
@llastflowers llastflowers added skip changeset This change does not need a changelog integration-tests: skipped manually Changes in this PR do not require an integration test labels Aug 6, 2025
@changeset-bot

This comment was marked as resolved.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 6, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 90.15 KB (-0.15% 🔽)
packages/react/dist/browser.umd.js 90.34 KB (-0.11% 🔽)

@github-actions github-actions bot requested a deployment to storybook-preview-6478 August 6, 2025 20:06 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6478 August 6, 2025 20:16 Inactive
@llastflowers llastflowers marked this pull request as ready for review August 6, 2025 20:19
Copilot AI review requested due to automatic review settings August 6, 2025 20:19
@llastflowers llastflowers requested a review from a team as a code owner August 6, 2025 20:19
@llastflowers llastflowers requested a review from jonrohan August 6, 2025 20:19
Copy link
Copy Markdown
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 dependencies from Select component stories by replacing styled-components usage with CSS modules and native HTML elements. The changes support migration away from styled-components while maintaining the same visual functionality.

  • Replace Box as="form" with native <form> elements across all stories
  • Replace sx prop styling with CSS modules for custom styling story
  • Add new wrapperClassName prop to Select component to support custom styling

Reviewed Changes

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

File Description
Select.tsx Adds wrapperClassName prop to pass custom CSS classes to the wrapper element
Select.stories.tsx Replaces styled-components Box with native form elements
Select.features.stories.tsx Replaces styled-components usage and implements CSS module for custom styling
Select.features.stories.module.css New CSS module defining custom select styling

@llastflowers llastflowers removed skip changeset This change does not need a changelog integration-tests: skipped manually Changes in this PR do not require an integration test labels Aug 7, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 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 added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Aug 7, 2025
… on the outer span wrapper of the select, which is TextInputWrapper
@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 Aug 7, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 7, 2025

👋 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!

Copy link
Copy Markdown
Member

@jonrohan jonrohan left a comment

Choose a reason for hiding this comment

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

👍🏻

@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 Aug 12, 2025
@github-actions

This comment was marked as outdated.

@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 Aug 12, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-6478 August 12, 2025 16:11 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-6478 August 12, 2025 17:16 Inactive
@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 Aug 12, 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!

@llastflowers llastflowers added this pull request to the merge queue Aug 12, 2025
Merged via the queue into main with commit 77c8739 Aug 12, 2025
43 of 44 checks passed
@llastflowers llastflowers deleted the llastflowers/5625-5626/no-SC-Select-stories branch August 12, 2025 19:08
@primer primer bot mentioned this pull request Aug 12, 2025
Copilot AI mentioned this pull request Mar 19, 2026
13 tasks
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants