feat: replace github star badges with SVG images#464
Conversation
ff46396 to
7f2d302
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Reworks the Docusaurus footer “More” column to replace shield-based badges with a custom React component that renders SVG badges and periodically refreshes GitHub star counts via the GitHub REST API.
Changes:
- Adds a custom footer multi-column renderer that special-cases a “More” column to render
FooterMoreBadgesplus link items. - Introduces
FooterMoreBadges(SVG badges + localStorage caching + 2-hour refresh) and moves badge hover/focus styling into a CSS module. - Updates footer config/CSS to remove old shield HTML + global footer badge hover styles and mark the “More” column with a class.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/theme/Footer/Links/MultiColumn/index.js | Adds custom footer column rendering and a “More” column special-case hook. |
| src/css/custom.css | Removes old global hover/animation styles for GitHub/Twitter footer badge links. |
| src/components/FooterMoreBadges/styles.module.css | Adds scoped grid + hover/active/focus styles for the new badges. |
| src/components/FooterMoreBadges/index.js | Implements SVG badges, star fetching, caching, and periodic refresh logic. |
| docusaurus.config.js | Marks “More” column with a class and removes old shield badge HTML from footer items. |
Comments suppressed due to low confidence (1)
src/components/FooterMoreBadges/styles.module.css:1
- The hover/active motion effects should respect
prefers-reduced-motionto avoid vestibular discomfort for users who request reduced motion. Add a@media (prefers-reduced-motion: reduce)override to disable transforms/transitions (or reduce them) for.badgeLinkand.badgeSvg.
.badgesGrid {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7f2d302 to
09c89fa
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the Docusaurus footer “More” column to render locally generated SVG star/follow badges (instead of shields.io images) and adds CI automation to generate cached GitHub star counts.
Changes:
- Added a custom footer multi-column renderer with a special-case “More” column that injects
FooterMoreBadges. - Introduced
FooterMoreBadges(component + CSS module) and repo metadata JSON files (badges.json,stars.json). - Added a Node script and CI steps to (re)generate
stars.jsonduring PR/master builds.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/theme/Footer/Links/MultiColumn/index.js | Custom footer column renderer; injects the new badges grid for the “More” column. |
| src/css/custom.css | Removes old global footer link hover/active animations (now handled by CSS module for badges). |
| src/components/FooterMoreBadges/index.js | Renders local SVG badges for GitHub stars and X follow. |
| src/components/FooterMoreBadges/styles.module.css | Styles/animations/focus ring for the new badge links. |
| src/components/FooterMoreBadges/badges.json | Declares which repos to show and label sizing metadata. |
| src/components/FooterMoreBadges/stars.json | Cached star counts consumed by the site at build/runtime. |
| scripts/generate-footer-stars.js | Fetches GitHub star counts and writes stars.json (with fallback to existing). |
| package.json | Adds generate:footer-stars script. |
| docusaurus.config.js | Marks “More” column with a class to trigger custom rendering; removes shields.io HTML. |
| .github/workflows/pr_ci.yml | Runs the footer stars generation step before building. |
| .github/workflows/master.yml | Runs the footer stars generation step before building on master. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR refactors the Docusaurus footer “More” column to render locally-built SVG badges (GitHub stars + X follow) instead of remote Shields.io images/handwritten HTML, and adds CI/build-time generation of a stars.json payload used by the footer UI.
Changes:
- Swizzles the footer multi-column renderer to inject a custom “More” column component (
FooterMoreBadges) keyed off a columnclassName. - Introduces
FooterMoreBadges(SVG rendering + CSS module) backed bybadges.jsonand build-generatedstars.json. - Adds a Node script + workflow steps to generate/update
stars.jsonduring CI/build.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/theme/Footer/Links/MultiColumn/index.js |
Adds a swizzled footer multi-column component that detects a special column class and renders FooterMoreBadges. |
src/css/custom.css |
Removes prior footer “More” link hover/active animation rules (previously applied to GitHub/Twitter footer links). |
src/components/FooterMoreBadges/styles.module.css |
Adds scoped styling for the new badge grid and hover/active/focus states. |
src/components/FooterMoreBadges/stars.json |
Adds the committed baseline star-count snapshot used as a fallback/static payload. |
src/components/FooterMoreBadges/index.js |
Implements the new local SVG badges (GitHub star badges per repo + X follow badge). |
src/components/FooterMoreBadges/badges.json |
Defines which repositories to show in the footer and their label sizing metadata. |
scripts/generate-footer-stars.js |
Adds build-time GitHub API fetching to produce/update stars.json. |
package.json |
Adds generate:footer-stars script entry. |
docusaurus.config.js |
Replaces the prior “More” HTML items with an empty column carrying footer-more-column class. |
.github/workflows/pr_ci.yml |
Runs generate:footer-stars before the PR build. |
.github/workflows/master.yml |
Runs generate:footer-stars before the main build/deploy workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Replaces the footer “More” column’s external Shields.io badge HTML with a local, build-time generated SVG badge grid (including GitHub star counts), aligning with the website’s move toward self-contained footer assets as part of #460.
Changes:
- Swizzles Docusaurus
Footer/Links/MultiColumnto render a custom “More” column (viafooter-more-column) withFooterMoreBadges. - Adds
FooterMoreBadgescomponent (SVG badges + styles) backed bybadges.jsonand generatedstars.json. - Introduces a CI/build script (
generate-footer-stars.js) and wires it into workflows +package.json.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/theme/Footer/Links/MultiColumn/index.js | Custom footer multi-column renderer; injects FooterMoreBadges for the “More” column. |
| src/css/custom.css | Removes legacy global hover/animation rules tied to Shields.io footer links. |
| src/components/FooterMoreBadges/index.js | Renders local SVG “star/follow” badges using pre-generated star counts. |
| src/components/FooterMoreBadges/styles.module.css | Adds scoped layout/hover/focus styles for the new badge grid. |
| src/components/FooterMoreBadges/badges.json | Declarative list of repos (labels/URLs/layout widths) for badge rendering. |
| src/components/FooterMoreBadges/stars.json | Build-generated star-count payload consumed by the footer badges. |
| scripts/generate-footer-stars.js | Fetches GitHub repo star counts and writes stars.json (with fallback to existing data). |
| package.json | Adds generate:footer-stars script entry. |
| docusaurus.config.js | Replaces “More” column HTML items with an empty column marked footer-more-column. |
| .github/workflows/pr_ci.yml | Runs the star-generation script before building in PR CI. |
| .github/workflows/master.yml | Runs the star-generation script before building in the main workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
de4a9e6 to
c7a3592
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors the Docusaurus footer “More” column to stop embedding external shields.io HTML snippets and instead render a local, styled badge grid powered by a build-time generated stars.json.
Changes:
- Adds a swizzled
FooterLinksMultiColumnoverride to render a custom badge grid when the footer column hasclassName: "footer-more-column". - Introduces
FooterMoreBadges(with CSS module styling) and local SVG assets for GitHub/X, backed by a generatedstars.json. - Adds a Node script plus CI steps to regenerate
stars.jsonduring PR and master builds.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| static/img/footer/x.svg | Adds local X icon for the footer badges. |
| static/img/footer/github.svg | Adds local GitHub icon for the footer badges. |
| src/theme/Footer/Links/MultiColumn/index.js | Swizzled footer multi-column renderer with custom handling for the “More” column. |
| src/css/custom.css | Removes old global hover/animation rules that targeted the prior external badge links. |
| src/components/FooterMoreBadges/styles.module.css | New scoped styling for the badge grid and interactions. |
| src/components/FooterMoreBadges/stars.json | Adds initial star snapshot consumed at runtime. |
| src/components/FooterMoreBadges/index.js | Renders the GitHub star badges and X follow badge from local assets/data. |
| src/components/FooterMoreBadges/badges.json | Defines the repos shown in the “More” badge grid. |
| scripts/generate-footer-stars.js | Build-time generator that fetches GitHub star counts and writes stars.json. |
| package.json | Adds generate:footer-stars script. |
| docusaurus.config.js | Replaces prior inline HTML items in “More” with an empty column tagged for custom rendering. |
| .github/workflows/pr_ci.yml | Runs star generation before building in PR CI. |
| .github/workflows/master.yml | Runs star generation before building on master. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
part of #460
now we generate a
stars.jsonwhen we run ci/prthe "more" section now
