Skip to content

feat: add angled project-thumbnail collage backgrounds on /makers/ cards - #214

Merged
2wenty2wo merged 1 commit into
mainfrom
feat/maker-collage
Dec 4, 2026
Merged

2wenty2wo merged 1 commit into
mainfrom
feat/maker-collage

Conversation

@2wenty2wo

Copy link
Copy Markdown
Owner

Summary

Adds Shaun-approved Variant B (angled project-screenshot collage backgrounds) to /makers/ cards, backed by build-time 200px WebP thumbnails generated by sharp (purely generated into gitignored static/media/<id>/thumbs/<name>.webp, never committed).

  1. Build-time thumbnails (scripts/build-data.js, sharp devDependency):
    • Added buildScreenshotThumbs() (~17 lines) alongside the existing static/media copy loop.
    • Writes a 200px-wide WebP (quality: 72, withoutEnlargement: true, pages: 1 for first-frame-only GIFs) to static/media/<id>/thumbs/<name>.webp and exposes thumbs: [...] next to screenshots.
    • Warns and skips individual bad images instead of failing the build.
  2. Maker collage derivation (scripts/makers.js):
    • Derives thumbs automatically (zero YAML fields): up to 4 projects per maker, 1 lead thumbnail each (entry.thumbs?.[0]), preserving existing project order.
  3. Collage UI (src/routes/makers/+page.svelte):
    • Renders the -6deg contact-sheet strip behind cards with <img loading="lazy" decoding="async" alt="" aria-hidden="true"> and the double-ended linear mask-image fade protecting both maker names (10.5:1 AAA) and right metrics (7.3–9.0:1 AAA; ≥5.24:1 AA even at worst-case peak over #000).
    • 1-project makers render a single angled frame (.is-single); 0-screenshot makers stay plain grey. Zero card layout or palette changes.
  4. Tests:
    • scripts/catalog.test.js: unit-tests buildScreenshotThumbs (PNG → 200px WebP, real animated GIF → single-frame WebP, corrupt input → warn & skip, empty screenshots → []).
    • scripts/makers.test.js: verifies maker thumbs ordering & 0-screenshot empty array.
    • scripts/seo.test.js: asserts every screenshot across all 128 catalog entries produces a generated thumbnail on disk.

Size & Load Measurements

  • build/ before: 37.76 MB (39,592,728 B, 1,114 files)
  • build/ after: 38.99 MB (40,881,582 B, 1,422 files) — +1.23 MB (+308 WebP thumbnails totaling 1,109.5 KB, ~3.6 KB avg)
  • /makers/ above-the-fold at 1440×900 (no scroll): 237.9 KB across 63 lazy-loaded collage thumbnails (650.5 KB total across 97 image requests including GitHub avatars).

Verification

  • npm test (24 scripts) + npm run build + postbuild: all passed.
  • Headless Chromium verification on fresh production preview: overflow=false at 1440 and 390, all collage <img> attributes & naturalWidth <= 200 confirmed, hdslave/keremimo render 4 tiles, briwil renders 1 single tile, inmusic-software renders plain card.
  • Uncommitted WebP screenshots saved to artifacts/maker-collage/.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-04T13:36:14.729994Z 034219a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Dec 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@2wenty2wo
2wenty2wo merged commit 1c450c8 into main Dec 4, 2026
2 checks passed
@2wenty2wo
2wenty2wo deleted the feat/maker-collage branch December 4, 2026 13:43
@2wenty2wo
2wenty2wo restored the feat/maker-collage branch December 4, 2026 13:43
@2wenty2wo
2wenty2wo deleted the feat/maker-collage branch December 4, 2026 13:43
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.

1 participant