Files
SlpSoftware/aidlc-docs/features/redesign-modern-timetravel/construction/plans/e-timetravel-code-generation-plan.md

3.0 KiB

Code Generation Plan — e-timetravel (U5)

Brownfield, same repo. All new code in src/variants/e/** unless stated. Design source: canvas Tijdreis2.dc.html + PakkettenTijd.dc.html. NFRs: construction/e-timetravel/nfr-*.

Steps

  • 1. Fonts + era CSS: add @fontsource/open-sans (300/400/600/700) and @fontsource/vt323; fonts.ts and era.css (era tokens per mode: flat, w2, w98, term; bevel, gloss, dither, marquee, scanline classes; reduced-motion rules; focus ring per era).
  • 2. Token contrast test (__tests__/eraTokens.test.ts): parse token pairs, assert ≥ 4.5:1 (large ≥ 3:1) for both modes and all eras.
  • 3. Era content module (eraContent.ts): era-only strings (marquee, "Klaar!", terminal prompts, year badges, "Meest gekozen!"); everything else from content.ts.
  • 4. ENav: brand, anchor links, mode toggle + way back to B (reuses ModeToggle/VariantToggle), mobile behaviour as B (always-mounted animated menu), year badge not a menu item.
  • 5. Era 2026 (hero) and Era 2013 (about): flat style, photo circle + 3 tiles, decorative glyphs aria-hidden; one h1.
  • 6. Era 2006 (packages): glossy tabs from usePackageFilter, panel, glossy cards, star badge, optional banner per bannerSlugs, swipe row on mobile via useSwipeRow, preselect to the form via useContactPreselect; skeleton/error states like B.
  • 7. Era 1998 (process): Win98 style, marquee (static under reduced motion), step cards with progress blocks, rotated arrows below 960 px, "Klaar!" card.
  • 8. Dither strips between eras (decorative, aria-hidden).
  • 9. Era 1989 (contact): ContactFormTerminal on useContactForm + useContactAvailability (mailto fallback in terminal style, honeypot, field errors via aria-describedby, status messages in a live region, retry/reset), scanlines overlay (aria-hidden, off under reduced motion).
  • 10. LandingE composition replacing the placeholder; section order, ids and accessible names; skip link target stays #main.
  • 11. Tests: per-era render tests; reduced-motion test; terminal form flows (reuse U4 contract mocks); 2006 packages (filter, preselect, swipe); variant round trip B → E → B including mode persistence.
  • 12. Quality gates: pnpm lint, pnpm test, pnpm build (check E chunk size ≤ 60 kB gz excluding fonts; main bundle not larger than before); fix findings; no unrelated reformatting (prettier only on touched files).
  • 13. Docs: construction/e-timetravel/code/code-summary.md, update aidlc-state/audit, mark checkboxes.
  • 14. Commit (Dutch message, Co-Authored-By line) on feature/redesign-modern-timetravel; push; trigger test deploy only (deploy_test, never production); report the run result.

Not in this unit

SEO/prerender decisions (U6), any production deploy, enabling the contact form in production.

Story coverage

Variant E (all five eras, light/dark), form in E, packages in E style, easter-egg toggle already delivered in U1.