Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 8, 2025

As part of the migration away from styled-components, this PR updates packages/react/src/stories/deprecated/SideNav.dev.stories.tsx to use CSS modules instead of the deprecated Box component.

Changes Made

  • Removed Box import: The Box component was removed from the imports as it relies on styled-components
  • Created CSS module: Added SideNav.dev.module.css with equivalent styles for the container and menu header
  • Replaced Box components with div elements: The two Box components in the LightweightVariant story were replaced with div elements using CSS classes
  • Updated styling approach: Converted from styled-system props to CSS custom properties following the project's design token conventions

CSS Classes Added

  • .ContainerBox: Provides border, padding, background, and max-width styling for the outer container
  • .MenuHeader: Provides border-bottom, margin, and padding styling for the menu header section

The visual appearance of the stories remains unchanged while removing the dependency on styled-components infrastructure.

Fixes #6526.


💬 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: baa033c

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 SideNav.dev.stories.tsx to no longer use styled-components Update SideNav.dev.stories.tsx to no longer use styled-components Aug 8, 2025
@Copilot Copilot AI requested a review from hectahertz August 8, 2025 11:11
Copilot finished work on behalf of hectahertz August 8, 2025 11:11
@hectahertz hectahertz marked this pull request as ready for review August 22, 2025 16:45
@Copilot Copilot AI review requested due to automatic review settings August 22, 2025 16:45
@hectahertz hectahertz requested review from a team as code owners August 22, 2025 16:45
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 SideNav dev stories from using the deprecated Box component (which relies on styled-components) to CSS modules as part of the broader styled-components migration effort.

  • Removed Box component dependency and replaced with standard div elements
  • Added CSS module with equivalent styling using design token CSS custom properties
  • Updated the LightweightVariant story to use the new CSS classes while maintaining visual appearance

Reviewed Changes

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

File Description
packages/react/src/stories/deprecated/SideNav.dev.stories.tsx Removed Box import, added CSS module import, replaced Box components with div elements using CSS classes
packages/react/src/stories/deprecated/SideNav.dev.module.css Added CSS module with ContainerBox and MenuHeader classes using design token CSS custom properties

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

@hectahertz
Copy link
Contributor

@copilot can you run npm format?

Copy link
Contributor

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%)

Copy link
Contributor Author

Copilot AI commented Aug 22, 2025

@copilot can you run npm format?

Done! Ran npm format and committed the formatting changes (88bb34f). The CSS file was updated to include a proper newline at the end.

auto-merge was automatically disabled August 22, 2025 16:53

Head branch was pushed to by a user without write access

Copilot finished work on behalf of hectahertz August 22, 2025 16:53
@github-actions github-actions bot temporarily deployed to storybook-preview-6527 August 22, 2025 16:54 Inactive
@primer primer bot requested a review from a team as a code owner August 22, 2025 16:55
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 SideNav.dev.stories.tsx to no longer use styled-components
2 participants