Uh oh!
There was an error while loading. Please reload this page.
chore: Migrate from toggleSxComponent to BoxWithFallback helper - #6311
Conversation
🦋 Changeset detectedLatest commit: 4db7f06 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull Request Overview
This pull request migrates from the deprecated toggleSxComponent utility to the newer BoxWithFallback component throughout the codebase. The migration is part of a broader effort to standardize how components handle conditional sx props.
- Removes the
toggleSxComponentutility function and its tests - Updates all components to use
BoxWithFallbackinstead oftoggleSxComponent - Cleans up migration status tracking to remove
toggleSxComponentdetection
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| script/styled-components-migration-status.mts | Removes toggleSxComponent detection from migration tracking |
| packages/react/src/internal/utils/toggleSxComponent.tsx | Completely removes the toggleSxComponent utility function |
| packages/react/src/internal/utils/tests/toggleSxComponent.test.tsx | Removes all tests for the deleted utility |
| packages/react/src/TooltipV2/Tooltip.tsx | Migrates from toggleSxComponent to BoxWithFallback |
| packages/react/src/Text/Text.tsx | Migrates from toggleSxComponent to BoxWithFallback |
| packages/react/src/Popover/Popover.tsx | Migrates from toggleSxComponent to BoxWithFallback and adds as prop to types |
| packages/react/src/PageHeader/PageHeader.tsx | Migrates multiple components from toggleSxComponent to BoxWithFallback |
| packages/react/src/Breadcrumbs/Breadcrumbs.tsx | Migrates from toggleSxComponent to BoxWithFallback |
👋 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! |
size-limit report 📦
|
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/389800 |
🟢 golden-jobs completed with status |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
The
BoxWithFallbackmodel is our preferred method for handling components that might still passsxprops, so I'm migrating the remainingtoggleSxComponentusages to theBoxWithFallbackcomponent.Changelog
New
Changed
Removed
Rollout strategy
Testing & Reviewing
Merge checklist