Skip to content

Commit 3e3d321

Browse files
Add Dashboard skeleton loading state (#225)
* [jules] enhance: Add skeleton loading state to Dashboard - Created `DashboardSkeleton` component mimicking the dashboard layout - Replaced simple loading text with `DashboardSkeleton` in `Dashboard.tsx` - Improved perceived performance and reduced layout shift during data fetch - Verified via Playwright screenshot - Updated todo and changelog tracking files * [jules] fix: Remove unused React import from DashboardSkeleton - Addressed code review feedback by removing unused `import React from 'react'` in `web/components/skeletons/DashboardSkeleton.tsx`. - Verified build passes with `npm run build`. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent bfbf96f commit 3e3d321

File tree

5 files changed

+93
-101
lines changed

5 files changed

+93
-101
lines changed

.Jules/changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
## [Unreleased]
88

9+
### Added
10+
- Dashboard skeleton loading state (`DashboardSkeleton`) to improve perceived performance during data fetch.
11+
912
### Planned
1013
- See `todo.md` for queued tasks
1114

.Jules/todo.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010

1111
### Web
1212

13-
- [ ] **[ux]** Complete skeleton loading system for Dashboard
14-
- Files: `web/pages/Dashboard.tsx`, `web/components/ui/Skeleton.tsx`
15-
- Context: Replace "Loading stats..." text with full skeleton for cards + chart
16-
- Impact: Professional loading experience, reduces perceived wait time
17-
- Size: ~40 lines
18-
- Added: 2026-01-01
13+
- [x] **[ux]** Complete skeleton loading system for Dashboard
14+
- Completed: 2026-01-01
15+
- Files modified: `web/pages/Dashboard.tsx`, `web/components/skeletons/DashboardSkeleton.tsx`
16+
- Impact: Professional loading experience that mimics actual content layout
1917

2018
- [ ] **[ux]** Toast notification system for user actions
2119
- Files: Create `web/components/ui/Toast.tsx`, integrate into actions
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import { Card } from '../ui/Card';
2+
import { Skeleton } from '../ui/Skeleton';
3+
4+
export const DashboardSkeleton = () => {
5+
return (
6+
<div className="p-6 space-y-6 max-w-7xl mx-auto">
7+
{/* Summary Cards Grid */}
8+
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
9+
{[1, 2, 3].map((i) => (
10+
<Card key={i} className="flex flex-col items-center justify-center text-center h-[200px]">
11+
{/* Icon placeholder */}
12+
<Skeleton className="w-16 h-16 rounded-full mb-4" />
13+
{/* Label placeholder */}
14+
<Skeleton className="w-24 h-4 mb-2" />
15+
{/* Value placeholder */}
16+
<Skeleton className="w-32 h-8" />
17+
</Card>
18+
))}
19+
</div>
20+
21+
{/* Main Content Grid */}
22+
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
23+
{/* Chart Section */}
24+
<Card title="Balance Overview">
25+
<div className="mt-4 space-y-4">
26+
{/* Chart bars placeholder */}
27+
<div className="flex items-end justify-between h-[250px] px-4 space-x-4">
28+
<Skeleton className="w-full h-[40%]" />
29+
<Skeleton className="w-full h-[70%]" />
30+
<Skeleton className="w-full h-[50%]" />
31+
<Skeleton className="w-full h-[80%]" />
32+
</div>
33+
</div>
34+
</Card>
35+
36+
{/* Recent Activity Section */}
37+
<Card title="Recent Activity">
38+
<div className="mt-4 space-y-4">
39+
{[1, 2, 3].map((i) => (
40+
<div key={i} className="flex items-center space-x-4">
41+
<Skeleton className="w-10 h-10 rounded-full" />
42+
<div className="flex-1 space-y-2">
43+
<Skeleton className="w-3/4 h-4" />
44+
<Skeleton className="w-1/2 h-3" />
45+
</div>
46+
</div>
47+
))}
48+
</div>
49+
</Card>
50+
</div>
51+
</div>
52+
);
53+
};

0 commit comments

Comments
 (0)