From 2282bee23cacd20e6e83fee847da458a921922d9 Mon Sep 17 00:00:00 2001 From: Zaldimmar Date: Thu, 12 Nov 2026 04:57:08 -0600 Subject: [PATCH] Present: list slides, centered people - A list block's Overview slide and A slide per item (098): its items' text on one slide, and each item with its detail, centered - Setup ticks a list's overview and items on and off; List overview and List items seconds - A presented people row is centered Co-Authored-By: Claude Opus 5.5 --- server/src/admin-schema/columns.js | 3 + server/src/migrations/098_present_list.sql | 18 ++++ server/src/shape.js | 5 +- src/components/PeopleTiles.tsx | 2 +- src/lib/adminSchema/shared.ts | 14 +++ src/lib/useContent.ts | 4 + src/pages/EventPresent.tsx | 114 +++++++++++++++++++-- 7 files changed, 152 insertions(+), 8 deletions(-) create mode 100644 server/src/migrations/098_present_list.sql diff --git a/server/src/admin-schema/columns.js b/server/src/admin-schema/columns.js index e5831c0..9fe002b 100644 --- a/server/src/admin-schema/columns.js +++ b/server/src/admin-schema/columns.js @@ -189,6 +189,9 @@ export const blocksChild = (ownerKind) => ({ bool("present_map_no_details"), enumeration("present_places", ["picked", "none"]), text("present_place_keys"), + // A list's own slides (098). + bool("present_list_overview"), + bool("present_list_items"), ], children: [ { diff --git a/server/src/migrations/098_present_list.sql b/server/src/migrations/098_present_list.sql new file mode 100644 index 0000000..7851b18 --- /dev/null +++ b/server/src/migrations/098_present_list.sql @@ -0,0 +1,18 @@ +-- ═══════════════════════════════════════════════════════════════ +-- 098 A LIST BLOCK'S PRESENTATION SLIDES +-- +-- A list block presented (EventPresent.tsx) is a section's text, +-- unless it has slides of its own: +-- +-- present_list_overview one slide of every item's text, without +-- the detail, centered +-- present_list_items a slide per item: its text the heading, +-- its detail under it, centered +-- +-- Either or both. Other block types ignore them. +-- ═══════════════════════════════════════════════════════════════ + +ALTER TABLE content_blocks ADD COLUMN present_list_overview INTEGER NOT NULL DEFAULT 0 + CHECK (present_list_overview IN (0, 1)); +ALTER TABLE content_blocks ADD COLUMN present_list_items INTEGER NOT NULL DEFAULT 0 + CHECK (present_list_items IN (0, 1)); diff --git a/server/src/shape.js b/server/src/shape.js index 5870af4..c64aa66 100644 --- a/server/src/shape.js +++ b/server/src/shape.js @@ -74,6 +74,8 @@ function presentOf(row) { map_no_details: row.present_map_no_details === 1, places: row.present_places, place_keys: row.present_place_keys ? row.present_place_keys.split(",").filter(Boolean) : [], + list_overview: row.present_list_overview === 1, + list_items: row.present_list_items === 1, }; return Object.values(present).some((value) => (Array.isArray(value) ? value.length : value)) ? present : null; } @@ -87,7 +89,8 @@ export function loadBlocks(db, ownerKind, ids, slot = "body", depth = 0) { `SELECT id, owner_id, type, text, media, href, alt, cite, captions, team_id, venue_id, word_motion, word_direction, word_seconds, list_style, org_kind, present_hide, present_text, present_map_split, present_map_no_list, - present_map_no_details, present_places, present_place_keys + present_map_no_details, present_places, present_place_keys, + present_list_overview, present_list_items FROM content_blocks WHERE owner_kind = ? AND slot IN (?, 'both') AND owner_id IN (${placeholders(ids.length)}) ORDER BY owner_id, sort_order`, diff --git a/src/components/PeopleTiles.tsx b/src/components/PeopleTiles.tsx index 906acad..262b37e 100644 --- a/src/components/PeopleTiles.tsx +++ b/src/components/PeopleTiles.tsx @@ -777,7 +777,7 @@ function Tile({ function PeopleRow({ groups, people }: { groups?: PeopleGroup[]; people?: Person[] }) { const everyone = [...(groups ?? []).flatMap((group) => group.people), ...(people ?? [])]; return ( -