diff --git a/packages/views/editor/link-hover-card.tsx b/packages/views/editor/link-hover-card.tsx index 007bb21428..4bb9db1f5b 100644 --- a/packages/views/editor/link-hover-card.tsx +++ b/packages/views/editor/link-hover-card.tsx @@ -69,9 +69,16 @@ function useLinkHover(containerRef: React.RefObject, disable if (!link) return; const href = link.getAttribute("href"); if (!href || isMentionHref(href)) return; - // Issue mention cards render as — they - // display their own rich info, a URL hover card is redundant. - if (link.classList.contains("issue-mention")) return; + // Mention chips render as / — they display their own rich info, so a URL + // hover card is redundant, and the URL it would offer to copy is an + // in-app path rather than the shareable link the user expects. + if ( + link.classList.contains("issue-mention") || + link.classList.contains("project-mention") + ) { + return; + } clearTimeout(hideTimer.current); showTimer.current = window.setTimeout(() => { diff --git a/packages/views/editor/styles/prose.css b/packages/views/editor/styles/prose.css index 60bd0bcf81..dfd1f855f0 100644 --- a/packages/views/editor/styles/prose.css +++ b/packages/views/editor/styles/prose.css @@ -377,13 +377,18 @@ text-decoration-color: var(--brand); } -/* Issue mention cards — inline cards that sit within text flow */ -.rich-text-editor a.issue-mention { +/* Mention chips — inline cards that sit within text flow. The chip already + carries its own affordance (border, icon, hover background), so the generic + link color and underline above would be a second, competing one drawn + through the card. Every chip-shaped mention belongs here. */ +.rich-text-editor a.issue-mention, +.rich-text-editor a.project-mention { color: inherit; text-decoration: none; } -.rich-text-editor a.issue-mention:hover { +.rich-text-editor a.issue-mention:hover, +.rich-text-editor a.project-mention:hover { text-decoration: none; }