Commit graph

53 commits

Author SHA1 Message Date
Zaldimmar
68f08b633c Let the front page countdown filter by event scope and type
Admin > Front page > Countdown gains two optional dropdowns, "Only
this scope" and "Only this type", each defaulting to any. They narrow
which event counts as "the next one": National + Retreat counts down
to the next national retreat and skips a sooner regional class. A
pinned event still wins over both. When nothing matches, the
countdown band doesn't render, as before.

Migration 026 adds front_page.countdown_scope_id, a foreign key to
event_scopes (ON DELETE SET NULL, so removing a scope returns it to
"any"), and countdown_event_type, checked against the same values as
events.event_type. Adding an event type now widens both CHECKs; the
note in eventTypes.ts and the guide say so.

Also clears the older em-dashes from home.js and eventTypes.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 19:59:29 -05:00
Zaldimmar
54bf649b8d Tidy the admin editor's text: previews, blank options, no em-dashes
Your wording pass on adminSchema.ts and fields.tsx: "Default: ..."
blank options, "eg." examples, "URL ID" for slugs, and relabelled
front page sections, stat sources and hero fields.

On top of it:

- Content block row titles end with an ellipsis when the paragraph
  is cut. preview() in src/lib/text.ts does it for anything that
  shortens text: it collapses whitespace, cuts on a word and adds
  "..." only when it actually shortened.
- No em-dashes in the editor, front end or server: placeholders
  ("Internal note: ..."), the Organizations blurb, the URL ID help,
  empty table cells (now "-"), the Award dropdown ("Torch Award
  (NGU)" in OPTION_QUERIES), a boot error message, and every comment
  in the admin files. Also cleared from the files added this branch
  (QR page, directory route, embeds, hero, migration 024), and the
  QR page's team labels read "Board (NGU)".
- A few comments where removing the dash had run two sentences
  together get a comma, colon or parentheses back.
- docs/updating-data-in-code.md matches the new labels and gains a
  "Writing text in the editor" section with these conventions;
  CLAUDE.md lists them under Rules and gotchas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 19:38:24 -05:00
Zaldimmar
e35d09b172 Add a guide to updating data that isn't in the database
docs/updating-data-in-code.md covers content that lives in code
rather than SQLite and how to change it:

- The two kinds of admin dropdown: filled from records
  (optionsFrom, change the record) and fixed lists (options, in
  adminSchema.ts), and that a bare-string option shows its stored
  value while a [value, label] pair shows the label.
- Relabelling a dropdown is adminSchema.ts alone; adding, removing
  or renaming a stored value is a migration, both descriptor halves
  and whatever the public site renders it with.
- A table of every dropdown in the editor, where its values and
  labels live, and what on the public site depends on them.
- The front page's three kinds of "section name" (the heading the
  admin sets, the dropdown label, the subnav link) and stat sources.
- Every other piece of code-owned content: nav, page section
  manifests, banner, history decades, map grid, feedback types,
  public label maps, roles, SITE_ORIGIN.

CLAUDE.md points at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 18:44:35 -05:00