From 73e2232269053c9aabb57228091c9616106b3e34 Mon Sep 17 00:00:00 2001 From: Sokratis Vidros Date: Fri, 24 Jan 2025 14:51:21 +0200 Subject: [PATCH] fix(dashboard): Another create with UI fixes (#7583) --- .../components/activity/activity-panel.tsx | 72 +++++++++---------- .../components/activity/activity-table.tsx | 4 +- .../activity/components/activity-overview.tsx | 7 +- .../activity/components/overview-item.tsx | 36 +++++++--- apps/dashboard/src/pages/activity-feed.tsx | 4 +- 5 files changed, 71 insertions(+), 52 deletions(-) diff --git a/apps/dashboard/src/components/activity/activity-panel.tsx b/apps/dashboard/src/components/activity/activity-panel.tsx index 07f5032b316..714c52a1230 100644 --- a/apps/dashboard/src/components/activity/activity-panel.tsx +++ b/apps/dashboard/src/components/activity/activity-panel.tsx @@ -83,46 +83,42 @@ export function ActivityPanel({ transition={{ duration: 0.5, ease: 'easeOut' }} className="h-full" > -
-
- - - {activity.template?.name || 'Deleted workflow'} - -
- - -
- - Logs -
- - {isMerged && ( -
- { - e.stopPropagation(); - e.preventDefault(); - - if (activity._digestedNotificationId) { - onActivitySelect(activity._digestedNotificationId); - } - }} - description="Remaining execution has been merged to an active Digest of an existing workflow execution." - /> -
+
+ > + + {activity.template?.name || 'Deleted workflow'}
+ + +
+ + Logs +
+ + {isMerged && ( +
+ { + e.stopPropagation(); + e.preventDefault(); + + if (activity._digestedNotificationId) { + onActivitySelect(activity._digestedNotificationId); + } + }} + description="Remaining execution has been merged to an active Digest of an existing workflow execution." + /> +
+ )} + ); } diff --git a/apps/dashboard/src/components/activity/activity-table.tsx b/apps/dashboard/src/components/activity/activity-table.tsx index c33db4e0036..f7afd1ca8b4 100644 --- a/apps/dashboard/src/components/activity/activity-table.tsx +++ b/apps/dashboard/src/components/activity/activity-table.tsx @@ -80,7 +80,7 @@ export function ActivityTable({ animate={{ opacity: 1 }} exit={{ opacity: 0 }} transition={{ duration: 0.2 }} - className="flex min-h-full min-w-[800px] flex-1 flex-col" + className="flex min-h-full flex-1 flex-col" > - + + {value} + + ); + + const wrappedChildren = isDeleted ? ( + + {childrenComponent} + Resource was deleted. + + ) : ( + childrenComponent + ); + return (
{label} @@ -31,7 +49,7 @@ export function OverviewItem({ className="text-foreground-600 mr-0 size-3 gap-0 p-0 opacity-0 transition-opacity group-hover:opacity-100" > )} - {children || {value}} + {wrappedChildren}
); diff --git a/apps/dashboard/src/pages/activity-feed.tsx b/apps/dashboard/src/pages/activity-feed.tsx index 998d7cb0d0a..bfacdf403b5 100644 --- a/apps/dashboard/src/pages/activity-feed.tsx +++ b/apps/dashboard/src/pages/activity-feed.tsx @@ -42,7 +42,7 @@ export function ActivityFeed() { />
- + - +