feat(widgets): GitHub activity, pull request and status blocks - #20
Merged
Merged
Conversation
- github-commits: commits this year, current/best streak, contribution heatmap sized to the block width (17 weeks at 1 column, 39 at 2) - github-prs: total/merged/open with a merged/open/closed breakdown - github-status: status emoji, message and busy flag - GraphQL fetchers with caching and clear errors (no token, not found); 'GitHub Activity' preset; editor toggles and library glyphs - Shared estimateTextWidth (per-character-class, calibrated to the widget font) drives SVG truncation, title/meta layout and stat formatting so SVG cuts text where the HTML canvas does
|
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
Three new GitHub blocks (plus a "GitHub Activity" preset), implemented in both renderers from the shared geometry per the
add-block-type/widget-render-parityskills.github-commitsgithub-prsgithub-statusheatmapWeeks): 17 weeks in a 1-column block, 39 in a full-width one. It's the first step toward "block variants for different sizes".GITHUB_TOKEN. Without it the block shows "Add GITHUB_TOKEN on the server to show this block"; unknown users show "GitHub profile not found". Custom image emoji in statuses are dropped (they can't render as text).%. The new sharedestimateTextWidthuses per-character-class widths calibrated in the browser ("Смёрджено" estimate 61px vs measured 61.4px). It now drives SVG truncation, the title/meta row (the title keeps its width and the meta shrinks, like the HTML flex row) and full-vs-compact stat numbers. I also shortened the Russian "merged" label to «Слито».Test plan
format:check,lint,typecheck,test(53 client + 62 server),build,typecheck:apiBefore deploying: make sure
GITHUB_TOKENis set in Vercel (a fine-grained token with public read access is enough).