Skip to content

Commit 84bdd1b

Browse files
Boshenclaude
andcommitted
refactor: redesign UI with VoidZero-inspired dark theme
Unify design system across all pages and components with consistent styling, CSS variables for theming, and simplified layout by removing the AppBar. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f4a24ef commit 84bdd1b

20 files changed

Lines changed: 917 additions & 679 deletions

apps/dashboard/src/MinificationBenchmarks.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ import { MinificationStats } from "./components/minification/MinificationStats";
44

55
function MinificationBenchmarks() {
66
return (
7-
<>
8-
<main className="max-w-6xl mx-auto px-8 py-8 flex flex-col gap-8">
9-
{/* Combined Charts for Each Library - Time and Compression Side by Side */}
10-
<div className="flex flex-col gap-8">
11-
{libraries.map((library) => (
12-
<LibraryBenchmarkCard key={library} library={library} />
13-
))}
14-
</div>
7+
<main className="px-6 py-6 flex flex-col gap-6">
8+
{/* Combined Charts for Each Library */}
9+
<div className="flex flex-col gap-6">
10+
{libraries.map((library) => (
11+
<LibraryBenchmarkCard key={library} library={library} />
12+
))}
13+
</div>
1514

16-
<MinificationStats />
17-
</main>
18-
</>
15+
<MinificationStats />
16+
</main>
1917
);
2018
}
2119

apps/dashboard/src/NpmPackages.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { PackageDownloadsList } from "./components/npm/PackageDownloadsList";
22

