Skip to content

Commit 3173486

Browse files
committed
fix(web): snoozed chips drop "Until" so compact rows keep the +N PR count
1 parent c31fcb4 commit 3173486

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3497,11 +3497,11 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
34973497
}
34983498
snoozeWakeLabelText={
34993499
section === "snoozed" && thread.snoozedUntil != null
3500-
? `Until ${snoozeWakeShortLabel(
3500+
? snoozeWakeShortLabel(
35013501
thread.snoozedUntil,
35023502
new Date(),
35033503
timestampFormat,
3504-
)}`
3504+
)
35053505
: null
35063506
}
35073507
wokeAt={threadWokeAt(thread, { now: snoozeNow })}

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export interface ThreadPullRequestBadgePresentation {
166166

167167
/**
168168
* Composer footers use a state glyph; sidebar rows use a mono PR number and folded-link count;
169-
* short Snoozed and Settled rows use the glyph alone.
169+
* short Snoozed and Settled rows use the glyph and folded-link count.
170170
*/
171171
export type ThreadPullRequestBadgeAppearance = "glyph" | "number" | "icon";
172172

@@ -317,7 +317,11 @@ function PullRequestBadge({
317317
className={cn("contents font-normal text-xs tabular-nums", presentation.toneClassName)}
318318
>
319319
<presentation.Icon aria-hidden className="size-3 shrink-0" />
320-
{appearance === "icon" ? null : <span>{presentation.text}</span>}
320+
{appearance !== "icon" ? (
321+
<span>{presentation.text}</span>
322+
) : presentation.more > 0 ? (
323+
<span className="opacity-60">+{presentation.more}</span>
324+
) : null}
321325
</span>
322326
)}
323327
</TooltipTrigger>

‎apps/web/src/components/sidebar/SidebarThreadRow.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ type SidebarThreadRowProps = {
648648
dropVerb: SidebarDropVerb | null;
649649
dragOverPinned: boolean;
650650
sweepAction: SidebarSweepAction | null;
651-
// Absolute wake time ("Until 9:00", "Until Mon 9:00") for rows in the
651+
// Absolute wake time ("9:00", "Mon 9:00") for rows in the
652652
// snoozed shelf.
653653
snoozeWakeLabelText: string | null;
654654
wokeAt: string | null;
@@ -1367,6 +1367,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP
13671367
{variantAction === "unsnooze" && props.snoozeWakeLabelText !== null ? (
13681368
<Badge variant="quiet" size="status">
13691369
<Clock3Icon aria-hidden />
1370+
<span className="sr-only">Snoozed until </span>
13701371
{props.snoozeWakeLabelText}
13711372
</Badge>
13721373
) : (inFolder ? isWokeStatus : isWoke) ? (

0 commit comments

Comments
 (0)