Skip to content

Commit e90e9c7

Browse files
committed
fix(web): fold pull request authors on narrow rows
1 parent d5a2eb7 commit e90e9c7

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎apps/web/src/components/pullRequest/PullRequestRow.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ function PullRequestRowImpl({
113113
{environmentLabel ? (
114114
<span className="min-w-0 max-w-32 truncate">{environmentLabel}</span>
115115
) : null}
116-
<PullRequestActorLabel actor={entry.author} className="min-w-4 max-w-40" />
116+
<PullRequestActorLabel
117+
actor={entry.author}
118+
className="min-w-4 max-w-40"
119+
labelClassName="sr-only @xs/pr-row-meta:not-sr-only @xs/pr-row-meta:truncate"
120+
/>
117121
{/* Only a verdict somebody has actually given: "review required" is the absence of
118122
one, and saying so on every unreviewed row would say nothing. */}
119123
{entry.reviewDecision === "approved" || entry.reviewDecision === "changes-requested" ? (

‎apps/web/src/components/pullRequest/pullRequestPresentation.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,17 +339,19 @@ export function PullRequestActorAvatar({
339339
export function PullRequestActorLabel({
340340
actor,
341341
className,
342+
labelClassName,
342343
tooltip = true,
343344
}: {
344345
actor: PullRequestActor | null;
345346
className?: string;
347+
labelClassName?: string;
346348
tooltip?: boolean;
347349
}) {
348350
const login = actor?.login ?? "ghost";
349351
const label = (
350352
<>
351353
<PullRequestActorAvatar actor={actor} />
352-
<span className="truncate">{login}</span>
354+
<span className={cn("truncate", labelClassName)}>{login}</span>
353355
</>
354356
);
355357
if (!tooltip) {

0 commit comments

Comments
 (0)