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:
parent
11a4555683
commit
222c9e69a2
22 changed files with 686 additions and 259 deletions
|
|
@ -39,6 +39,7 @@ import { useNavSections } from '../../lib/navSections.ts'
|
|||
import { awardHref, blogHref, eventHref, orgHref, personHref, teamHref } from '../../lib/hrefs.ts'
|
||||
import { siteUrl } from '../../lib/site.ts'
|
||||
import { useDirectory, type Directory } from '../../lib/useContent.ts'
|
||||
import { FILTER_FROM, OptionFilter, narrow } from '../../components/OptionFilter.tsx'
|
||||
import { accentText, BRAND } from '../../lib/color.ts'
|
||||
|
||||
const MUTED = 'var(--color-muted)'
|
||||
|
|
@ -269,6 +270,16 @@ export default function QrCodeMaker() {
|
|||
|
||||
const groups = useMemo(() => groupsFor(kind, directory), [kind, directory])
|
||||
const choices = useMemo(() => groups.flatMap((group) => group.choices), [groups])
|
||||
// Past FILTER_FROM records, a box above the select narrows them;
|
||||
// the one chosen always stays.
|
||||
const [needle, setNeedle] = useState('')
|
||||
const shownGroups = useMemo(
|
||||
() =>
|
||||
groups
|
||||
.map((group) => ({ ...group, choices: narrow(group.choices, needle, (c) => c.label, (c) => c.path === path) }))
|
||||
.filter((group) => group.choices.length > 0),
|
||||
[groups, needle, path],
|
||||
)
|
||||
|
||||
// A new kind, or the directory arriving, can leave the current
|
||||
// path outside the list; fall back to its first entry.
|
||||
|
|
@ -308,7 +319,10 @@ export default function QrCodeMaker() {
|
|||
return (
|
||||
<div className="grid gap-10 lg:grid-cols-2 lg:items-start">
|
||||
<div className="space-y-5">
|
||||
<Select id="qr-kind" label="What to link to" value={kind} onChange={(v) => setKind(v as Kind)}>
|
||||
<Select id="qr-kind" label="What to link to" value={kind} onChange={(v) => {
|
||||
setKind(v as Kind)
|
||||
setNeedle('')
|
||||
}}>
|
||||
{KINDS.map(([value, label]) => (
|
||||
<option key={value} value={value}>
|
||||
{label}
|
||||
|
|
@ -343,33 +357,38 @@ export default function QrCodeMaker() {
|
|||
) : choices.length === 0 ? (
|
||||
<p style={{ color: MUTED }}>Nothing published here yet.</p>
|
||||
) : (
|
||||
<Select
|
||||
id="qr-target"
|
||||
label={kind === 'pages' ? 'Page' : 'Which one'}
|
||||
value={path}
|
||||
onChange={(v) => {
|
||||
setPath(v)
|
||||
setSection('')
|
||||
}}
|
||||
>
|
||||
{groups.map((group, i) =>
|
||||
group.label ? (
|
||||
<optgroup key={group.label} label={group.label}>
|
||||
{group.choices.map((c) => (
|
||||
<option key={c.path} value={c.path}>
|
||||
<div>
|
||||
<Select
|
||||
id="qr-target"
|
||||
label={kind === 'pages' ? 'Page' : 'Which one'}
|
||||
value={path}
|
||||
onChange={(v) => {
|
||||
setPath(v)
|
||||
setSection('')
|
||||
}}
|
||||
>
|
||||
{shownGroups.map((group, i) =>
|
||||
group.label ? (
|
||||
<optgroup key={group.label} label={group.label}>
|
||||
{group.choices.map((c) => (
|
||||
<option key={c.path} value={c.path}>
|
||||
{c.label}
|
||||
</option>
|
||||
))}
|
||||
</optgroup>
|
||||
) : (
|
||||
group.choices.map((c) => (
|
||||
<option key={`${i}-${c.path}`} value={c.path}>
|
||||
{c.label}
|
||||
</option>
|
||||
))}
|
||||
</optgroup>
|
||||
) : (
|
||||
group.choices.map((c) => (
|
||||
<option key={`${i}-${c.path}`} value={c.path}>
|
||||
{c.label}
|
||||
</option>
|
||||
))
|
||||
),
|
||||
))
|
||||
),
|
||||
)}
|
||||
</Select>
|
||||
{choices.length > FILTER_FROM && (
|
||||
<OptionFilter value={needle} onChange={setNeedle} label="Narrow the list" className="mt-2" />
|
||||
)}
|
||||
</Select>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{sections.length > 0 && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue