Skip to content
This repository was archived by the owner on Oct 10, 2026. It is now read-only.

Commit 80ead5f

Browse files
Add glass styling for thread tooltips and simplify preview tab handling (pingdotgg#4665)
1 parent 32af2f0 commit 80ead5f

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,8 @@ function SidebarV2ThreadTooltip({
239239
side="right"
240240
align="start"
241241
sideOffset={8}
242-
className="dropdown-glass max-w-80 border-0! text-left whitespace-normal shadow-lg/10 before:hidden dark:shadow-none"
243-
style={{
244-
background:
245-
"color-mix(in srgb, var(--popover) 18%, color-mix(in srgb, var(--popover) var(--glass-opacity), transparent))",
246-
}}
242+
variant="glass"
243+
className="max-w-80 text-left whitespace-normal"
247244
>
248245
<div className="flex max-w-80 flex-col gap-2 p-2">
249246
<div className="whitespace-nowrap text-sm font-medium text-foreground">{thread.title}</div>

‎apps/web/src/components/ui/tooltip.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ function TooltipPopup({
1717
align = "center",
1818
sideOffset = 4,
1919
side = "top",
20+
variant = "default",
2021
anchor,
2122
children,
2223
...props
2324
}: TooltipPrimitive.Popup.Props & {
2425
align?: TooltipPrimitive.Positioner.Props["align"];
2526
side?: TooltipPrimitive.Positioner.Props["side"];
2627
sideOffset?: TooltipPrimitive.Positioner.Props["sideOffset"];
28+
variant?: "default" | "glass";
2729
anchor?: TooltipPrimitive.Positioner.Props["anchor"];
2830
}) {
2931
return (
@@ -38,7 +40,10 @@ function TooltipPopup({
3840
>
3941
<TooltipPrimitive.Popup
4042
className={cn(
41-
"relative flex h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) text-balance rounded-md border bg-popover not-dark:bg-clip-padding text-popover-foreground text-xs shadow-md/5 transition-[width,height,scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0 data-instant:duration-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",
43+
"relative flex h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) text-balance rounded-md text-popover-foreground text-xs transition-[width,height,scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0 data-instant:duration-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",
44+
variant === "glass"
45+
? "dropdown-glass shadow-xl shadow-black/25 before:hidden"
46+
: "border bg-popover not-dark:bg-clip-padding shadow-md/5",
4247
className,
4348
)}
4449
data-slot="tooltip-popup"

0 commit comments

Comments
 (0)