Skip to content

Commit 4aab028

Browse files
Fix GitHub PR sidebar item layout
Constrain sidebar trailing metadata so branch labels truncate instead of pushing pull request titles out of alignment.
1 parent 7770acc commit 4aab028

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/features/github/components/github-prs-view.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ const PRListItem = memo(
136136
}
137137
description={`#${pr.number} by ${pr.author.login}`}
138138
trailing={
139-
<span className="editor-font max-w-40 truncate">
139+
<span
140+
className="editor-font block min-w-0 truncate text-xs"
141+
title={`${pr.baseRef}${pr.headRef}`}
142+
>
140143
{pr.baseRef} &larr; {pr.headRef}
141144
</span>
142145
}

src/ui/sidebar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@ export function SidebarListItem({
326326
<span className="max-w-full truncate text-text-lighter">{description}</span>
327327
) : null}
328328
</span>
329-
{trailing ? <span className="shrink-0 text-text-lighter">{trailing}</span> : null}
329+
{trailing ? (
330+
<span className="min-w-0 max-w-[38%] shrink text-text-lighter">{trailing}</span>
331+
) : null}
330332
</button>
331333
);
332334
}

0 commit comments

Comments
 (0)