From 301fb3f8f846f16602ef487fb1b1cc6b6e228541 Mon Sep 17 00:00:00 2001
From: Che <30403707+Che-Zhu@users.noreply.github.com>
Date: Sun, 14 Dec 2025 17:20:42 +0800
Subject: [PATCH 1/2] feat(project-list): add skeleton loading state
- Add ProjectCardSkeleton component for better loading experience
- Replace spinner with skeleton in ProjectListContent
- Prevent layout shift during data fetching
---
.../projectList/ProjectCardSkeleton.tsx | 36 +++++++++++++++++++
.../projectList/ProjectListContent.tsx | 11 +++---
2 files changed, 42 insertions(+), 5 deletions(-)
create mode 100644 components/features/projectList/ProjectCardSkeleton.tsx
diff --git a/components/features/projectList/ProjectCardSkeleton.tsx b/components/features/projectList/ProjectCardSkeleton.tsx
new file mode 100644
index 0000000..928c054
--- /dev/null
+++ b/components/features/projectList/ProjectCardSkeleton.tsx
@@ -0,0 +1,36 @@
+import { Card, CardFooter, CardHeader } from '@/components/ui/card';
+import { Skeleton } from '@/components/ui/skeleton';
+
+export default function ProjectCardSkeleton() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/components/features/projectList/ProjectListContent.tsx b/components/features/projectList/ProjectListContent.tsx
index d983e66..8cbb158 100644
--- a/components/features/projectList/ProjectListContent.tsx
+++ b/components/features/projectList/ProjectListContent.tsx
@@ -3,7 +3,7 @@
import EmptyProjectCard from '@/components/features/projectList/EmptyProjectCard';
import ProjectCard from '@/components/features/projectList/ProjectCard';
-import { Spinner } from '@/components/ui/spinner';
+import ProjectCardSkeleton from '@/components/features/projectList/ProjectCardSkeleton';
import { useProjects } from '@/hooks/use-projects';
export default function ProjectListContent() {
@@ -13,10 +13,11 @@ export default function ProjectListContent() {
if (isLoading) {
return (
-
-
-
-
Loading projects...
+
+
+ {Array.from({ length: 3 }).map((_, i) => (
+
+ ))}
);
From 01d14fa1f852002e1d81593dc4354974b5e97298 Mon Sep 17 00:00:00 2001
From: Che <30403707+Che-Zhu@users.noreply.github.com>
Date: Sun, 14 Dec 2025 17:46:55 +0800
Subject: [PATCH 2/2] feat(project-details): add loading.tsx for better route
transition
- Add loading skeleton for project layout
- Improve perceived performance on route change
---
app/projects/[id]/loading.tsx | 48 +++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
create mode 100644 app/projects/[id]/loading.tsx
diff --git a/app/projects/[id]/loading.tsx b/app/projects/[id]/loading.tsx
new file mode 100644
index 0000000..8a8b769
--- /dev/null
+++ b/app/projects/[id]/loading.tsx
@@ -0,0 +1,48 @@
+import { Skeleton } from '@/components/ui/skeleton';
+
+export default function Loading() {
+ return (
+
+
+ {/* Primary Sidebar Skeleton */}
+
+
+
+
+
+
+ {/* Project Sidebar Skeleton */}
+
+
+ {/* Main Content Area Skeleton */}
+
+
+
+ {/* Status Bar Skeleton */}
+
+
+
+
+
+ );
+}