Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 8, 2025

Migrated packages/react/src/Hidden/Hidden.examples.stories.tsx away from styled-components as part of the ongoing effort to remove styled-components dependencies from storybook stories.

Changes Made

Replaced styled-components usage with CSS Modules:

  • Box components: Replaced <Box sx={{padding: 3}}> with <div className={classes.Container}>
  • Text components: Replaced <Text sx={{fontSize: 1, color: 'fg.muted'}}> with <span className={classes.DescriptionText}>
  • Link components: Replaced sx={{fontWeight: 'bold'}} prop with className={classes.BoldLink}

Created CSS Module file:

Added Hidden.examples.stories.module.css with equivalent styles:

.Container {
  padding: var(--base-size-16);
}

.DescriptionText {
  font-size: var(--text-body-size-small);
  color: var(--fgColor-muted);
}

.BoldLink {
  font-weight: var(--base-text-weight-semibold);
}

Cleaned up imports:

  • Removed Box and Text from component imports
  • Removed unused clsx import
  • Added CSS module import

Screenshots

The migration maintains identical visual appearance and functionality:

Pull Request Page Example:
Pull Request Page Example

Webhooks Example:
Webhooks Example

All Hidden component examples continue to render correctly with proper responsive behavior, styling, and layout while eliminating styled-components dependencies.

Fixes #6530.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link

changeset-bot bot commented Aug 8, 2025

⚠️ No Changeset found

Latest commit: fa772c1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Copilot Copilot AI changed the title [WIP] Update Hidden.examples.stories.tsx to no longer use styled-components Update Hidden.examples.stories.tsx to no longer use styled-components Aug 8, 2025
@Copilot Copilot AI requested a review from hectahertz August 8, 2025 14:20
Copilot finished work on behalf of hectahertz August 8, 2025 14:20
@hectahertz hectahertz added skip changeset This change does not need a changelog update snapshots 🤖 Command that updates VRT snapshots on the pull request labels Aug 22, 2025
@hectahertz hectahertz marked this pull request as ready for review August 22, 2025 16:48
@Copilot Copilot AI review requested due to automatic review settings August 22, 2025 16:48
@hectahertz hectahertz requested a review from a team as a code owner August 22, 2025 16:48
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 the Hidden component's example stories from styled-components to CSS Modules as part of the ongoing effort to remove styled-components dependencies from Storybook stories.

  • Replaced Box and Text components with plain HTML elements (div, span) using CSS Module classes
  • Removed styled-components-based sx props in favor of className attributes
  • Created a new CSS Module file with equivalent styles using CSS custom properties

Reviewed Changes

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

File Description
packages/react/src/Hidden/Hidden.examples.stories.tsx Migrated from styled-components to CSS Modules, replacing Box/Text components with HTML elements and sx props with className
packages/react/src/Hidden/Hidden.examples.stories.module.css Added CSS Module with equivalent styles using CSS custom properties for container padding, description text, and bold links

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 added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Aug 22, 2025
Copy link
Contributor

github-actions bot commented Aug 22, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 90.13 KB (0%)
packages/react/dist/browser.umd.js 90.31 KB (0%)

@primer primer bot requested a review from a team as a code owner August 22, 2025 16:57
@primer primer bot requested a review from mperrotti August 22, 2025 16:57
@github-actions github-actions bot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Aug 22, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-6531 August 22, 2025 16:57 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm skip changeset This change does not need a changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Hidden.examples.stories.tsx to no longer use styled-components
2 participants