Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 8, 2025

This PR removes all styled-components usage from TreeView.examples.stories.tsx as part of the broader migration away from styled-components in storybook stories.

Changes Made

Removed styled-components dependencies:

  • Removed Box component import and usage
  • Eliminated sx prop with CSS-in-JS styles
  • Replaced styled-components with native HTML elements

Added CSS modules implementation:

  • Created TreeView.examples.stories.module.css with equivalent styles
  • Migrated decorator's max-width constraint (400px) to .Container class
  • Migrated complex hover/focus behavior for draggable items to .DraggableContainer class
  • Used PascalCase naming convention per project standards

Key functionality preserved:

  • Story decorator still constrains TreeView width to 400px
  • Draggable items maintain the same hover/focus behavior where .treeview-leading-action is hidden by default and visible on hover/focus
  • All existing visual behavior and component functionality remains identical

The migration maintains the exact same CSS specificity and styling behavior while removing the dependency on styled-components. CSS module selectors properly target the existing treeview-item and treeview-leading-action class names with appropriate stylelint disable comments for non-module selectors.

Fixes #6538.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link

changeset-bot bot commented Aug 8, 2025

⚠️ No Changeset found

Latest commit: 7100289

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 TreeView.examples.stories.tsx to no longer use styled-components Update TreeView.examples.stories.tsx to no longer use styled-components Aug 8, 2025
@Copilot Copilot AI requested a review from hectahertz August 8, 2025 15:41
Copilot finished work on behalf of hectahertz August 8, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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