From 72a1ecd19290e3895def4f8c6a4b5e7fbf28404e Mon Sep 17 00:00:00 2001 From: Anso Date: Sun, 19 Apr 2026 12:36:59 -0400 Subject: [PATCH] feat(ui): wire overlay popovers to density tokens (#695) Swap hardcoded Tailwind padding on NodeSwitcher, UserProfileDropdown, and NotificationPanel for var(--density-row-x) / --density-row-y / --density-cell-y / --density-tile-y custom properties so the three sidebar/header overlays now tighten when the Appearance setting is switched to Compact, matching the reference pattern in ui/table.tsx. --- frontend/src/components/NodeSwitcher.tsx | 6 +++--- frontend/src/components/NotificationPanel.tsx | 10 +++++----- frontend/src/components/UserProfileDropdown.tsx | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/NodeSwitcher.tsx b/frontend/src/components/NodeSwitcher.tsx index d42f8aaf..bb2937a6 100644 --- a/frontend/src/components/NodeSwitcher.tsx +++ b/frontend/src/components/NodeSwitcher.tsx @@ -99,7 +99,7 @@ export function NodeSwitcher({ onManageNodes }: NodeSwitcherProps) {
-
+
Connected @@ -136,7 +136,7 @@ export function NodeSwitcher({ onManageNodes }: NodeSwitcherProps) { }} aria-current={isActive ? 'true' : undefined} className={cn( - 'group relative flex w-full items-center gap-3 px-5 py-2.5 text-left transition-colors', + 'group relative flex w-full items-center gap-3 px-[var(--density-row-x)] py-[var(--density-row-y)] text-left transition-colors', 'hover:bg-accent focus-visible:bg-accent focus-visible:outline-none', )} > @@ -182,7 +182,7 @@ export function NodeSwitcher({ onManageNodes }: NodeSwitcherProps) { setOpen(false); onManageNodes(); }} - className="flex w-full items-center gap-2.5 px-5 py-2.5 text-left text-sm text-stat-value transition-colors hover:bg-accent focus-visible:bg-accent focus-visible:outline-none" + className="flex w-full items-center gap-2.5 px-[var(--density-row-x)] py-[var(--density-row-y)] text-left text-sm text-stat-value transition-colors hover:bg-accent focus-visible:bg-accent focus-visible:outline-none" > Manage nodes diff --git a/frontend/src/components/NotificationPanel.tsx b/frontend/src/components/NotificationPanel.tsx index 045cf612..7a36ce28 100644 --- a/frontend/src/components/NotificationPanel.tsx +++ b/frontend/src/components/NotificationPanel.tsx @@ -169,7 +169,7 @@ export function NotificationPanel({
-
+
Notifications @@ -207,7 +207,7 @@ export function NotificationPanel({
{/* Filter segment */} -
+
{groups.map((group) => (
-
+
{group.label}
{group.items.map((notif) => ( @@ -260,7 +260,7 @@ function NotificationRow({ notif, showNodeName, onDelete, onNavigate }: Notifica const isRoutable = Boolean(onNavigate && notif.stack_name); const surfaceClasses = cn( - 'flex w-full items-start gap-3 px-5 py-3 text-left transition-colors', + 'flex w-full items-start gap-3 px-[var(--density-row-x)] py-[var(--density-row-y)] text-left transition-colors', isRoutable && 'cursor-pointer hover:bg-accent/40 focus-visible:bg-accent/40 focus-visible:outline-none', ); @@ -352,7 +352,7 @@ function EmptyState({ filter, hasAny }: EmptyStateProps) { } return ( -
+

{title}

{subtitle}

diff --git a/frontend/src/components/UserProfileDropdown.tsx b/frontend/src/components/UserProfileDropdown.tsx index f435323e..a4bd24d4 100644 --- a/frontend/src/components/UserProfileDropdown.tsx +++ b/frontend/src/components/UserProfileDropdown.tsx @@ -96,7 +96,7 @@ export function UserProfileDropdown({ theme, setTheme, onOpenSettings }: UserPro
-
+
{initials ? ( @@ -157,7 +157,7 @@ export function UserProfileDropdown({ theme, setTheme, onOpenSettings }: UserPro
{/* Appearance */} -
+
Appearance @@ -175,7 +175,7 @@ export function UserProfileDropdown({ theme, setTheme, onOpenSettings }: UserPro