Interaction spec

Comment preview popover on document cards

The comment count becomes the trigger, and the preview panel anchors to it — hovering the card no longer opens anything.

intent 100ms grace 200ms panel 300px radius 10px motion 140ms ease-out clamp 2 lines

00Context

Document cards have a thumbnail, then a footer with a title row (title on the left, comment count on the right) and a meta row (“Kiet · Edited 18s ago”). Today, hovering anywhere on the card opens a floating panel over the thumbnail showing the newest reply, centered with no relationship to the count.

Change this so the count is the trigger and the panel is anchored to it. Keep the existing visual tokens (colors, radii, type scale, popover shadow) and component conventions. Don’t introduce new tokens unless something below has no equivalent.

The behavior, live

Rest the pointer on a count · Tab reaches it, Esc closes · on touch, first tap opens and the next follows the link
Unread · long reply clamps
Read · no dot
Unread · image-only reply
Empty states audit
Avi · Edited just now
Zero comments · count hidden

Implements the timings and layout below, including keyboard, touch, and prefers-reduced-motion. Links show a toast here instead of navigating.

01Trigger

02Placement

03Content

04Unread state

05Motion

06Semantics and accessibility

07Done when

Ticks are saved only in this browser — use them while verifying an implementation.