refactor: extract reusable ui primitives and standardize dashboard components#1559
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 |
|
This PR has merge conflicts with the current |
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 33523564 | Triggered | Generic High Entropy Secret | c5b7bfe | .env.example | View secret |
| 33523565 | Triggered | Supabase Service Role JWT | c5b7bfe | .env.example | View secret |
| 33523566 | Triggered | JSON Web Token | c5b7bfe | .env.example | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
|
This PR has developed merge conflicts after recent merges to |
a455668
into
Priyanshu-byte-coder:main
|
🎉 Merged! Thanks for contributing to DevTrack. If the project has been useful to you, a ⭐ star on the repo is the easiest way to support it — it helps DevTrack get discovered by more developers. Keep an eye on open issues for your next contribution! |
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.