TypeScript
fix(web): unpin button shows the pin-off icon on hover (#15425)
oliver6e0abd5a10a6
diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsxindex 3a78102c9c7..f0d818a042e 100644--- a/apps/web/src/components/Sidebar.tsx+++ b/apps/web/src/components/Sidebar.tsx@@ -1712,11 +1712,20 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {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"+ className="group/unpin 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" />+ {/* Pin marks the pinned state at rest; hover and focus swap in pin-off so the+ icon reads as the action the button performs. */}+ <PinIcon+ aria-hidden+ className="size-3 shrink-0 group-hover/unpin:hidden group-focus-visible/unpin:hidden"+ />+ <PinOffIcon+ aria-hidden+ className="hidden size-3 shrink-0 group-hover/unpin:block group-focus-visible/unpin:block"+ /></TooltipTrigger><TooltipPopup>Unpin thread</TooltipPopup></Tooltip>