Overview
Currently, our codebase suffers from markup bloat because Tailwind utility classes are repeated across many files for common structural elements like buttons, cards, and badges. This duplication makes future design changes tedious, error-prone, and difficult to maintain globally.
The Problem
Components throughout src/components/ manually define complex combinations of Tailwind classes for standard UI elements. For example, every card duplicates the same border, background, padding, and shadow classes (rounded-xl border border-[var(--border)] bg-[var(--card)] p-6 shadow-sm).
Affected Files
- Distributed throughout
src/components/ (e.g., DashboardWidgets.tsx, ProjectMetrics.tsx, ContributionHeatmap.tsx, etc.)
Proposed Enhancement
Extract these commonly used elements into their own standard, reusable UI components.
Acceptance Criteria
Overview
Currently, our codebase suffers from markup bloat because Tailwind utility classes are repeated across many files for common structural elements like buttons, cards, and badges. This duplication makes future design changes tedious, error-prone, and difficult to maintain globally.
The Problem
Components throughout
src/components/manually define complex combinations of Tailwind classes for standard UI elements. For example, every card duplicates the same border, background, padding, and shadow classes (rounded-xl border border-[var(--border)] bg-[var(--card)] p-6 shadow-sm).Affected Files
src/components/(e.g.,DashboardWidgets.tsx,ProjectMetrics.tsx,ContributionHeatmap.tsx, etc.)Proposed Enhancement
Extract these commonly used elements into their own standard, reusable UI components.
Acceptance Criteria
lib/utils.ts(if it doesn't exist) with acnutility that combinesclsxandtailwind-mergeto resolve class conflicts cleanly.src/components/ui/card.tsx(or similar) with base styles to encapsulate standard card layouts.src/components/ui/button.tsxutilizingcva(class-variance-authority) to handle distinct button variants (e.g.,default,outline,ghost,destructive) and sizes.src/components/ui/badge.tsxfor standardizing the various metric flags and labels used across the app.