Skip to content

Commit 0aae722

Browse files
authored
fix(web): keep change totals aligned beside the label (#31814)
1 parent 620a37b commit 0aae722

1 file changed

Lines changed: 33 additions & 27 deletions

File tree

‎apps/web/src/components/GitActionsControl.tsx‎

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,35 +1639,41 @@ export default function GitActionsControl({
16391639
onClick={onOpenChanges}
16401640
>
16411641
<FileDiffIcon className={THREAD_DETAILS_PANEL_ICON_CLASS} aria-hidden />
1642-
<span className={cn("shrink-0", THREAD_DETAILS_PANEL_LABEL_CLASS)}>Changes</span>
1643-
{changesBaseLabel ? (
1644-
<Tooltip>
1645-
<TooltipTrigger
1646-
render={
1647-
<span className="pointer-events-auto min-w-0 truncate text-xs text-muted-foreground" />
1642+
<span className="flex min-w-0 flex-1 items-baseline gap-2.5">
1643+
<span className="shrink-0">Changes</span>
1644+
{changesBaseLabel ? (
1645+
<Tooltip>
1646+
<TooltipTrigger
1647+
render={
1648+
<span className="pointer-events-auto min-w-0 truncate text-xs text-muted-foreground" />
1649+
}
1650+
>
1651+
{changesBaseLabel}
1652+
</TooltipTrigger>
1653+
<TooltipPopup side="top" className="max-w-96 break-words">
1654+
{changesBaseLabel}
1655+
</TooltipPopup>
1656+
</Tooltip>
1657+
) : null}
1658+
<span className="ml-auto flex shrink-0 items-center gap-1.5 font-mono text-xs tabular-nums">
1659+
<span
1660+
className={
1661+
changesTotals.insertions
1662+
? "text-diff-addition-foreground"
1663+
: "text-muted-foreground"
16481664
}
16491665
>
1650-
{changesBaseLabel}
1651-
</TooltipTrigger>
1652-
<TooltipPopup side="top" className="max-w-96 break-words">
1653-
{changesBaseLabel}
1654-
</TooltipPopup>
1655-
</Tooltip>
1656-
) : null}
1657-
<span className="ml-auto flex shrink-0 items-center gap-1.5 font-mono text-xs tabular-nums">
1658-
<span
1659-
className={
1660-
changesTotals.insertions ? "text-diff-addition-foreground" : "text-muted-foreground"
1661-
}
1662-
>
1663-
+{formatDiffCount(changesTotals.insertions)}
1664-
</span>
1665-
<span
1666-
className={
1667-
changesTotals.deletions ? "text-diff-deletion-foreground" : "text-muted-foreground"
1668-
}
1669-
>
1670-
-{formatDiffCount(changesTotals.deletions)}
1666+
+{formatDiffCount(changesTotals.insertions)}
1667+
</span>
1668+
<span
1669+
className={
1670+
changesTotals.deletions
1671+
? "text-diff-deletion-foreground"
1672+
: "text-muted-foreground"
1673+
}
1674+
>
1675+
-{formatDiffCount(changesTotals.deletions)}
1676+
</span>
16711677
</span>
16721678
</span>
16731679
</ThreadDetailsControl>

0 commit comments

Comments
 (0)