Skip to content

Expandable project cards + Vitest tests & CI#11

Merged
lebedevilya merged 4 commits into
mainfrom
expandable-cards-and-tests
May 29, 2026
Merged

Expandable project cards + Vitest tests & CI#11
lebedevilya merged 4 commits into
mainfrom
expandable-cards-and-tests

Conversation

@lebedevilya

Copy link
Copy Markdown
Owner

Part 1: Expandable project cards (homepage)

Clicking a project card now expands it in place to show what was built, the tech stack, and relevant links, instead of immediately navigating away.

  • src/data/projects.ts (new): typed Project[] with tagline, longDesc, stack, role, badge, and a links[] array.
  • HorizontalCard.astro: reworked into a native <details>/<summary> accordion (no JS). Whole card toggles, chevron rotates via group-open:, expanded body shows the description, a stack line, and outbound link buttons (target="_blank" rel="noopener noreferrer").
  • Dropped the dead tags/discontinued special-casing; swapped the astro:assets <Image> for a plain <img> (no optimization on /public paths anyway, and it renders cleanly under the Container API).
  • index.astro maps over projects instead of five hand-written cards.

Part 2: Tests + CI

  • Vitest added (getViteConfig), with test / test:watch scripts.
  • projects.test.ts: data invariants (required fields, root-relative images, http(s) links, badge implies badgeClass).
  • travel.test.ts: current country present, unique codes, finite coordinates.
  • HorizontalCard.test.ts: Container API render (accordion structure, content, one safe link button per link, discontinued dimming).
  • ci.yml: runs npm run test after npm ci, before astro check.

Also included (earlier astro check cleanup, held back to bundle)

  • is:inline on the three JSON / JSON-LD <script> tags.
  • Added @types/d3-geo and @types/topojson-client; typed the now-checked feature()/geoPath() calls.

Verification

  • npm run test → 30 passed
  • npx astro check → 0 errors / 0 warnings / 0 hints
  • npm run build → 8 pages, success

🤖 Generated with Claude Code

Part 1 — expandable project cards (homepage):
- add src/data/projects.ts: typed Project[] with tagline, longDesc,
  stack, role, badge, and a links[] array
- rework HorizontalCard into a native <details>/<summary> accordion
  (no JS): whole card toggles, chevron rotates via group-open, expanded
  body shows description + stack line + outbound link buttons
- drop the dead tags/discontinued special-casing; swap astro:assets
  <Image> for a plain <img> (no optimization on /public paths anyway,
  and it renders cleanly under the Container API)
- index.astro maps over projects instead of 5 hand-written cards

Part 2 — tests + CI:
- add Vitest (getViteConfig), test/test:watch scripts
- projects.test.ts: data invariants (fields, root-relative images,
  http(s) links, badge implies badgeClass)
- travel.test.ts: current country present, unique codes, finite coords
- HorizontalCard.test.ts: Container API render (accordion structure,
  content, one safe link button per link, discontinued dimming)
- ci.yml: run npm test after npm ci, before astro check

Verification: 30 tests pass, astro check 0/0/0, build succeeds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented May 29, 2026

Copy link
Copy Markdown

Deploy Preview for grand-croquembouche-1d568d ready!

Name Link
🔨 Latest commit 6623b6d
🔍 Latest deploy log https://app.netlify.com/projects/grand-croquembouche-1d568d/deploys/6a1907ec113f300008d898a6
😎 Deploy Preview https://deploy-preview-11--grand-croquembouche-1d568d.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

lebedevilya and others added 3 commits May 29, 2026 08:18
- HorizontalCard: animate only box-shadow on hover (softer shadow-lg,
  300ms) instead of transitioning all properties; add subtle bg tint on
  the summary header for affordance
- HorizontalCard: ease the open/close via ::details-content height +
  interpolate-size (Chromium 129+); browsers without it snap gracefully
- projects: souper.cafe drops all links; nodes.garden gains Techstars
  announcement + Arbitrum grant links; SupportOS gains GitHub link
- projects.test: allow a project to have zero links (still validates
  label + http(s) url when present)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- HorizontalCard: remove the hover background tint that sat on the
  <summary> only (tinted just the header when a card was open, which
  looked odd); rely on the whole-card shadow lift for hover feedback
- projects: souper.cafe was a full Rails app, not just a site — add
  stack (Ruby on Rails, PostgreSQL) and note the custom admin panel
  with dynamic menus in the description

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…G, nodes.garden GCP)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lebedevilya lebedevilya merged commit 6e99f9a into main May 29, 2026
6 checks passed
@lebedevilya lebedevilya deleted the expandable-cards-and-tests branch May 29, 2026 03:33
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