Skip to content

fix(architecture): gate glossary hover-preview to hover-capable machines#39

Merged
BunsDev merged 1 commit into
mainfrom
fix/glossary-hover-gating
Jul 7, 2026
Merged

fix(architecture): gate glossary hover-preview to hover-capable machines#39
BunsDev merged 1 commit into
mainfrom
fix/glossary-hover-gating

Conversation

@BunsDev

@BunsDev BunsDev commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

The architecture-diagram glossary terms (.kw buttons) wired their hover-preview (mouseenter/mouseleave) on every device. On touch devices that fires a synthetic hover flash of the popover right before the tap-to-pin.

This gates the hover-preview behind matchMedia('(hover: hover) and (pointer: fine)'), so only mouse/trackpad machines get hover. Tap-to-pin and keyboard focus/blur stay wired on all devices, so touch and keyboard/AT users are unaffected.

Salvaged from the closed #38 (the rest of that branch was already superseded by #32#37); this is the one net-new delta, rebased cleanly onto current main.

Verification

  • npm run build and npm run check pass.
  • Behavior verified via headless-Chrome/CDP on the identical change:
    • Desktop (hover:hover, pointer:fine) → hover shows the tooltip, tap pins it, keyboard focus shows it.
    • Emulated mobile (hover:none, pointer:coarse) → hover suppressed (no flash), tap opens the pinned popover, keyboard focus still works.

🤖 Generated with Claude Code

The .kw tooltip fired mouseenter/mouseleave on every device, so touch
devices got a synthetic hover flash right before the tap-to-pin. Gate
the hover-preview behind matchMedia('(hover: hover) and (pointer: fine)').
Tap-to-pin and keyboard focus/blur stay wired on all devices.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
coven Ready Ready Preview Jul 7, 2026 9:56am
coven-landing Ready Ready Preview Jul 7, 2026 9:56am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the Architecture diagram glossary tooltip wiring to prevent synthetic hover “flashes” on touch devices by only attaching hover-preview handlers when the environment reports a hover-capable, fine pointer.

Changes:

  • Introduces a canHover media-query gate for hover preview (mouseenter/mouseleave) on .kw glossary buttons.
  • Keeps click/tap-to-pin and keyboard focus/blur behavior enabled for all devices.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

// with a fine pointer (mouse/trackpad). Touch devices report (hover: none)
// and would otherwise fire a synthetic mouseenter flash right before the
// tap-to-pin — there, tap and keyboard focus remain the way in.
const canHover = window.matchMedia('(hover: hover) and (pointer: fine)').matches;
@BunsDev
BunsDev merged commit 771788f into main Jul 7, 2026
3 checks passed
@BunsDev
BunsDev deleted the fix/glossary-hover-gating branch July 7, 2026 10:04
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