3-
// List of npm packages to display download counts for
43
const packages = [
54
"vite",
65
"vitest",
@@ -16,15 +15,13 @@ const packages = [
1615

1716
function NpmPackages() {
1817
return (
19-
<>
20-
<main className="max-w-7xl mx-auto px-8 py-8">
21-
<h2 className="mb-6 text-slate-800 dark:text-slate-100 text-3xl font-bold tracking-tight">
22-
NPM Package Statistics
23-
</h2>
18+
<main className="px-6 py-6">
19+
<h2 className="mb-6 text-lg font-semibold">
20+
NPM Package Statistics
21+
</h2>
2422

25-
<PackageDownloadsList packages={packages} />
26-
</main>
27-
</>
23+
<PackageDownloadsList packages={packages} />
24+
</main>
2825
);
2926
}
3027

apps/dashboard/src/RolldownStats.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ function RolldownStats({ selectedMetric, setSelectedMetric }: RolldownStatsProps
1313
<>
1414
<MetricNavigation selectedMetric={selectedMetric} setSelectedMetric={setSelectedMetric} />
1515

16-
<main className="max-w-6xl mx-auto px-8 py-8 flex flex-col gap-8">
17-
<div className="bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 px-8 py-8 rounded-xl shadow-sm">
18-
<h2 className="mb-6 text-slate-800 dark:text-slate-100 text-3xl font-bold tracking-tight">
16+
<main className="px-6 py-6 flex flex-col gap-6">
17+
<div>
18+
<h2 className="mb-4 text-lg font-semibold">
1919
{selectedMetric === "bundleSize" ? "Bundle Size" : "Build Time"}
2020
</h2>
2121
{selectedMetric === "bundleSize" ? <BundleSizeChart /> : <BuildTimeChart />}

apps/dashboard/src/components/Layout.tsx

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,21 @@
11
import { Outlet } from "react-router-dom";
2-
import { AppBar } from "./layout/AppBar";
32
import { Sidebar } from "./layout/Sidebar";
43
import { useSidebar } from "../context/SidebarContext";
54

65
function Layout() {
76
const { collapsed } = useSidebar();
87

98
return (
10-
<div className="min-h-screen bg-gradient-to-br from-slate-50 via-blue-50/30 to-purple-50/30 dark:from-slate-950 dark:via-slate-900 dark:to-slate-950 relative overflow-hidden">
11-
{/* Background decorative elements */}
12-
<div className="absolute top-0 right-0 w-96 h-96 bg-blue-500/5 dark:bg-blue-500/10 rounded-full blur-3xl"></div>
13-
<div className="absolute bottom-0 left-0 w-96 h-96 bg-purple-500/5 dark:bg-purple-500/10 rounded-full blur-3xl"></div>
14-
9+
<div className="min-h-screen bg-[var(--color-bg)]">
1510
<Sidebar />
1611

1712
{/* Main Content Area */}
1813
<div
19-
className={`${collapsed ? "lg:pl-20" : "lg:pl-64"} transition-all duration-300 relative z-10`}
14+
className={`${collapsed ? "lg:pl-20" : "lg:pl-64"} transition-all duration-200`}
2015
>
21-
<div className="flex flex-col h-screen">
22-
<AppBar />
23-
24-
{/* Page Content */}
25-
<main className="flex-1 overflow-auto">
26-
<Outlet />
27-
</main>
28-
</div>
16+
<main className="h-screen overflow-auto">
17+
<Outlet />
18+
</main>
2919
</div>
3020
</div>
3121
);

apps/dashboard/src/components/layout/AppBar.tsx

Lines changed: 0 additions & 67 deletions
This file was deleted.

apps/dashboard/src/components/layout/Sidebar.tsx

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -71,82 +71,84 @@ export function Sidebar() {
7171
{/* Mobile Menu Button */}
7272
<button
7373
onClick={() => setMobileOpen(!mobileOpen)}
74-
className="lg:hidden fixed top-4 left-4 z-50 p-2 rounded-lg bg-white dark:bg-slate-800 shadow-md border border-slate-200 dark:border-slate-700"
74+
className="lg:hidden fixed top-4 left-4 z-50 p-2 rounded-lg bg-[var(--card-bg)] border border-[var(--color-border)] shadow-sm"
7575
>
76-
{mobileOpen ? <X size={24} /> : <Menu size={24} />}
76+
{mobileOpen ? <X size={20} /> : <Menu size={20} />}
7777
</button>
7878

7979
{/* Mobile Overlay */}
8080
{mobileOpen && (
8181
<div
82-
className="lg:hidden fixed inset-0 bg-black/50 z-40"
82+
className="lg:hidden fixed inset-0 bg-black/40 backdrop-blur-sm z-40"
8383
onClick={() => setMobileOpen(false)}
8484
/>
8585
)}
8686

8787
{/* Sidebar */}
8888
<aside
8989
className={`
90-
fixed top-0 left-0 h-full bg-white/80 dark:bg-slate-900/80 backdrop-blur-xl border-r border-slate-200/50 dark:border-slate-700/50 shadow-xl
91-
transition-all duration-300 z-40
90+
fixed top-0 left-0 h-full bg-[var(--card-bg)] border-r border-[var(--color-border)]
91+
transition-all duration-200 z-40
9292
${collapsed ? "w-20" : "w-64"}
9393
${mobileOpen ? "translate-x-0" : "-translate-x-full lg:translate-x-0"}
9494
`}
9595
>
9696
{/* Logo Header */}
97-
<div className="h-16 flex items-center justify-between px-4 border-b border-slate-200/50 dark:border-slate-700/50 bg-gradient-to-r from-slate-50/50 to-transparent dark:from-slate-800/50">
97+
<div className="h-16 flex items-center justify-between px-4 border-b border-[var(--color-border)]">
9898
<div className="flex items-center gap-3">
99-
<div className="w-10 h-10 bg-gradient-to-br from-blue-500 via-purple-500 to-purple-600 rounded-lg flex items-center justify-center shadow-lg animate-gradient">
100-
<BarChart3 size={24} className="text-white" />
99+
<div className="w-9 h-9 bg-[var(--color-accent)] rounded-lg flex items-center justify-center">
100+
<BarChart3 size={20} className="text-white" />
101101
</div>
102102
{!collapsed && (
103103
<div>
104-
<h1 className="font-bold bg-gradient-to-r from-slate-900 to-slate-700 dark:from-white dark:to-slate-300 bg-clip-text text-transparent">
104+
<h1 className="font-semibold text-sm tracking-tight">
105105
Vibe
106106
</h1>
107-
<p className="text-xs text-slate-500 dark:text-slate-400">Dashboard</p>
107+
<p className="text-[10px] text-[var(--color-text-muted)]">
108+
Dashboard
109+
</p>
108110
</div>
109111
)}
110112
</div>
111113
<button
112114
onClick={() => setCollapsed(!collapsed)}
113-
className="hidden lg:flex p-1.5 rounded-lg hover:bg-slate-100 dark:hover:bg-slate-800 transition-all hover:scale-110"
115+
className="hidden lg:flex p-1.5 rounded-md hover:bg-[var(--color-surface)] transition-colors"
114116
>
115117
<ChevronLeft
116-
size={18}
117-
className={`text-slate-600 dark:text-slate-300 transition-transform ${collapsed ? "rotate-180" : ""}`}
118+
size={16}
119+
className={`text-[var(--color-text-muted)] transition-transform duration-200 ${collapsed ? "rotate-180" : ""}`}
118120
/>
119121
</button>
120122
</div>
121123

122124
{/* Navigation */}
123125
<nav className="flex-1 px-3 py-4">
124-
<ul className="space-y-1">
126+
<ul className="space-y-0.5">
125127
{navItems.map((item) => (
126128
<li key={item.path}>
127129
<Link
128130
to={item.path}
129131
onClick={() => setMobileOpen(false)}
130132
className={`
131-
flex items-center gap-3 px-3 py-2.5 rounded-lg transition-all duration-200 relative overflow-hidden group
133+
flex items-center gap-3 px-3 py-2.5 rounded-lg transition-all duration-150 relative
132134
${
133135
isActive(item.path)
134-
? "bg-gradient-to-r from-blue-500/10 to-purple-500/10 dark:from-blue-500/20 dark:to-purple-500/20 text-blue-600 dark:text-blue-400 font-medium shadow-sm"
135-
: "text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800 hover:scale-105"
136+
? "bg-[var(--color-accent-soft)] text-[var(--color-accent)] font-medium"
137+
: "text-[var(--color-text-muted)] hover:bg-[var(--color-surface)] hover:text-[var(--color-text)]"
136138
}
137139
${collapsed ? "justify-center" : ""}
138140
`}
139141
title={collapsed ? item.label : undefined}
140142
>
141143
{isActive(item.path) && (
142-
<span className="absolute left-0 top-0 bottom-0 w-1 bg-gradient-to-b from-blue-500 to-purple-600 rounded-r-full"></span>
144+
<span className="absolute left-0 top-1/2 -translate-y-1/2 w-[3px] h-5 bg-[var(--color-accent)] rounded-r-full"></span>
143145
)}
144146
<span className="flex-shrink-0">{item.icon}</span>
145147
{!collapsed && (
146148
<>
147-
<span className="flex-1">{item.label}</span>
149+
<span className="flex-1 text-sm">{item.label}</span>
148150
{item.badge && (
149-
<span className="px-2 py-0.5 text-xs bg-slate-200 dark:bg-slate-700 rounded-full">
151+
<span className="px-2 py-0.5 text-[10px] font-mono bg-[var(--color-surface)] border border-[var(--color-border)] rounded">
150152
{item.badge}
151153
</span>
152154
)}
@@ -158,7 +160,14 @@ export function Sidebar() {
158160
</ul>
159161
</nav>
160162

161-
{/* Bottom area - can be used for other actions in future */}
163+
{/* Version indicator */}
164+
{!collapsed && (
165+
<div className="px-4 py-3 border-t border-[var(--color-border)]">
166+
<span className="text-[10px] text-[var(--color-text-muted)]">
167+
v0.1.0
168+
</span>
169+
</div>
170+
)}
162171
</aside>
163172
</>
164173
);

apps/dashboard/src/components/minification/LibraryBenchmarkCard.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,24 @@ export function LibraryBenchmarkCard({ library }: LibraryBenchmarkCardProps) {
1111
const compressionData = getLibraryData(library, "compression");
1212

1313
return (
14-
<div className="bg-white dark:bg-slate-800 border border-gray-200 dark:border-slate-700 rounded-xl px-6 py-6 shadow-sm transition-all duration-300 hover:shadow-md hover:-translate-y-0.5">
15-
<h3 className="mb-4 text-xl font-bold text-slate-800 dark:text-slate-100 capitalize text-center pb-2 border-b-2 border-slate-200 dark:border-slate-700">
16-
{library}
17-
</h3>
18-
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8 mt-4">
14+
<div className="rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] overflow-hidden">
15+
<div className="px-5 py-3 border-b border-[var(--color-border)]">
16+
<h3 className="text-sm font-semibold capitalize">
17+
{library}
18+
</h3>
19+
</div>
20+
<div className="grid grid-cols-1 lg:grid-cols-2 gap-px bg-[var(--color-border)]">
1921
{/* Left column - Minification Time */}
20-
<div className="bg-slate-50 dark:bg-slate-900 border border-gray-200 dark:border-slate-700 rounded-lg p-4">
21-
<h4 className="mb-4 text-base font-medium text-gray-700 dark:text-gray-300 text-center pb-2 border-b border-gray-200 dark:border-gray-700">
22+
<div className="p-5 bg-[var(--color-bg-elevated)]">
23+
<h4 className="mb-4 text-xs font-medium text-[var(--color-text-muted)] uppercase tracking-wider">
2224
Minification Time
2325
</h4>
2426
<MinificationTimeChart data={timeData} />
2527
</div>
2628

2729
{/* Right column - Compression Ratio */}
28-
<div className="bg-slate-50 dark:bg-slate-900 border border-gray-200 dark:border-slate-700 rounded-lg p-4">
29-
<h4 className="mb-4 text-base font-medium text-gray-700 dark:text-gray-300 text-center pb-2 border-b border-gray-200 dark:border-gray-700">
30+
<div className="p-5 bg-[var(--color-bg-elevated)]">
31+
<h4 className="mb-4 text-xs font-medium text-[var(--color-text-muted)] uppercase tracking-wider">
3032
Compression Ratio
3133
</h4>
3234
<CompressionRatioChart data={compressionData} />

0 commit comments

Comments
 (0)