Uh oh!
There was an error while loading. Please reload this page.
Remove sx props and BoxWithFallback from TooltipV2 and Tooltip - #6667
Conversation
🦋 Changeset detectedLatest commit: e7d506a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
👋 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 📦
|
There was a problem hiding this comment.
Pull Request Overview
This PR removes the deprecated sx prop support from both Tooltip and TooltipV2 components as part of a major release. The changes align with the design system's move away from styled-system props in favor of more maintainable styling approaches.
Key Changes
- Removed
sxprop from bothTooltipandTooltipV2component type definitions - Replaced
BoxWithFallbackwith nativespanelement inTooltipV2 - Cleaned up styled-components integration in legacy
Tooltip
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/react/src/TooltipV2/Tooltip.tsx | Removed SxProp import and type, replaced BoxWithFallback with span |
packages/react/src/TooltipV2/Tooltip.docs.json | Removed sx prop from component documentation |
packages/react/src/Tooltip/Tooltip.tsx | Removed SxProp type and sx function from styled-component |
packages/react/src/Tooltip/Tooltip.docs.json | Removed sx prop from component documentation |
.changeset/pink-rockets-win.md | Added changeset entry for major version bump |
| const Tooltip: ForwardRefExoticComponent<TooltipProps & RefAttributes<HTMLDivElement>> = forwardRef< | ||
| HTMLDivElement, | ||
| TooltipProps | ||
| >(function Tooltip(props, ref) { | ||
| return <Box as={PrimerTooltip} ref={ref} {...props} /> | ||
| }) | ||
| export {Tooltip, type TooltipProps} | ||
| type DeprecatedTooltipProps = PrimerDeprecatedTooltipProps & SxProp | ||
| function DeprecatedTooltip(props: DeprecatedTooltipProps) { | ||
| return <Box as={PrimerDeprecatedTooltip} {...props} /> | ||
| } |
There was a problem hiding this comment.
should we do the new as hack just in case? I think in theory it affects every component
There was a problem hiding this comment.
I think this only affects polymorphic components that take an as prop, Tooltip isn’t one of them, so it should be fine.
I tested it in primer-react.browser.test.tsx and confirmed that the props and children are passed correctly for Tooltip.
sx props and BoxWithFallback from TooltipV2 and Tooltipsx props and BoxWithFallback from TooltipV2 and Tooltip👋 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! |
👋 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! |
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/3596 |
🟢 ci completed with status |
sx props and BoxWithFallback from TooltipV2 and Tooltipsx props and BoxWithFallback from TooltipV2 and TooltipUh oh!
There was an error while loading. Please reload this page.
Wait until this PR is merged in
github-ui: https://github.com/github/github-ui/pull/3366Closes#5769
0 repo are still using
sxprops withTooltip.Changelog
Removed
Removed
sxprops from deprecatedTooltipandTooltipV2Rollout strategy