Third audit, UI half; side nav on top; request button colors

- Event cards: lazy -640 photo, only nearby slides drawn, a counter
  past 12 events, past grid paged with Show more
- Community map: search over list and grid, 12 per region then Show
  all, list no longer redrawn on hover
- People tiles: one clip check for the list, Show all past 30
- Person pages: 6 events and posts then Show all; excerpts load only
  the first paragraph
- Admin: filter box on long pickers and the QR select, options sent
  per form, Media thumbnails from the small copy, debounced searches
  that drop stale answers
- Pages show their last data while refreshing after the cache TTL
- Side nav stacks above page content (the carousel arrows)
- No event request button on National Retreats; request buttons take
  their section's accent
- Version v1.11.1-audit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-10-01 19:09:21 -05:00
parent 11a4555683
commit 222c9e69a2
22 changed files with 686 additions and 259 deletions

View file

@ -18,6 +18,7 @@
in a row.
═══════════════════════════════════════════════════════════════ */
import { useState, type ReactNode } from 'react'
import { Link, useParams } from 'react-router-dom'
import PageShell, { type ShellSection } from '../components/PageShell.tsx'
@ -39,6 +40,9 @@ import { accentText, BRAND } from '../lib/color.ts'
const BODY = 'var(--color-muted)'
/* Events and posts show this many, then "Show all". */
const SHOW_FIRST = 6
/* affiliations.role, for a row with no title of its own. */
const ROLE_LABEL: Record<string, string> = {
lead: 'Lead',
@ -127,13 +131,17 @@ export default function PersonDetail() {
accent,
content: (
<div className="max-w-6xl mx-auto px-6">
<ul className="space-y-5">
{person.events.map((event) => (
<li key={event.id}>
<EventRow event={event} accent={accent} />
</li>
))}
</ul>
<Capped items={person.events} accent={accent}>
{(events) => (
<ul className="space-y-5">
{events.map((event) => (
<li key={event.id}>
<EventRow event={event} accent={accent} />
</li>
))}
</ul>
)}
</Capped>
</div>
),
})
@ -193,11 +201,15 @@ export default function PersonDetail() {
accent,
content: (
<div className="max-w-6xl mx-auto px-6">
<ul className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
{person.posts.map((post) => (
<PostCard key={post.id} post={post} accent={accent} />
))}
</ul>
<Capped items={person.posts} accent={accent}>
{(posts) => (
<ul className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
{posts.map((post) => (
<PostCard key={post.id} post={post} accent={accent} />
))}
</ul>
)}
</Capped>
</div>
),
})
@ -208,6 +220,35 @@ export default function PersonDetail() {
)
}
/* The first SHOW_FIRST of a list, then a button for the rest. */
function Capped<T>({
items,
accent,
children,
}: {
items: T[]
accent: string
children: (shown: T[]) => ReactNode
}) {
const [all, setAll] = useState(false)
const more = !all && items.length > SHOW_FIRST
return (
<>
{children(more ? items.slice(0, SHOW_FIRST) : items)}
{more && (
<button
type="button"
onClick={() => setAll(true)}
className="btn mt-6 px-5 py-2 text-sm"
style={{ border: `1px solid ${accent}`, color: accentText(accent) }}
>
Show all {items.length}
</button>
)}
</>
)
}
/* ── The strip of facts under the heading ────────────────────── */
function Facts({ person, accent }: { person: PersonRecord; accent: string }) {