Skip to content

feat: add React Compiler support for Tooltip#8061

Open
joshblack wants to merge 2 commits into
mainfrom
copilot/react-compiler-tooltip-v2
Open

feat: add React Compiler support for Tooltip#8061
joshblack wants to merge 2 commits into
mainfrom
copilot/react-compiler-tooltip-v2

Conversation

@joshblack

Copy link
Copy Markdown
Member

Closes #

Adds React Compiler support for Tooltip by removing TooltipV2 from the compiler unsupported list. Updates the ActionMenu integration test helper to render as a React component instead of invoking JSX as a plain function.

Changelog

New

  • React Compiler support for Tooltip

Changed

  • Updated Tooltip ActionMenu integration tests to be compatible with React Compiler

Removed

  • Removed TooltipV2 from the React Compiler unsupported list

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

Testing & Reviewing

  • npx eslint --no-cache 'packages/react/src/TooltipV2/**/*.{ts,tsx}'
  • npm test -- --run packages/react/src/TooltipV2/__tests__/Tooltip.test.tsx
  • npm run build && npm test -- --run && npm run type-check && npm run lint && npm run lint:css && npm run format:diff
  • Verified Storybook responds locally

Merge checklist

@changeset-bot

changeset-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ecf0922

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

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

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

@github-actions github-actions Bot added the staff Author is a staff member label Jun 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. If this doesn't work, you can also use the original workflow here. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

To publish a canary release for integration testing, apply the Canary Release label 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 Jun 25, 2026
@joshblack joshblack marked this pull request as ready for review June 25, 2026 14:43
@joshblack joshblack requested a review from a team as a code owner June 25, 2026 14:43
@joshblack joshblack requested review from TylerJDev and Copilot and removed request for Copilot June 25, 2026 14:43
@github-actions github-actions Bot temporarily deployed to storybook-preview-8061 June 25, 2026 14:44 Inactive
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 29, 2026 14:53
@joshblack joshblack force-pushed the copilot/react-compiler-tooltip-v2 branch from 33c018f to 76c1f32 Compare June 29, 2026 14:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Enables React Compiler support for TooltipV2 by allowing TooltipV2 sources to be included in the compiler-supported set, and updates TooltipV2’s ActionMenu-related tests to render the helper as a React component (instead of calling a JSX-returning function) for compiler compatibility.

Changes:

  • Removed src/TooltipV2/**/*.tsx from the React Compiler “unsupported” list.
  • Refactored the ActionMenu test helper in TooltipV2 tests into a component with props.
  • Added a patch changeset documenting Tooltip’s React Compiler support.
Show a summary per file
File Description
packages/react/src/TooltipV2/tests/Tooltip.test.tsx Refactors the ActionMenu test helper into a component for React Compiler compatibility.
packages/react/script/react-compiler.mjs Removes TooltipV2 from the compiler unsupported patterns list.
.changeset/react-compiler-tooltip-v2.md Adds a patch changeset noting Tooltip React Compiler support.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment on lines +32 to +34
interface ExampleWithActionMenuProps {
actionMenuTrigger: React.ReactElement
}
@github-actions github-actions Bot temporarily deployed to storybook-preview-8061 June 29, 2026 15:08 Inactive
@primer-integration

primer-integration Bot commented Jun 29, 2026

Copy link
Copy Markdown

Integration test results from github/github-ui PR:

Failed  CI   Failed
Running  VRT   Running
Waiting  Projects   Waiting

CI check runs linting, type checking, and unit tests. Check the workflow logs for specific failures.

Need help? If you believe this failure is unrelated to your changes, please reach out to the Primer team for assistance.

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 staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants