fix(frontend): address review suggestions from embed card PRs - #390
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Follow-up to #384 and #386 — addresses all code review suggestions from Copilot and cubic.
Fixes
From #384 (embed card redesign):
rankAccentwas computed identically torankColorviagetRankColor(), so non-medal ranks rendered blue (rankDefault) for the accent bar instead of amber. Now usespalette.accentRank(#D29922dark /#9A6700light) for the default accent, while medal ranks (1–3) keep their specific colors. (Identified by cubic)From #386 (contribution graph):
?compact=1&graph=1no longer triggers an unnecessary backend call since the renderer ignores contributions in compact mode anyway. (Identified by cubic)nullvia.catch(() => null)instead of triggering a 500 response, so the stats-only card still renders. (Identified by cubic)Mapaggregation withSUM(cost) GROUP BY datein the query, reducing data transfer for users with many submissions. (Identified by Copilot)Tests
uses amber accent bar for non-medal ranks instead of brand blueSummary by cubic
Addresses review feedback from #384 (embed card redesign) and #386 (contribution graph) to polish the profile embed. Fixes rank accents, avoids unnecessary graph fetches in compact mode, adds graceful fallbacks, aligns UTC cutoff dates with a 7‑day buffer, and moves contribution aggregation to SQL.
Bug Fixes
compact=1andgraph=1.nullso the stats‑only card still renders.Refactors
SUM(cost) GROUP BY datein SQL to reduce data transfer.Written for commit 2fc5c83. Summary will update on new commits.