refactor: Move TooltipProvider to ui-client package, reimplement document references and deduplicate portals#40392
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Looks like this PR is ready to merge! 🎉 |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (3)📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-03-27T14:52:56.865ZApplied to files:
🔇 Additional comments (1)
WalkthroughThe ChangesTooltip Portal Consolidation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
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. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #40392 +/- ##
===========================================
- Coverage 70.00% 69.98% -0.03%
===========================================
Files 3301 3299 -2
Lines 120462 120390 -72
Branches 21566 21620 +54
===========================================
- Hits 84330 84255 -75
- Misses 32834 32848 +14
+ Partials 3298 3287 -11
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…document references and deduplicate portals (#40392) Co-authored-by: Cursor <cursoragent@cursor.com>
Proposed changes (including videos or screenshots)
TooltipProvider directly references
documentglobal object, which restricts the usage of tooltips to the main window. In case the UI is rendered in a different document (through react portals in a popup window for example), no tooltips show, as events are not attached to the correct body, nor are the portals being rendered on the correct document.In order to fix this, three things were changed:
TooltipProviderwas moved toui-clientpackage, allowing for reuse in other places.TooltipProviderwas updated to accept anownerDocumentproperty, which should be the targetted document that will render the tooltips.TooltipPortalwas removed and deleted from the codebase. Under the hood,TooltipPortaluses theAnchorPortalelement (with its own issues of document referencing), althoughTooltipComponentalready is a portal since it usesPositioncomponent from fuselage, which implements its own portal. Check feat(fuselage): ImplementOwnerDocumentcontext and updatedocumentreferences fuselage#1947 for more information on how that issue was solved in the fuselage package.Extra: Solved
no-unused-expressionslint warning.Issue(s)
SSGA-11
Steps to test or reproduce
Further comments
Summary by CodeRabbit