Skip to content

Conversation

liuliu-dev
Copy link
Contributor

@liuliu-dev liuliu-dev commented Aug 25, 2025

Wait until this PR is merged in github-ui: https://github.com/github/github-ui/pull/3366

Closes #5769
0 repo are still using sx props with Tooltip .

Changelog

Removed

Removed sx props from deprecated Tooltip and TooltipV2

Rollout strategy

  • Major release; if selected, include a written rollout or migration plan

Copy link

changeset-bot bot commented Aug 25, 2025

🦋 Changeset detected

Latest commit: e7d506a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@primer/react Major
@primer/styled-react Major

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

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!

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

github-actions bot commented Aug 25, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 89.86 KB (+0.02% 🔺)
packages/react/dist/browser.umd.js 89.95 KB (-0.06% 🔽)

@github-actions github-actions bot temporarily deployed to storybook-preview-6667 August 26, 2025 22:01 Inactive
@liuliu-dev liuliu-dev marked this pull request as ready for review August 26, 2025 22:47
@Copilot Copilot AI review requested due to automatic review settings August 26, 2025 22:47
@liuliu-dev liuliu-dev requested a review from a team as a code owner August 26, 2025 22:47
@liuliu-dev liuliu-dev requested a review from hectahertz August 26, 2025 22:47
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 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 sx prop from both Tooltip and TooltipV2 component type definitions
  • Replaced BoxWithFallback with native span element in TooltipV2
  • 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

Copy link
Contributor

@hectahertz hectahertz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@github-actions github-actions bot temporarily deployed to storybook-preview-6667 September 16, 2025 21:36 Inactive
@github-actions github-actions bot requested a deployment to storybook-preview-6667 September 16, 2025 21:40 Abandoned
@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: failing Changes in this PR cause breaking changes in gh/gh labels Sep 25, 2025
@liuliu-dev liuliu-dev requested review from a team and hectahertz September 25, 2025 23:02
Copy link
Member

@francinelucca francinelucca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +11 to +24
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} />
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we do the new as hack just in case? I think in theory it affects every component

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah got it, thanks! ❤️

@liuliu-dev liuliu-dev changed the title Remove sx props and BoxWithFallback from TooltipV2 and Tooltip DO NOT MERGE:Remove sx props and BoxWithFallback from TooltipV2 and Tooltip Sep 26, 2025
Copy link
Contributor

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

@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 30, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-6667 September 30, 2025 23:08 Inactive
@github-actions github-actions bot added integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Sep 30, 2025
Copy link
Contributor

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

@primer-integration
Copy link

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/3596

@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh labels Sep 30, 2025
@primer-integration
Copy link

🟢 ci completed with status success.

@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: failing Changes in this PR cause breaking changes in gh/gh labels Oct 1, 2025
@liuliu-dev liuliu-dev added this pull request to the merge queue Oct 1, 2025
@francinelucca francinelucca changed the title DO NOT MERGE:Remove sx props and BoxWithFallback from TooltipV2 and Tooltip Remove sx props and BoxWithFallback from TooltipV2 and Tooltip Oct 1, 2025
Merged via the queue into main with commit d122122 Oct 1, 2025
44 checks passed
@liuliu-dev liuliu-dev deleted the liuliu/migrate-tooltip branch October 1, 2025 01:09
@primer primer bot mentioned this pull request Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants