Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 8, 2025

As part of the ongoing migration away from styled-components, this PR removes all styled-components usage from the TreeViewWithLeadingAction.stories.tsx file and replaces it with CSS Modules.

Changes Made

Removed styled-components dependencies:

  • Removed Box component imports and usage
  • Replaced all sx prop usage with CSS classes
  • Created a new CSS Module file for story-specific styling

Migration details:

  • <Box sx={{maxWidth: 400}}><div className={classes.StoryContainer}>
  • <Box> wrapper → <div>
  • sx={{color: 'done.fg'}}className={classes.DoneIcon} using --fgColor-done
  • sx={{color: 'open.fg'}}className={classes.OpenIcon} using --fgColor-open

New CSS Module file: TreeViewWithLeadingAction.stories.module.css

.StoryContainer {
  max-width: 400px;
}

.DoneIcon {
  color: var(--fgColor-done);
}

.OpenIcon {
  color: var(--fgColor-open);
}

The story functionality remains exactly the same - this is a pure refactoring from styled-components to CSS Modules with no visual or behavioral changes.

Screenshot showing the migrated TreeViewWithLeadingAction story working correctly with proper icon colors and styling

Fixes #6528.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link

changeset-bot bot commented Aug 8, 2025

⚠️ No Changeset found

Latest commit: 6911dfe

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 TreeViewWithLeadingAction.stories.tsx to no longer use styled-components Update TreeViewWithLeadingAction.stories.tsx to no longer use styled-components Aug 8, 2025
Copilot finished work on behalf of hectahertz August 8, 2025 11:15
@Copilot Copilot AI requested a review from hectahertz August 8, 2025 11:15
@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:46
@Copilot Copilot AI review requested due to automatic review settings August 22, 2025 16:46
@hectahertz hectahertz requested a review from a team as a code owner August 22, 2025 16:46
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 TreeViewWithLeadingAction.stories.tsx file from using styled-components to CSS Modules as part of the broader effort to remove styled-components dependencies from the codebase.

Key changes:

  • Replaces Box components with standard div elements
  • Removes all sx prop usage in favor of CSS classes
  • Creates a dedicated CSS Module file for story-specific styling

Reviewed Changes

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

File Description
packages/react/src/TreeView/TreeViewWithLeadingAction.stories.tsx Removes styled-components imports and usage, replaces Box components with divs and sx props with CSS classes
packages/react/src/TreeView/TreeViewWithLeadingAction.stories.module.css New CSS Module file containing the equivalent styles for the migrated components

@hectahertz hectahertz enabled auto-merge August 22, 2025 16:46
@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

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

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 langermank 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-6529 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 TreeViewWithLeadingAction.stories.tsx to no longer use styled-components
2 participants