mirror of
https://github.com/block/buzz.git
synced 2026-11-04 16:31:38 +00:00
feat(desktop): make PR smart chips copy the full URL on text selection
The visible chip label (icon + owner/repo#number) is marked user-select:none while a hidden zero-width span holds the full URL for clipboard copy. Adds an e2e test verifying the DOM structure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -52,13 +52,16 @@ function createMarkdownComponents(
|
||||
return (
|
||||
<a
|
||||
{...props}
|
||||
className="inline-flex items-center gap-1 rounded-md bg-primary/10 px-1.5 py-0.5 text-sm font-medium text-primary no-underline transition-colors hover:bg-primary/20"
|
||||
className="relative inline-flex items-center gap-1 rounded-md bg-primary/10 px-1.5 py-0.5 text-sm font-medium text-primary no-underline transition-colors hover:bg-primary/20"
|
||||
href={href}
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<GitPullRequest className="size-3.5" />
|
||||
{owner}/{repo}#{number}
|
||||
<span className="pointer-events-none select-none inline-flex items-center gap-1" aria-hidden="true">
|
||||
<GitPullRequest className="size-3.5" />
|
||||
{owner}/{repo}#{number}
|
||||
</span>
|
||||
<span className="absolute w-0 overflow-hidden whitespace-nowrap">{href}</span>
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user