From 0803fd7bc43282883e626c8b31259eb4ce0f4ee3 Mon Sep 17 00:00:00 2001 From: Dries Augustyns Date: Fri, 17 Apr 2026 12:27:40 +0200 Subject: [PATCH] ui: Clean up empty states, modals, animations --- apps/web/src/components/ActivityFeed.tsx | 13 +- apps/web/src/components/ApiKeyDisplay.tsx | 37 +- .../components/CampaignSelectionDialog.tsx | 54 +- apps/web/src/components/DashboardLayout.tsx | 43 +- .../src/components/DataManagementSettings.tsx | 6 +- apps/web/src/components/DomainsSettings.tsx | 123 +++-- apps/web/src/components/EmptyState.tsx | 22 + apps/web/src/components/QuickStart.tsx | 5 +- .../src/components/SegmentFilterBuilder.tsx | 20 +- apps/web/src/components/TeamSettings.tsx | 56 ++- .../components/TemplateSelectionDialog.tsx | 60 +-- apps/web/src/components/WorkflowBuilder.tsx | 37 +- .../web/src/components/WorkflowVisualizer.tsx | 10 +- apps/web/src/pages/analytics/index.tsx | 14 +- apps/web/src/pages/campaigns/[id].tsx | 84 ++-- apps/web/src/pages/campaigns/create.tsx | 470 ++++++------------ apps/web/src/pages/campaigns/index.tsx | 132 +++-- apps/web/src/pages/contacts/[id].tsx | 103 +++- apps/web/src/pages/contacts/index.tsx | 187 +++---- apps/web/src/pages/index.tsx | 19 +- apps/web/src/pages/segments/[id].tsx | 14 +- apps/web/src/pages/segments/index.tsx | 49 +- apps/web/src/pages/segments/new.tsx | 6 +- apps/web/src/pages/templates/[id].tsx | 8 +- apps/web/src/pages/templates/create.tsx | 211 ++++---- apps/web/src/pages/templates/index.tsx | 33 +- apps/web/src/pages/workflows/[id].tsx | 109 ++-- apps/web/src/pages/workflows/index.tsx | 46 +- packages/ui/src/components/atoms/Button.tsx | 8 +- packages/ui/src/components/atoms/Card.tsx | 2 +- packages/ui/src/components/atoms/Dialog.tsx | 10 +- .../ui/src/components/atoms/DropdownMenu.tsx | 2 +- 32 files changed, 946 insertions(+), 1047 deletions(-) create mode 100644 apps/web/src/components/EmptyState.tsx diff --git a/apps/web/src/components/ActivityFeed.tsx b/apps/web/src/components/ActivityFeed.tsx index 2634175..9e19c29 100644 --- a/apps/web/src/components/ActivityFeed.tsx +++ b/apps/web/src/components/ActivityFeed.tsx @@ -2,7 +2,8 @@ import {Button} from '@plunk/ui'; import type {Activity, CursorPaginatedResponse} from '@plunk/types'; import {network} from '../lib/network'; import {ActivityItem} from './ActivityItem'; -import {Loader2} from 'lucide-react'; +import {EmptyState} from './EmptyState'; +import {Activity as ActivityIcon, Loader2} from 'lucide-react'; import {useCallback, useEffect, useMemo, useState} from 'react'; export interface ActivityFeedProps { @@ -186,11 +187,11 @@ export function ActivityFeed({typeFilter, dateRangeDays = 30, contactId}: Activi if (activities.length === 0 && upcomingActivities.length === 0) { return ( -
-

- No activity found for the selected filters. Activities will appear here as they happen. -

-
+ ); } diff --git a/apps/web/src/components/ApiKeyDisplay.tsx b/apps/web/src/components/ApiKeyDisplay.tsx index 2d35500..5cc98b7 100644 --- a/apps/web/src/components/ApiKeyDisplay.tsx +++ b/apps/web/src/components/ApiKeyDisplay.tsx @@ -1,6 +1,7 @@ +import {AnimatePresence, motion} from 'framer-motion'; +import {Check, Copy, Eye, EyeOff, RefreshCw} from 'lucide-react'; import {useState} from 'react'; import {Button} from '@plunk/ui'; -import {Check, Copy, Eye, EyeOff, RefreshCw} from 'lucide-react'; interface ApiKeyDisplayProps { label: string; @@ -28,8 +29,8 @@ export function ApiKeyDisplay({ await navigator.clipboard.writeText(value); setCopied(true); setTimeout(() => setCopied(false), 2000); - } catch (error) { - console.error('Failed to copy:', error); + } catch { + // clipboard API unavailable — silent } }; @@ -39,8 +40,8 @@ export function ApiKeyDisplay({ try { setIsRegenerating(true); await onRegenerate(); - } catch (error) { - console.error('Failed to regenerate:', error); + } catch { + // error surfaced via isRegenerating state reset } finally { setIsRegenerating(false); } @@ -74,9 +75,31 @@ export function ApiKeyDisplay({ size="icon" onClick={handleCopy} title="Copy to clipboard" - className="h-9 w-9" + className="h-9 w-9 overflow-hidden" > - {copied ? : } + + {copied ? ( + + + + ) : ( + + + + )} + {showRegenerate && onRegenerate && ( {/* Project Dropdown */} {showProjectMenu && ( -
+
{sortedProjects.map(project => ( {/* User Dropdown */} {showUserMenu && ( -
+
+
+

{user?.email}

+