From a48c67d271e2800dd9ca05f61dceed70ba7b633e Mon Sep 17 00:00:00 2001 From: Kacper Date: Sun, 11 Jan 2026 19:59:01 +0100 Subject: [PATCH] refactor: update EmptyStateCard component for improved layout and functionality - Removed unused props and adjusted styles for a more compact and centered design. - Enhanced the display of the icon, title, and description for better visibility. - Updated keyboard shortcut hint and AI suggestion action for improved user interaction. - Refined dismiss/minimize controls to appear on hover, enhancing the user experience. --- .../components/empty-state-card.tsx | 160 +++++++----------- 1 file changed, 60 insertions(+), 100 deletions(-) diff --git a/apps/ui/src/components/views/board-view/components/empty-state-card.tsx b/apps/ui/src/components/views/board-view/components/empty-state-card.tsx index eff9a9be..26b4fc7a 100644 --- a/apps/ui/src/components/views/board-view/components/empty-state-card.tsx +++ b/apps/ui/src/components/views/board-view/components/empty-state-card.tsx @@ -45,13 +45,10 @@ interface EmptyStateCardProps { export const EmptyStateCard = memo(function EmptyStateCard({ columnId, - columnTitle, addFeatureShortcut, isFilteredEmpty = false, isReadOnly = false, onAiSuggest, - opacity = 100, - glassmorphism = true, customConfig, }: EmptyStateCardProps) { const [isDismissed, setIsDismissed] = useState(false); @@ -70,19 +67,17 @@ export const EmptyStateCard = memo(function EmptyStateCard({ const showActions = !isReadOnly && !isFilteredEmpty; const showShortcut = columnId === 'backlog' && addFeatureShortcut && showActions; - // Minimized state - compact indicator + // Minimized state - compact centered indicator if (isMinimized) { return ( -
- {/* Header with icon */} -
-
- -
-
-

- {isFilteredEmpty ? 'No Matching Items' : config.title} -

-

- {isFilteredEmpty - ? 'No features match your current filters. Try adjusting your filter criteria.' - : config.description} -

-
-
- - {/* Keyboard shortcut hint */} - {showShortcut && ( -
- - {config.shortcutHint || 'Press'} - - - {formatShortcut(addFeatureShortcut, true)} - - to add a feature -
- )} - - {/* Example card preview */} - {config.exampleCard && ( -
-
- {config.exampleCard.category} -
-
- {config.exampleCard.title} -
-
- )} - - {/* Action buttons */} - {showActions && config.primaryAction && config.primaryAction.actionType !== 'none' && ( - - )} - - {/* Filtered empty state hint */} - {isFilteredEmpty && ( -

- Clear filters to see all items -

- )} + {/* Icon */} +
+
+ + {/* Title */} +

+ {isFilteredEmpty ? 'No Matching Items' : config.title} +

+ + {/* Description */} +

+ {isFilteredEmpty ? 'No features match your current filters.' : config.description} +

+ + {/* Keyboard shortcut hint for backlog */} + {showShortcut && ( +
+ Press + + {formatShortcut(addFeatureShortcut, true)} + + to add +
+ )} + + {/* AI Suggest action for backlog */} + {showActions && config.primaryAction && config.primaryAction.actionType === 'ai-suggest' && ( + + )} + + {/* Filtered empty state hint */} + {isFilteredEmpty && ( +

+ Clear filters to see all items +

+ )}
); });