From c6ecabd084dddabf004822361420a96a935ee4a2 Mon Sep 17 00:00:00 2001 From: Ichsan Kurniawan Date: Wed, 7 Oct 2026 11:17:21 +0700 Subject: [PATCH] Refresh task loading skeletons Updated loading states across the task dashboard, client detail, and project detail pages to match the current UI structure more closely. This change standardizes placeholder shapes, improves accessibility labels, and refines skeleton layouts for headers, stat blocks, filters, and card grids for a more consistent loading experience. --- .../[client_id]/(main)/loading.tsx | 83 ++++++-------- .../project-detail/[project_id]/loading.tsx | 105 +++++++++--------- app/(dashboard)/task/loading.tsx | 55 +++++---- 3 files changed, 111 insertions(+), 132 deletions(-) diff --git a/app/(dashboard)/task/client-detail/[client_id]/(main)/loading.tsx b/app/(dashboard)/task/client-detail/[client_id]/(main)/loading.tsx index 7a91a8e..3ea3496 100644 --- a/app/(dashboard)/task/client-detail/[client_id]/(main)/loading.tsx +++ b/app/(dashboard)/task/client-detail/[client_id]/(main)/loading.tsx @@ -3,70 +3,59 @@ export default function Loading() {
- {/* Back Link Skeleton */} -
+ {/* Back link placeholder */} +
{/* Client Profile Card Skeleton */} -
-
+
+
-
- -
-
-
-
+
+
+
+
+
- -
-
+
+
- -
-
+ {/* Metrics / Key facts row */} +
{Array.from({ length: 4 }).map((_, i) => ( -
-
-
+
+
+
))}
- {/* Project Assignments Section Skeleton */} -
-
-
-
-
+ {/* Filter Bar Skeleton */} +
- {/* Filter & Layout Bar Skeleton */} -
- - {/* Assignment Cards Grid Skeleton */} -
- {Array.from({ length: 3 }).map((_, i) => ( -
-
-
-
-
-
-
-
-
-
-
-
-
+ {/* Assignment Cards Grid Skeleton */} +
+ {Array.from({ length: 6 }).map((_, i) => ( +
+
+
+
- ))} -
+
+
+
+
+
+
+
+
+
+ ))}
); diff --git a/app/(dashboard)/task/client-detail/[client_id]/project-detail/[project_id]/loading.tsx b/app/(dashboard)/task/client-detail/[client_id]/project-detail/[project_id]/loading.tsx index eb90f63..b752c2a 100644 --- a/app/(dashboard)/task/client-detail/[client_id]/project-detail/[project_id]/loading.tsx +++ b/app/(dashboard)/task/client-detail/[client_id]/project-detail/[project_id]/loading.tsx @@ -5,98 +5,93 @@ export default function Loading() { role="status" aria-label="Loading project detail" > - {/* Back Link Skeleton */} -
+ {/* Back link placeholder */} +
{/* Project Header Skeleton */} -
+
-
-
-
-
-
+
+
+
+
- -
+
- -
-
+ {/* Key Facts Grid */} +
{Array.from({ length: 4 }).map((_, i) => ( -
-
-
+
+
+
))}
+ + {/* Client Link Footer */} +
+
+
+
+
+
+
{/* Delivery Overview Skeleton */} -
-
+
+
-
+
-
+
{Array.from({ length: 4 }).map((_, i) => ( -
-
-
+
+
+
))}
- {/* Work Orders List Skeleton */} -
-
-
-
-
+ {/* Filter Skeleton */} +
- {/* Filter Bar Skeleton */} -
- - {/* Work Order Cards */} -
- {Array.from({ length: 2 }).map((_, i) => ( -
-
-
-
-
-
-
-
-
-
-
-
+ {/* Work Order Cards Skeleton */} +
+ {Array.from({ length: 2 }).map((_, i) => ( +
+
+
+
+
+
+
-
-
- -
-
-
+
+
+
- ))} -
+
+
+
+
+
+ ))}
); diff --git a/app/(dashboard)/task/loading.tsx b/app/(dashboard)/task/loading.tsx index 617f8d2..8828e3a 100644 --- a/app/(dashboard)/task/loading.tsx +++ b/app/(dashboard)/task/loading.tsx @@ -3,48 +3,43 @@ export default function Loading() {
- {/* Top Page Header Skeleton */} + {/* Header: Title, Subtitle, and Controls */}
-
-
-
+
+
+
-
-
-
+
+
+
- {/* Filter and Layout Toolbar Skeleton */} + {/* Filter and Search Bar Skeleton */}
- {/* Client Cards Grid Skeleton */} -
+ {/* Content Cards Grid Skeleton */} +
{Array.from({ length: 6 }).map((_, i) => ( -
- {/* Image Banner Skeleton */} -
- - {/* Card Content Skeleton */} -
-
-
-
+
+ {/* Top: Avatar and Title */} +
+
+
+
+
+
-
-
+ {/* Mid preview strip */} +
-
-
-
-
-
+ {/* Bottom metrics row */} +
+
+
))}