Skip to content

fix(tooltip): unify app-wide tooltips (arrow, distance, delay) - #54

Draft
broisnischal wants to merge 1 commit into
masterfrom
worktree-fix-tooltips
Draft

fix(tooltip): unify app-wide tooltips (arrow, distance, delay)#54
broisnischal wants to merge 1 commit into
masterfrom
worktree-fix-tooltips

Conversation

@broisnischal

Copy link
Copy Markdown
Owner

What

Fixes the inconsistent tooltip shown in the screenshot (the tab-bar tooltip) and makes every tooltip in the app look and behave the same.

Problem

  • The tab tooltip in the screenshot is the browser-native title tooltip — no arrow, cramped distance, uncontrollable timing.
  • 317 native title= tooltips across the app vs. a single styled bits-ui tooltip only in SqlConsole → inconsistent look.

Change

  1. GlobalTooltip.svelte — one delegated, styled tooltip mounted once at the app root (App.svelte). It transparently upgrades any element's native title (or opt-in data-tip) into the shared styled bubble:
    • arrow pointing at the trigger (auto flips top/bottom)
    • better distance (8px gap, viewport-edge clamped)
    • longer display — persists while hovering instead of the native tooltip's quick auto-hide
    • consistent delay (450ms)
    • opt out with data-no-tip
    • No per-call-site edits needed — the ~317 existing title= usages just work.
  2. Aligned the existing bits-ui tooltip (ui/tooltip, used by SqlConsole) — added a matching arrow, bumped the offset to 8px, and set the provider delay to 450ms so rich tooltips match the global one.

Verify

  • npm run build passes (only pre-existing warnings).
  • Hover a table tab → styled tooltip with arrow, proper spacing, stays while hovering.

Closes the tooltip design/consistency request.

Add a single delegated GlobalTooltip mounted at the app root that styles
every native title/data-tip element consistently — arrow, larger distance,
show-delay, and hover-persistence — so all tooltips match across the app
without wiring each call site. Align the existing bits-ui tooltip (SqlConsole)
with a matching arrow, 8px offset, and 450ms delay.
@changeset-bot

changeset-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4ac0093

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

broisnischal added a commit that referenced this pull request Jul 19, 2026
… 8px, 450ms, hover-persist); replace tip.js
@broisnischal
broisnischal force-pushed the worktree-fix-tooltips branch from 92a4bde to 4ac0093 Compare August 8, 2026 04:32
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.

1 participant