fix(Tooltip): raise tooltips above the navbar, modals and dropdowns - #1158
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughBoth tooltip implementations change their stacking order class from ChangesTooltip stacking order
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This localized styling change raises tooltip layering above existing navigation, modal, and dropdown layers; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tanstack-com | 7e9c1e2 | Commit Preview URL Branch Preview URL |
Aug 14 2026, 06:27 PM |
152723f to
7e9c1e2
Compare
Hovering the Ask AI button in the navbar produced a tooltip whose top edge was clipped by the navbar itself.
The tooltip opens
side="bottom", so it starts 55px down — inside the navbar's 0–58px band. The navbar isz-[100]and the tooltip wasz-50, so the navbar won the overlap.Why 1300
The repo has no declared z-index scale, so the layers were read off the code:
Every layer follows the usual ordering except the tooltip, which sat 24× below the dropdown it is supposed to annotate. Bootstrap, Chakra and MUI all place tooltips at or near the top of the stack for the same reason: a tooltip explains another control, so nothing should cover it.
z-[1300]puts it above the dropdown, which is the highest ordinary layer here.Both tooltip implementations carried
z-50and both are fixed —~/ui/Tooltip(5 consumers) and~/components/Tooltip(8 consumers, npm-stats).Verified in the browser
Measured rather than eyeballed, since the overlap is only a few pixels:
document.elementFromPointat(1035, 57)— a point inside the overlap — now returns the tooltip. Before the change it returned the navbar.tsc,oxlintand the 142 unit tests pass.Screenshot
AS-IS
TO-BE
Summary by CodeRabbit