Skip to content
This repository was archived by the owner on Sep 10, 2026. It is now read-only.

Link GitHub repository with an icon (fleet policy #91) - #33

Merged
sarthakagrawal927 merged 2 commits into
mainfrom
feat/github-icon-link
Sep 6, 2026
Merged

Link GitHub repository with an icon (fleet policy #91)#33
sarthakagrawal927 merged 2 commits into
mainfrom
feat/github-icon-link

Conversation

@sarthakagrawal927

Copy link
Copy Markdown
Member

Fleet policy sass-maker/saas-maker#91: public sites must link to their own GitHub repo with an icon, never visible text like "GitHub"/"Source".

This is a single-page-ish Vite/React app with three build entries (index.html/game, changelog.html, faq.html) sharing one src/App.tsx. Only the changelog page had an existing repo link ("Source"); the main game page and the FAQ page had none.

Files changed:

  • src/App.tsx - added a small local GithubIcon SVG component (lucide-react, already used for the Settings icon here, does not ship a GitHub/brand icon in the installed version, so an inline SVG per the spec was used and shared via one component to avoid duplication). Added an icon-only GitHub link to the shared SiteHeader nav (next to FAQ/Changelog - covers the main game page, which previously had no repo link at all) and replaced the changelog page's existing "Source" text link with the same icon in place.
  • faq.html - the FAQ page is a separate static HTML entry with its own header/footer (no shared React header) and previously had no repo link; added an icon-only GitHub link to its footer, styled to match the existing footer/link colors.

All links point to https://github.com/Significant-Hobbies/chess with target="_blank" rel="noopener noreferrer" aria-label/title="GitHub repository".

Left unchanged (out of scope): the adjacent "Roadmap" link (changelog page) points to /issues, not the repo itself, so the repo-link icon rule doesn't apply to it.

Verification:

  • pnpm exec biome check (src/App.tsx) and pnpm lint (biome lint, whole repo) - clean, 0 errors.
  • pnpm typecheck (tsc --noEmit) - clean.
  • pnpm build (vite build) - succeeds; confirmed the SVG icon appears in the built index/changelog bundle and in faq.html, with no leftover "Source"/"Source ↗" text.
  • pnpm test (Playwright smoke test) - 1 passed.

Reusing one anchor inline in both SiteHeader and Changelog pushed the
lizard-measured length of Changelog past the checked-in ceiling (a
lizard TSX-parsing quirk triggered by a hyphenated JSX attribute like
aria-label on a second multi-attribute anchor in that function).
Extracting RepoLink removes the duplication and keeps both call sites
to a single attribute, resolving the regression.

Refs sass-maker/saas-maker#91
@sarthakagrawal927
sarthakagrawal927 merged commit e8a34f7 into main Sep 6, 2026
1 check passed
@sarthakagrawal927
sarthakagrawal927 deleted the feat/github-icon-link branch September 6, 2026 00:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant