Premium Profile Dashboard and Lite Small Cards.#15
Merged
Conversation
- Implemented the "Mastercard" as a Premium Full-Width Dashboard (820px). - Dashboard includes: Hero Stats (Commits, Contributions, PRs, Stars, Lines Changed), Top Languages, Streaks/Activity, PR/Issue progress bars, and a 12-month Heatmap. - Reduced Issues and PR Summary cards to a standardized "lite small" size (380x120px). - Fixed text overlap in Pull Request card with dynamic truncation. - Robust data fetching with `safeFetch` and fallback zero-values to prevent crashes. - Updated documentation and landing page with new dashboard examples. Co-authored-by: Chintanpatel24 <216989679+Chintanpatel24@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Updates the “Mastercard” dashboard card to a full-width (820px) premium profile dashboard and extends the master API endpoint to fetch and provide additional stats needed by the new layout.
Changes:
- Expanded
svg-masterlayout to an 820px “premium” dashboard with hero stats, mid-grid sections, breakdown bars, and a 12‑month heatmap. - Extended
/api/masterdata fetching to include total stars and recent PR lines changed, and updated caching/error handling for the full dashboard. - Simplified server-to-SVG wiring by passing the full data object into
generateMasterCardSVG.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/svg-master.js |
Reworked SVG structure and sizing for the premium full-width dashboard; added new stats and sections. |
api/master.js |
Fetches/stores additional stats (stars, lines changed), updates cache key, and passes expanded data into the SVG generator. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+140
to
+151
| <rect width="${breakW}" height="8" rx="4" fill="#30363d" opacity="0.4"/> | ||
| <rect width="${Math.max(8, (mergedPRs / (totalPRs || 1)) * breakW)}" height="8" rx="4" fill="#8b5cf6"/> | ||
| <text x="0" y="24" font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif" font-size="11" fill="#8b949e">Merged: <tspan fill="#8b5cf6" font-weight="700">${mergedPRs}</tspan></text> | ||
| <text x="${breakW}" y="24" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif" font-size="11" fill="#8b949e">Open: <tspan fill="#3fb950" font-weight="700">${openPRs}</tspan></text> | ||
| </g> | ||
| </g> | ||
| <g transform="translate(0, 70)"> | ||
| <rect width="${rightColW}" height="45" rx="6" fill="#f97316" opacity="0.05"/> | ||
| <text x="10" y="18" font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif" font-size="9" fill="#8b949e" style="text-transform:uppercase">Current Streak</text> | ||
| <text x="10" y="36" font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif" font-size="16" font-weight="700" fill="#f97316">${currentStreak} Days</text> | ||
| <g transform="translate(${breakW + 20}, 0)"> | ||
| <text x="0" y="0" font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif" font-size="14" font-weight="700" fill="#${titleColor}">Issues Status</text> | ||
| <g transform="translate(0, 12)"> | ||
| <rect width="${breakW}" height="8" rx="4" fill="#30363d" opacity="0.4"/> | ||
| <rect width="${Math.max(8, (closedIssues / (totalIssues || 1)) * breakW)}" height="8" rx="4" fill="#f85149" opacity="0.6"/> | ||
| <text x="0" y="24" font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif" font-size="11" fill="#8b949e">Total: <tspan fill="#${textColor}" font-weight="700">${totalIssues}</tspan></text> |
| { label: "Issues", value: totalIssues, color: "f85149" }, | ||
| { label: "Repos", value: repoCount, color: "1f6feb" }, | ||
| { label: "Contributions", value: contributions.toLocaleString(), color: "39d353" }, | ||
| { label: "Total PRs", value: totalPRs, color: "8b5cf6" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
safeFetchand fallback zero-values to prevent crashes.