Skip to content

feat: replace github star badges with SVG images#464

Merged
hsluoyz merged 5 commits intoapache:masterfrom
cooronx:feat_replace_footer_more_with_text_links
Apr 16, 2026
Merged

feat: replace github star badges with SVG images#464
hsluoyz merged 5 commits intoapache:masterfrom
cooronx:feat_replace_footer_more_with_text_links

Conversation

@cooronx
Copy link
Copy Markdown
Contributor

@cooronx cooronx commented Apr 13, 2026

part of #460

now we generate a stars.json when we run ci/pr

the "more" section now
image

@cooronx cooronx force-pushed the feat_replace_footer_more_with_text_links branch from ff46396 to 7f2d302 Compare April 13, 2026 06:33
@hsluoyz hsluoyz requested a review from Copilot April 13, 2026 06:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 FooterMoreBadges plus 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-motion to 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 .badgeLink and .badgeSvg.
.badgesGrid {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/FooterMoreBadges/index.js Outdated
Comment thread src/components/FooterMoreBadges/index.js Outdated
Comment thread src/theme/Footer/Links/MultiColumn/index.js Outdated
Comment thread src/theme/Footer/Links/MultiColumn/index.js Outdated
Comment thread src/theme/Footer/Links/MultiColumn/index.js Outdated
Comment thread src/components/FooterMoreBadges/index.js Outdated
Comment thread src/components/FooterMoreBadges/index.js Outdated
@cooronx cooronx changed the title feature: replace footer more section with text links feature: replace footer more section with local svg item Apr 13, 2026
@cooronx cooronx force-pushed the feat_replace_footer_more_with_text_links branch from 7f2d302 to 09c89fa Compare April 13, 2026 13:20
@hsluoyz hsluoyz requested a review from Copilot April 13, 2026 16:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json during 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.

Comment thread src/theme/Footer/Links/MultiColumn/index.js
Comment thread src/theme/Footer/Links/MultiColumn/index.js
Comment thread src/theme/Footer/Links/MultiColumn/index.js
Comment thread src/theme/Footer/Links/MultiColumn/index.js
Comment thread src/theme/Footer/Links/MultiColumn/index.js Outdated
Comment thread src/theme/Footer/Links/MultiColumn/index.js Outdated
Comment thread src/theme/Footer/Links/MultiColumn/index.js Outdated
Comment thread scripts/generate-footer-stars.js
Comment thread .github/workflows/pr_ci.yml
Comment thread src/components/FooterMoreBadges/stars.json
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 column className.
  • Introduces FooterMoreBadges (SVG rendering + CSS module) backed by badges.json and build-generated stars.json.
  • Adds a Node script + workflow steps to generate/update stars.json during 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.

Comment thread src/theme/Footer/Links/MultiColumn/index.js
Comment thread src/components/FooterMoreBadges/styles.module.css
Comment thread docusaurus.config.js
Comment thread .github/workflows/pr_ci.yml
Comment thread .github/workflows/master.yml
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/MultiColumn to render a custom “More” column (via footer-more-column) with FooterMoreBadges.
  • Adds FooterMoreBadges component (SVG badges + styles) backed by badges.json and generated stars.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.

Comment thread .github/workflows/pr_ci.yml
Comment thread src/theme/Footer/Links/MultiColumn/index.js
@cooronx cooronx force-pushed the feat_replace_footer_more_with_text_links branch from de4a9e6 to c7a3592 Compare April 15, 2026 17:01
@hsluoyz hsluoyz requested a review from Copilot April 16, 2026 13:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 FooterLinksMultiColumn override to render a custom badge grid when the footer column has className: "footer-more-column".
  • Introduces FooterMoreBadges (with CSS module styling) and local SVG assets for GitHub/X, backed by a generated stars.json.
  • Adds a Node script plus CI steps to regenerate stars.json during 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.

@hsluoyz hsluoyz changed the title feature: replace footer more section with local svg item feat: replace github star badges with SVG images Apr 16, 2026
@hsluoyz hsluoyz merged commit b785b83 into apache:master Apr 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants