Compare commits

...

1 Commits

Author SHA1 Message Date
Naiyuan Qing
84de30a792 fix(views): restore issue-mention class on <a> for mention card
PR #1502's IssueChip extraction moved the `issue-mention` class from the
outer <a> into IssueChip's inner <span>, breaking three consumers that
select on `<a>.issue-mention` directly:

- `.rich-text-editor a.issue-mention` underline-exemption in
  content-editor.css (stopped matching -> mentions in editor gained a
  spurious underline).
- `link-hover-card.tsx` classList check that suppresses the URL preview
  on issue mentions (stopped matching -> hover card wrongly pops up
  over mention chips).
- Tailwind Typography prose (`prose a { text-decoration: underline }`)
  covers a separate path — markdown bubbles in chat. prose's specificity
  (0,1,1) beats `.no-underline` (0,1,0), so `not-prose` is the right
  escape hatch on the AppLink.

Put `issue-mention` back on the <a> in both wrappers (IssueMentionCard
and the editor's MentionView), and add `not-prose` only to the markdown
wrapper. IssueChip's BASE_CLASS keeps `issue-mention` too (inert on the
span; removing it is a separate scope that needs a full consumer audit).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 19:10:12 +08:00
2 changed files with 2 additions and 2 deletions

View File

@@ -60,7 +60,7 @@ function IssueMention({
};
return (
<a href={issuePath} onClick={handleClick} className="inline-flex">
<a href={issuePath} onClick={handleClick} className="issue-mention inline-flex">
<IssueChip
issueId={issueId}
fallbackLabel={fallbackLabel}

View File

@@ -18,7 +18,7 @@ interface IssueMentionCardProps {
export function IssueMentionCard({ issueId, fallbackLabel }: IssueMentionCardProps) {
const p = useWorkspacePaths();
return (
<AppLink href={p.issueDetail(issueId)} className="inline-flex">
<AppLink href={p.issueDetail(issueId)} className="issue-mention not-prose inline-flex">
<IssueChip
issueId={issueId}
fallbackLabel={fallbackLabel}