Skip to content

Remove the direct Floating UI React dependency - #1550

Merged
manudeli merged 1 commit into
mainfrom
refactor/remove-floating-ui-react
Nov 22, 2026
Merged

manudeli merged 1 commit into
mainfrom
refactor/remove-floating-ui-react

Conversation

@manudeli

@manudeli manudeli commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Switch the npm stats tooltip to the Radix Tooltip primitives already used on the site. Keep the immediate hover, keyboard focus, placement offset, and popup styling.
  • Remove @floating-ui/react and its exclusive tabbable dependency from the lockfile. Radix and Base UI continue to use the remaining Floating UI packages transitively.

Verification

  • Type checking, lint, and 13 npm stats tests passed locally. Verified that standalone tooltip buttons and Radix menu triggers retain their native button markup and menu ARIA attributes.
  • The Vite build succeeded with Redact disabled for local bundle analysis. The analyzer reports no longer contain @floating-ui/react.
  • The pnpm test script stopped at the tsx IPC socket permission error, so the npm stats tests ran through Node's tsx loader. Chromium could not start in this environment.

Summary by CodeRabbit

  • Updates
    • Tooltips now use a portal for display, support placement on different sides of the trigger, and appear without a delay. Hovering over tooltip content no longer keeps it open.

@manudeli
manudeli requested a review from a team November 22, 2026 16:44
@changeset-bot

changeset-bot Bot commented Nov 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 66ea72a

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.

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

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Tooltip component now uses Radix Tooltip primitives instead of Floating UI state, positioning, and event handlers. Its children type is generalized, and the @floating-ui/react dependency is removed.

Changes: Tooltip migration

Layer / File(s) Summary
Tooltip component and dependency update
src/components/Tooltip.tsx, package.json
TooltipProps.children now uses React.ReactElement. The component uses Radix Tooltip primitives with zero delay, non-hoverable content, asChild, and a 5-pixel side offset. The placement prop maps to Radix side. The Floating UI dependency is removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: tannerlinsley, sukvvon

Merge Risk: Minimal · up to 66ea7

The npm stats tooltip now uses the Radix Tooltip primitives already used elsewhere on the site, and the unused Floating UI dependency is removed. No concrete regression was found, and the change can be reverted easily if a visual or interaction difference shows up in a browser.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Remove the direct Floating UI React dependency" matches the main change. The PR removes @floating-ui/react from package.json and the lockfile. It also rewrites the Tooltip component to …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Remove the direct Floating UI React dependency" matches the main change. The PR removes @floating-ui/react from package.json and the lockfile. It also rewrites the Tooltip component to use Radix Tooltip primitives. The title names the dependency removal but not the Radix migration, which is the main code change. The title is specific and concise, so it passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9538de9c-c2ec-4bca-b04e-34874e505eb0
Commits

Reviewing files that changed from the base of the PR and between a205832 and 66ea72a.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 2

  • package.json
  • src/components/Tooltip.tsx
Files with no reviewable changes: 1

  • package.json

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

@github-actions

Copy link
Copy Markdown
Asset Main PR merge build Change
JavaScript 19592.05 KiB 19580.16 KiB 🟢 -11.89 KiB (-0.06%)
JavaScript (gzip) 6448.57 KiB 6443.85 KiB 🟢 -4.72 KiB (-0.07%)
CSS 795.02 KiB 795.02 KiB 0.00 KiB (0.00%)
CSS (gzip) 121.69 KiB 121.69 KiB 0.00 KiB (0.00%)
Page Main (gzip) PR merge build (gzip) Change
/ 594.25 KiB 594.18 KiB 🟢 -0.07 KiB (-0.01%)
/libraries 536.93 KiB 536.85 KiB 🟢 -0.07 KiB (-0.01%)
/start/latest 561.73 KiB 561.65 KiB 🟢 -0.08 KiB (-0.01%)
/router/latest 562.03 KiB 561.95 KiB 🟢 -0.08 KiB (-0.01%)
/query/latest 560.48 KiB 560.40 KiB 🟢 -0.08 KiB (-0.01%)
/table/latest 593.28 KiB 593.21 KiB 🟢 -0.08 KiB (-0.01%)
/charts/latest 642.59 KiB 642.51 KiB 🟢 -0.08 KiB (-0.01%)
/ai/latest 587.41 KiB 587.34 KiB 🟢 -0.07 KiB (-0.01%)
Docs article 548.00 KiB 547.91 KiB 🟢 -0.09 KiB (-0.02%)
Framework docs article 548.00 KiB 547.91 KiB 🟢 -0.09 KiB (-0.02%)
/blog 541.14 KiB 541.07 KiB 🟢 -0.08 KiB (-0.01%)
/maintainers 540.22 KiB 540.15 KiB 🟢 -0.08 KiB (-0.01%)
/showcase 538.18 KiB 538.11 KiB 🟢 -0.07 KiB (-0.01%)
/chat 536.67 KiB 536.59 KiB 🟢 -0.07 KiB (-0.01%)
/chat/c/:conversationId 537.38 KiB 537.31 KiB 🟢 -0.07 KiB (-0.01%)

Page sizes sum the JS and CSS in the TanStack Start manifest for each route and its layouts. Shared files count once per page.

Compared with main at a205832. Gzip sizes are summed per file. Build run

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com 66ea72a Commit Preview URL

Branch Preview URL
Nov 22 2026, 04:46 PM

@manudeli
manudeli merged commit bff92ae into main Nov 22, 2026
11 checks passed
@manudeli
manudeli deleted the refactor/remove-floating-ui-react branch November 22, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants