Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 51 additions & 31 deletions apps/web/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -364,19 +364,26 @@ function SnoozePopoverButton(props: {
);
return (
<Popover open={open} onOpenChange={onOpenChange}>
<PopoverTrigger
render={
<button
type="button"
aria-label="Snooze thread"
onClick={(event) => event.stopPropagation()}
onDoubleClick={(event) => event.stopPropagation()}
className="inline-flex h-full cursor-pointer items-center gap-0.5 rounded-md bg-transparent px-1.5 text-xs text-muted-foreground hover:text-foreground"
/>
}
>
<ClockIcon className="size-3" />
</PopoverTrigger>
<Tooltip>
<TooltipTrigger
render={
<PopoverTrigger
render={
<button
type="button"
aria-label="Snooze thread"
onClick={(event) => event.stopPropagation()}
onDoubleClick={(event) => event.stopPropagation()}
className="inline-flex h-full cursor-pointer items-center gap-0.5 rounded-md bg-transparent px-1.5 text-xs text-muted-foreground hover:text-foreground"
/>
}
/>
}
>
<ClockIcon className="size-3" />
</TooltipTrigger>
<TooltipPopup>Snooze thread</TooltipPopup>
</Tooltip>
<PopoverPopup side="bottom" align="end" className="w-56" viewportClassName="p-1">
{presets.map((preset) => (
<button
Expand Down Expand Up @@ -1305,15 +1312,21 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
)}
{props.isPinned ? (
props.pinningSupported ? (
<button
type="button"
aria-label="Unpin thread"
title="Unpin thread"
onClick={handleUnpinClick}
className="inline-flex cursor-pointer items-center rounded-sm text-muted-foreground/65 outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring"
>
<PinIcon aria-hidden className="size-3 shrink-0" />
</button>
<Tooltip>
<TooltipTrigger
render={
<button
type="button"
aria-label="Unpin thread"
onClick={handleUnpinClick}
className="inline-flex cursor-pointer items-center rounded-sm text-muted-foreground/65 outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring"
/>
}
>
<PinIcon aria-hidden className="size-3 shrink-0" />
</TooltipTrigger>
<TooltipPopup>Unpin thread</TooltipPopup>
</Tooltip>
) : (
<PinIcon
aria-label="Pinned"
Expand Down Expand Up @@ -1402,15 +1415,22 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
/>
) : null}
{props.settlementSupported ? (
<button
type="button"
aria-label="Settle thread"
onClick={handleSettleClick}
className="-mr-1 inline-flex cursor-pointer items-center gap-1 rounded-md bg-transparent px-1.5 text-xs text-muted-foreground hover:text-foreground"
>
<CheckIcon className="size-3.5" />
Settle
</button>
<Tooltip>
<TooltipTrigger
render={
<button
type="button"
aria-label="Settle thread"
onClick={handleSettleClick}
className="-mr-1 inline-flex cursor-pointer items-center gap-1 rounded-md bg-transparent px-1.5 text-xs text-muted-foreground hover:text-foreground"
/>
}
>
<CheckIcon className="size-3.5" />
Settle
</TooltipTrigger>
<TooltipPopup>Settle thread</TooltipPopup>
</Tooltip>
) : null}
</span>
) : null}
Expand Down
Loading