refactor: extract reusable ui primitives and standardize dashboard components#1559
refactor: extract reusable ui primitives and standardize dashboard components#1559ArshVermaGit wants to merge 8 commits into
Conversation
|
@ArshVermaGit is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
ArshVermaGit
left a comment
There was a problem hiding this comment.
Hi @Priyanshu-byte-coder ! Issue #1558 has been resolved. Please review the PR and merge it under GSSoC. Thanks!
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
This PR now has merge conflicts with main due to recent merges. Please rebase onto the latest main branch and resolve conflicts before we can merge.
|
This PR now has merge conflicts with |
|
@Priyanshu-byte-coder merge conflicts are resolved please review and merge |
Overview
This PR addresses significant markup bloat across our
src/components/directory. By extracting common structural elements (Buttons, Cards, Badges, Skeletons) into centralized, reusable primitives, we drastically reduce inline Tailwind CSS duplication. This makes future design changes vastly easier to maintain globally and significantly improves component readability.Resolved Issue
Resolves #1558
Changes Made
clsx,tailwind-merge, andclass-variance-authorityto power dynamic and conflict-free class resolution in a newcn()utility function (src/lib/utils.ts).src/components/ui/:<Button />: Standardized semantic variants (default,outline,ghost,destructive) and sizing (sm,lg,icon).<Card />Group: Abstracted the standard dashboard container styling (rounded-xl border bg-[var(--card)] p-6).<Badge />: Centralized metric flag styling (success,destructive,outline, etc.).<Skeleton />: Centralized the shimmer loader component.ProjectMetrics.tsxCodingActivityInsightsCard.tsxWeeklySummaryCard.tsxType of change
How Has This Been Tested?
<Button>component.npm run buildand verified the project compiles successfully with no missing module or type errors.