Skip to content

fix(website): fix note tooltip on review card#6630

Merged
theosanderson merged 2 commits into
mainfrom
otherfix
Jun 8, 2026
Merged

fix(website): fix note tooltip on review card#6630
theosanderson merged 2 commits into
mainfrom
otherfix

Conversation

@theosanderson

@theosanderson theosanderson commented Jun 8, 2026

Copy link
Copy Markdown
Member

[claude below]

Summary

Follow-up to #6628, which fixed the same class of bug on the edit page.

The secondary-messages note indicator on the review card (ReviewCard.tsx) placed data-tooltip-id directly on the <Note> SVG icon (~icons/fluent/note-24-filled). react-tooltip v6's resolveDataTooltipAnchor walks up the DOM tree but only considers nodes that are instanceof HTMLElement. SVG elements are SVGElement, not HTMLElement, so the library skipped the icon entirely and never found the anchor — meaning the tooltip never appeared on hover.

This is the only remaining instance of the pattern: I audited all 19 data-tooltip-id usages in website/src, and every other one is attached to a real HTML element (<label>, <span>, <div>, <p>, <Button><button>, <ListboxOption>), which react-tooltip handles correctly.

Fix

Wrap the <Note> icon in a <span> that carries the data-tooltip-id, matching the pattern used by HoverTooltip and the fix applied in #6628.

<span className='inline-block' data-tooltip-id={noteTooltipId}>
    <Note className='text-yellow-500' />
</span>

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by appropriate, automated tests.
  • Any manual testing that has been done is documented (i.e. what exactly was tested?)

🤖 Generated with Claude Code

🚀 Preview: Add preview label to enable

The secondary-messages note indicator on the review card placed
`data-tooltip-id` directly on the `<Note>` SVG icon. react-tooltip v6's
anchor resolution walks the DOM only through `HTMLElement` nodes and skips
`SVGElement` nodes, so the anchor was never found and the tooltip never
appeared on hover.

Wrap the icon in a `<span>` that carries `data-tooltip-id`, matching the
pattern used by `HoverTooltip` and the fix in #6628 for the edit page.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@theosanderson theosanderson requested a review from anna-parker June 8, 2026 10:26
@theosanderson theosanderson merged commit 46e7f99 into main Jun 8, 2026
46 checks passed
@theosanderson theosanderson deleted the otherfix branch June 8, 2026 11:28
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.

2 participants