fix(desktop): polish Projects navigation and detail presentation

Make sidebar and repository navigation behave predictably while clarifying review metadata, activity hierarchy, and file-detail presentation.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
This commit is contained in:
Thomas Petersen
2026-08-17 15:13:59 -04:00
parent 3c228b1082
commit 278d175db3
13 changed files with 218 additions and 60 deletions

View File

@@ -15,12 +15,16 @@ export function CopyTextButton({
text: string;
}) {
const [copied, setCopied] = React.useState(false);
const handleCopy = React.useCallback(() => {
void writeTextToClipboard(text).then(() => {
setCopied(true);
setTimeout(() => setCopied(false), 2_000);
});
}, [text]);
const handleCopy = React.useCallback(
(event: React.MouseEvent<HTMLButtonElement>) => {
event.stopPropagation();
void writeTextToClipboard(text).then(() => {
setCopied(true);
setTimeout(() => setCopied(false), 2_000);
});
},
[text],
);
return (
<button
@@ -30,6 +34,7 @@ export function CopyTextButton({
className,
)}
onClick={handleCopy}
onKeyDown={(event) => event.stopPropagation()}
type="button"
>
{copied ? (