From 2c65abd231e8ebfe9eff39dfd9359a1a199098c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hartmut=20N=C3=B6renberg?= Date: Sun, 22 Mar 2026 21:55:17 +0100 Subject: [PATCH] refactor: redesign widget container for dark theme consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WidgetContainer redesign: - Remove grey bg-gray-50/50 header background (clashed with dark theme) - Header now uses transparent background with subtle separator line - Add description prop — shows catalog description under title - Drag grip dots appear on hover (6-dot pattern, hidden by default) - Remove button appears on hover with red highlight - Dark theme: bg-gray-900, border-gray-700/60, gray-800 separator - Drag state: ring-2 ring-brand-400/30 with scale effect - Hover state: shadow-md with border color transition DashboardClient: passes widget.description to WidgetContainer Co-Authored-By: claude-flow --- .../components/dashboard/DashboardClient.tsx | 1 + .../components/dashboard/WidgetContainer.tsx | 40 +++++++++++++++---- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/apps/web/src/components/dashboard/DashboardClient.tsx b/apps/web/src/components/dashboard/DashboardClient.tsx index 13154b7..ac02a50 100644 --- a/apps/web/src/components/dashboard/DashboardClient.tsx +++ b/apps/web/src/components/dashboard/DashboardClient.tsx @@ -157,6 +157,7 @@ export function DashboardClient() {
removeWidget(widget.id)} > {renderWidget(widget.type, widget.config, (update) => diff --git a/apps/web/src/components/dashboard/WidgetContainer.tsx b/apps/web/src/components/dashboard/WidgetContainer.tsx index 91de87c..02e70ef 100644 --- a/apps/web/src/components/dashboard/WidgetContainer.tsx +++ b/apps/web/src/components/dashboard/WidgetContainer.tsx @@ -4,31 +4,54 @@ import { motion } from "framer-motion"; interface WidgetContainerProps { title: string; + description?: string; onRemove: () => void; children: React.ReactNode; isDragging?: boolean; } -export function WidgetContainer({ title, onRemove, children, isDragging }: WidgetContainerProps) { +export function WidgetContainer({ title, description, onRemove, children, isDragging }: WidgetContainerProps) { return ( - {/* Header */} -
- {title} + {/* Header — clean, no background separation */} +
+
+
+ {/* Drag grip dots */} + + + + + + + + + {title} +
+ {description && ( +

{description}

+ )} +
+ {/* Subtle separator */} +
+ {/* Body */}
{children}