From fe017497a2806741846fccd9d7af620f05ca7628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Mon, 31 Aug 2026 19:41:13 +0200 Subject: [PATCH] Unify inline-editable field styling app-wide Device display name, session title, and session description editors now share one style: underline is invisible until hover/focus (then primary), the caret is primary while editing, and text keeps its own default color at all times instead of shifting on focus. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01WzyfRyA7h5rs5SCAahLAWd --- components/devices/DevicesTable.tsx | 13 ++++++------- components/sessions/SessionDescriptionEditor.tsx | 2 +- components/sessions/SessionTitleEditor.tsx | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/components/devices/DevicesTable.tsx b/components/devices/DevicesTable.tsx index 93caeaf..8f3e6c5 100644 --- a/components/devices/DevicesTable.tsx +++ b/components/devices/DevicesTable.tsx @@ -3,7 +3,6 @@ import { useEffect, useRef, useState } from "react"; import { useRouter } from "next/navigation"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; -import { Input } from "@/components/ui/input"; import { Check, Loader2 } from "lucide-react"; import { toast } from "sonner"; import { cn } from "@/lib/utils"; @@ -55,23 +54,23 @@ function DeviceNameCell({ device }: { device: DeviceRow }) { }, [status]); return ( -
- + setValue(e.target.value)} - className="h-8 pr-8" aria-label="Device display name" + className="max-w-48 min-w-0 border-b-2 border-transparent bg-transparent text-sm font-medium text-foreground caret-primary outline-none transition-colors placeholder:text-muted-foreground/70 hover:border-b-primary focus:border-b-primary [field-sizing:content]" /> -
+
diff --git a/components/sessions/SessionDescriptionEditor.tsx b/components/sessions/SessionDescriptionEditor.tsx index fa824f5..ce77b80 100644 --- a/components/sessions/SessionDescriptionEditor.tsx +++ b/components/sessions/SessionDescriptionEditor.tsx @@ -60,7 +60,7 @@ export function SessionDescriptionEditor({ placeholder="Add a description..." aria-label="Session description" rows={1} - className="max-w-full min-w-0 resize-none border-b-2 border-transparent bg-transparent text-sm text-muted-foreground outline-none transition-colors placeholder:text-muted-foreground/60 hover:border-b-border focus:border-b-foreground/40 focus:text-foreground sm:max-w-xl [field-sizing:content]" + className="max-w-full min-w-0 resize-none border-b-2 border-transparent bg-transparent text-sm text-muted-foreground caret-primary outline-none transition-colors placeholder:text-muted-foreground/60 hover:border-b-primary focus:border-b-primary sm:max-w-xl [field-sizing:content]" />
setValue(e.target.value)} placeholder={`Session #${sessionId}`} aria-label="Session name" - className="max-w-full min-w-0 border-b-2 border-transparent bg-transparent font-heading text-2xl font-semibold text-foreground outline-none transition-colors placeholder:text-muted-foreground/70 hover:border-b-border focus:border-b-foreground/40 sm:max-w-xl [field-sizing:content]" + className="max-w-full min-w-0 border-b-2 border-transparent bg-transparent font-heading text-2xl font-semibold text-foreground caret-primary outline-none transition-colors placeholder:text-muted-foreground/70 hover:border-b-primary focus:border-b-primary sm:max-w-xl [field-sizing:content]" />