Skip to content

#772 Animate Tooltips In As Well As Out - #773

Merged
cielbellerose merged 1 commit into
devfrom
772-animate-tooltips-in-as-well-as-out
Sep 24, 2026
Merged

cielbellerose merged 1 commit into
devfrom
772-animate-tooltips-in-as-well-as-out

Conversation

@cielbellerose

Copy link
Copy Markdown
Collaborator

Closes #772

Summary

Tooltips snapped in with no transition but faded/zoomed out when closing. TooltipContent gated its enter animation on data-[state=open], but Radix Tooltip never sets that state — its open states are delayed-open/instant-open — so the enter classes never matched while the exit classes (gated on data-[state=closed], which Radix does set) worked fine.

Changes

  • components/ui/tooltip.tsx — made the enter animation (animate-in fade-in-0 zoom-in-95) unconditional on TooltipContent, since Radix only mounts the content while it's showing, so an unconditional enter animation is safe. Exit classes (data-[state=closed]:*) and the data-[side=*]:slide-in-from-* classes are unchanged.
  • Audited other shadcn primitives for the same mismatch: no hover-card.tsx or popover.tsx exist in components/ui/; dialog, alert-dialog, sheet, dropdown-menu, and select all gate on Radix data-state values that are genuinely open/closed, so they were left unchanged.

Testing plan

  • Hover a toolbar button in the markdown editor toolbar (components/features/markdown-field.tsx, any markdown field such as a position description form). After ~300ms the tooltip fades and zooms in (previously appeared instantly).
  • Move the pointer off the button. The tooltip fades and zooms out exactly as before.
  • Tab to a toolbar button with the keyboard. The tooltip animates in on focus and out on blur.
  • Sweep quickly across adjacent toolbar buttons. Each tooltip animates in, with no flicker and no stuck tooltips.
  • Check other tooltip consumers: the status tooltip in position-status-header-actions.tsx on a position page, and the tooltips in users-table.tsx on the users admin table. Each animates in from the correct side.
  • Open a dropdown menu, select, dialog, and sheet. Confirm their open/close animations are unchanged.
  • Turn on OS "Reduce motion". Tooltips behave the same on enter as on exit (no motion-reduce: override added, matching the pre-existing exit behavior) — no regression versus today.

Automated checks

  • npm run prettier:check — pass
  • npm run eslint:check — pass
  • npm run tsc:check — pass

Notes

One-line class fix; no behavior change beyond the enter animation now firing.

🤖 Generated with Claude Code

Radix Tooltip never sets data-state="open" on TooltipContent (its
open states are delayed-open/instant-open), so the gated enter
classes never matched. Make the enter animation unconditional.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@cielbellerose cielbellerose added the claude Will be worked on by Claude label Sep 24, 2026
@cielbellerose cielbellerose self-assigned this Sep 24, 2026
@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
aplio Ready Ready Preview Sep 24, 2026 7:09pm UTC

@cielbellerose cielbellerose added ready for review PR ready for review agent reviewing Review agent working (in-flight) and removed ready for review PR ready for review agent labels Sep 24, 2026

@cielbellerose cielbellerose left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Code Review — Cycle 1 · approved

0 open — clean

@cielbellerose cielbellerose added approved Review passed, ready to merge and removed reviewing Review agent working (in-flight) labels Sep 24, 2026
@cielbellerose
cielbellerose merged commit 607943c into dev Sep 24, 2026
14 of 19 checks passed
@cielbellerose
cielbellerose deleted the 772-animate-tooltips-in-as-well-as-out branch September 24, 2026 19:17

This branch was successfully deployed

1 active deployment
Preview — 4502e69e Deployed Sep 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Review passed, ready to merge claude Will be worked on by Claude

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Animate Tooltips In As Well As Out

1 participant