-
Notifications
You must be signed in to change notification settings - Fork 628
Remove Box usage from Storybook stories and tests #6718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 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! |
There was a problem hiding this 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 the usage of the deprecated Box
component from Storybook stories and tests throughout the codebase. The changes replace Box
components with native HTML elements (div
, form
, etc.) or more appropriate semantic alternatives like Stack
, while maintaining the same styling using CSS modules or inline styles.
Key Changes:
- Replaces
Box
components with semantic HTML elements and CSS modules for styling - Migrates Box-based layouts to use the
Stack
component where appropriate for flexible layouts - Updates imports to remove
Box
and add necessary styling alternatives
Reviewed Changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/react/src/stories/useFocusTrap.stories.tsx |
Replaced Box layout components with Stack and div elements, added CSS module for styling |
packages/react/src/stories/useAnchoredPosition.stories.tsx |
Converted Box-based positioning to native div elements with CSS modules |
packages/react/src/stories/deprecated/SideNav.dev.stories.tsx |
Replaced Box styling with inline CSS custom properties |
packages/react/src/stories/ThemeProvider.stories.tsx |
Migrated Box containers to div elements with CSS module classes |
packages/react/src/experimental/SelectPanel2/ |
Updated multiple story files to use shared CSS modules instead of Box styling |
packages/react/src/TreeView/ |
Replaced Box containers with div elements and CSS modules |
packages/react/src/TextInput/TextInput.dev.stories.tsx |
Changed Box form containers to semantic form elements |
packages/react/src/Portal/ |
Migrated Box styling to CSS modules with clsx for conditional classes |
packages/react/src/Overlay/ |
Extensive replacement of Box layouts with CSS modules and semantic elements |
Various test files | Updated test components to use semantic HTML instead of Box |
size-limit report 📦
|
Updating the rest of the snapshots because the diffs were very minor spacing things that have no impact outside of Storybook. |
Relates to https://github.com/github/primer/issues/5425 and https://github.com/github/primer/issues/5422
Changelog
New
Changed
Removed
Rollout strategy
Testing & Reviewing
Merge checklist