Blocks (migration 032): video (click to play, sharing the featured
cards' player), button and callout types; quotes get an attribution
and images alt text separate from the caption. Paragraphs, callouts,
quotes and list items take **bold**, *italic*, [text](url), line
breaks and blank-line paragraphs, parsed into elements (never HTML)
with only safe link schemes. A list item's detail no longer uses an
em-dash.
Editor: each block type shows only its fields, with a named type and
a description, and every open block previews itself with the site's
renderer. Any repeater row can now be duplicated or have a new row
inserted below it; nested collections take `when`, and help text can
depend on the row.
src/seed-showcase.js writes a local test post using every block type
and option. It refuses the production database.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Admin → Blog → Posts (migration 031): our own posts with a
content-block body, cover image, excerpt, date, tags, and authors
shown as person tiles, either People records or a guest name and
photo. A post is a draft until published; Listed works as it does
elsewhere. Posts are on the QR page too.
Admin → Blog → Community section: the first section of the
Community page, with its heading and blurb from the admin, in two
halves, each pinned first and then newest up to its slots. Our posts
come from blog_posts; community posts are pinned link or video cards
(reusing featured cards and Fetch preview), then the newest items
from a list of RSS or Atom feeds. Feeds are read through the link
preview's guarded fetch and cached for 30 minutes, and a failing feed
keeps its last good items.
content_blocks and featured_cards are rebuilt to accept the new owner
kinds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Front page → Featured cards (migration 030) holds cards of three
kinds: a record on the site, whose title, picture and link fill in
from the record; a link, with a Fetch preview button that reads the
page's title, description and preview image into the media library;
and a video, drawn as a thumbnail that loads the player when pressed.
A 'featured' section draws them.
The cards are shared: featured_cards is owned polymorphically and
FeaturedCards.tsx draws them, ready for the Community blog. Deleting
a record removes its cards; an unpublished record's card is hidden.
The preview fetch only goes to public http(s) addresses on standard
ports, pinned to the vetted IP, with each redirect checked again.
Along the way: repeater fields can show by another field's value (a
hidden one is cleared), a CHECK named as a sentence is shown as the
error, and the timeline's record list is now record_refs for both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Uploads (migration 028, server/src/media.js, routes/media.js): editors
and up upload JPEG, PNG, GIF, WebP or SVG. Photos are resized to 2400px
and saved as WebP by default, or kept as uploaded on request. Files
live in UPLOADS_DIR, served by nginx in production and by the API in
dev. Admins and up delete, after seeing what still uses the file.
Every image field in the editor is now an image widget: preview, the
path as text, Upload and Choose from library. A new Media page lists
the library. Org lists and event cards now resolve logos through
media.ts, so uploaded paths work there.
Events get a card_image (migration 029): a photo behind the card under
a light veil so the text stays readable. The card's size is unchanged.
Setup for production is in docs/media-uploads.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
is_listed (migration 027) sits beside is_published on organizations,
events, people, teams and awards. Unticked, the record's own page
still works, but the site's lists leave it out: the list routes, a
region's chapters, an organization's events, teams and awards, the
QR page's directory, and the front page's counts and countdown.
Places where someone attached it by hand (rosters, hosts, billed
people, recipients, timeline, a pinned countdown) still show it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Links pick their platform from a preset dropdown (PLATFORMS in
src/lib/platforms.ts), and every link button draws that platform's
icon beside its label. The footer and event cards now share the same
PlatformIcon component instead of their own copies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
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>