Skip to content

Conversation

mperrotti
Copy link
Contributor

Relates to https://github.com/github/primer/issues/5425 and https://github.com/github/primer/issues/5422

Changelog

New

Changed

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why
    • No release needed - these are just stories and tests

Testing & Reviewing

Merge checklist

@mperrotti mperrotti added the skip changeset This change does not need a changelog label Sep 4, 2025
Copy link

changeset-bot bot commented Sep 4, 2025

⚠️ No Changeset found

Latest commit: 66b200a

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

@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 Sep 4, 2025
Copy link
Contributor

github-actions bot commented Sep 4, 2025

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

@mperrotti mperrotti marked this pull request as ready for review September 4, 2025 01:32
@Copilot Copilot AI review requested due to automatic review settings September 4, 2025 01:32
@mperrotti mperrotti requested a review from a team as a code owner September 4, 2025 01:32
@mperrotti mperrotti requested a review from TylerJDev September 4, 2025 01:32
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 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

Copy link
Contributor

github-actions bot commented Sep 4, 2025

size-limit report 📦

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

@github-actions github-actions bot requested a deployment to storybook-preview-6718 September 4, 2025 01:35 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6718 September 4, 2025 01:43 Inactive
@github-actions github-actions bot requested a deployment to storybook-preview-6718 September 9, 2025 17:47 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6718 September 9, 2025 17:55 Inactive
@mperrotti mperrotti added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Sep 9, 2025
@mperrotti
Copy link
Contributor Author

Updating the rest of the snapshots because the diffs were very minor spacing things that have no impact outside of Storybook.

@primer primer bot requested a review from a team as a code owner September 9, 2025 18:12
@primer primer bot requested a review from langermank September 9, 2025 18:12
@github-actions github-actions bot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Sep 9, 2025
@mperrotti mperrotti added this pull request to the merge queue Sep 9, 2025
Merged via the queue into main with commit d47bced Sep 9, 2025
43 checks passed
@mperrotti mperrotti deleted the mp/rm-box-stories-tests branch September 9, 2025 18:31
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.

3 participants