overhaul: event landing pattern (/openhouse, /programs/frc/kickoff) - #24
Open
CS-5 wants to merge 1 commit into
Open
overhaul: event landing pattern (/openhouse, /programs/frc/kickoff)#24CS-5 wants to merge 1 commit into
CS-5 wants to merge 1 commit into
Conversation
…koff Both pages were forks — /openhouse of the homepage, /programs/frc/kickoff of the FRC page, 777 lines of JSX between them with the dates, the FAQ, and the kickoff config inlined. They are now two ~15-line routes rendering `events` entries through one EventLayout, so next season is an edit to one markdown file and retiring a season is `hidden: true`. - `EventLayout` renders the hero (entry photo or a program fallback), the date and location band, the body markdown, the season media links, the referenced FAQ, and the closing banner, themed by the entry's `program`. - `ui/Countdown` always ships the absolute date; ~25 lines of script upgrade it to a live countdown and correct the state a static build froze. An event with no `end` never reads as passed. - `ui/FaqList` renders `faq` entries as native disclosures. - `lib/jsonld` gains `event()` and `faqPage()`; `lib/events` gains the `getVisibleEvents()`/`getVisibleEvent()` pair that the routes and plan/10's sitemap filter both read `hidden` through. - `events` gains `heroImageAlt` (docs/adr/0004), and kickoff gains the `end` its own meeting schedule states. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GSWG5JxxUEXX3NYKeLwWzf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 08 of the overhaul stack (
plan/08-events.md), stacked on the Phase 07 layer.What this does
/openhousewas a fork of the homepage and/programs/frc/kickoffa fork of the FRC page — 777 lines of JSX between them, with the dates, the FAQ array andKICKOFF_CONFIGinlined. Both are now thin routes rendering entries from theeventscollection through oneEventLayout(D17). Next season is an edit to one markdown file; retiring a season ishidden: true.Changes
src/layouts/EventLayout.astro— hero (the entry's photo, or a fallback keyed to its program), the date/location band, the body markdown, the season media links, the referenced FAQ, and the closing banner. Themed by the entry'sprogram(sc2keeps the default look, kickoff renders Hazard Green). EmitsEventandFAQPageJSON-LD, plus breadcrumbs on nested routes.src/components/ui/Countdown.astro— the absolute date is always in the HTML, so an agent or a reader without JavaScript gets the real answer; ~25 lines of script upgrade it to a live countdown and correct the state the static build froze. All three states are markup, one shown. An event with noendnever reads as passed — nothing in such an entry says when it is over.src/components/ui/FaqList.astro—faqentries as native<details>disclosures.src/lib/jsonld.ts—event()andfaqPage()builders.src/lib/events.ts—getVisibleEvents()/getVisibleEvent(), the one placehiddenis read: the routes redirect through it, and plan/10's sitemap filter will use the same list.src/pages/openhouse.astro,src/pages/programs/frc/kickoff.astro— ~15 lines each, no copy.knip.jsonc— thesrc/lib/event-date.tsentry is gone;Countdownis its real consumer, which is the seam this phase was required to close.docs/content.md— updating an event for a new season, hiding one, and creating a new one (with the route file it still needs).Decisions worth a look
heroImageAltadded to theeventsschema (docs/adr/0004). The layout had no honestaltfor a hero photo. Optional, but supplyingheroImagewithout it fails the build — the mechanismSeo.astroalready uses forogImage/ogImageAlt.Astro.redirect, which in a static build emits a meta-refresh page carryingnoindexand a canonical to the parent. Chosen over a_redirectsline so the rule lives beside the entry it reads, rather than in a second file to remember when the flag flips. The sitemap still lists a hidden event's URL; that filter is plan/10's, andgetVisibleEvents()is in place for it.docs/content.mdalready states: the open house's hero sentence (the countdown renders it fromstart/end) and kickoff's**Kickoff - January 10.**timeline entry. Kickoff also gained theendits own meeting schedule states.@typescript-eslint/no-misused-promisesis off for.astro. Areturnin frontmatter has no enclosing function node in astro-eslint-parser's AST and the rule asserts one exists, so it crashes rather than reporting — the same class of parser gap as theno-unsafe-returnentry beside it.Copy that did not come across
From legacy
/openhouse: the two program cards (the homepage fork D17 exists to kill —/programsand the homepage carry them) and the embedded Google My Maps iframe with its parking prose, which theDIRECTIONSrow links to instead. From legacy kickoff: the modal holding the meeting schedule (body copy now) and the two map-backed panels, whose content is the info card and the closing banner. The teaser and hint links are present.Verification
pnpm check && pnpm buildgreen. Both routes driven in Chromium at 390px and 1440px against the production preview: zero axe-core violations over WCAG 2.2 AA plus best-practice, no console or page errors, no horizontal overflow, every image withaltand explicit dimensions, clean heading outline. The countdown's three states were each exercised — from a build for the static path, and against a faked clock for the script's transitions on a page whose HTML was built in the passed state. Flippinghiddenon and off was verified by building both ways.The Google Rich Results test needs a public URL, so it runs on the preview deploy; the emitted
EventandFAQPageobjects were checked against their schema.org shapes offline.Generated by Claude Code