Add structured show notes form to Episode Highlights; v1.2.3
Replace single showNotes textarea with five guided fields: Episode Summary, Key Themes, Scripture References, Key Quotes, and Resources & Links. Legacy showNotes content is preserved as a backward-compatible fallback — it auto-populates the Summary field in the admin editor and renders on the public episode detail page until overwritten with structured data. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
525ae85f6a
commit
5bc8245ed2
4 files changed
+113
-6
No files matched your search
+63
-3
@@ -1642,7 +1642,11 @@ const [dashboardNow, setDashboardNow] = useState(() => new Date())
|
||||
summary: '',
|
||||
url: '',
|
||||
embedUrl: '',
|
||||
showNotes: '',
|
||||
showNotesSummary: '',
|
||||
showNotesThemes: [],
|
||||
showNotesScripture: [],
|
||||
showNotesQuotes: [],
|
||||
showNotesResources: [],
|
||||
discussionQuestions: [],
|
||||
},
|
||||
],
|
||||
@@ -1656,6 +1660,16 @@ const [dashboardNow, setDashboardNow] = useState(() => new Date())
|
||||
}))
|
||||
}
|
||||
|
||||
function updatePodcastLinkStringArray(id: string, field: keyof PodcastFeaturedLink, raw: string) {
|
||||
const items = raw.split('\n').map(s => s.trim()).filter(Boolean)
|
||||
setForm(f => ({
|
||||
...f,
|
||||
podcastFeaturedLinks: (f.podcastFeaturedLinks ?? []).map(link =>
|
||||
link.id === id ? { ...link, [field]: items } : link
|
||||
),
|
||||
}))
|
||||
}
|
||||
|
||||
function updatePodcastLinkQuestions(id: string, raw: string) {
|
||||
const questions = raw.split('\n').map(q => q.trim()).filter(Boolean)
|
||||
setForm(f => ({
|
||||
@@ -3440,8 +3454,54 @@ async function handleAssetUpload(event: ChangeEvent<HTMLInputElement>) {
|
||||
</select>
|
||||
</div>
|
||||
<div className="admin-field">
|
||||
<label htmlFor={`podcast-notes-${activeHighlight.id}`}>Show Notes</label>
|
||||
<textarea id={`podcast-notes-${activeHighlight.id}`} rows={4} placeholder="Key points, scripture references, timestamps..." value={activeHighlight.showNotes ?? ''} onChange={e => updatePodcastLink(activeHighlight.id, 'showNotes', e.target.value)} />
|
||||
<label htmlFor={`podcast-notes-summary-${activeHighlight.id}`}>Episode Summary</label>
|
||||
<textarea
|
||||
id={`podcast-notes-summary-${activeHighlight.id}`}
|
||||
rows={3}
|
||||
placeholder="2–3 sentences summarizing the episode..."
|
||||
value={activeHighlight.showNotesSummary ?? (activeHighlight.showNotes && !(activeHighlight.showNotesThemes?.length) ? activeHighlight.showNotes : '')}
|
||||
onChange={e => updatePodcastLink(activeHighlight.id, 'showNotesSummary', e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="admin-field">
|
||||
<label htmlFor={`podcast-notes-themes-${activeHighlight.id}`}>Key Themes (one per line)</label>
|
||||
<textarea
|
||||
id={`podcast-notes-themes-${activeHighlight.id}`}
|
||||
rows={3}
|
||||
placeholder="Faith and doubt Prayer in suffering Community"
|
||||
value={(activeHighlight.showNotesThemes ?? []).join('\n')}
|
||||
onChange={e => updatePodcastLinkStringArray(activeHighlight.id, 'showNotesThemes', e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="admin-field">
|
||||
<label htmlFor={`podcast-notes-scripture-${activeHighlight.id}`}>Scripture References (one per line)</label>
|
||||
<textarea
|
||||
id={`podcast-notes-scripture-${activeHighlight.id}`}
|
||||
rows={3}
|
||||
placeholder="Romans 8:28 Psalm 23:4"
|
||||
value={(activeHighlight.showNotesScripture ?? []).join('\n')}
|
||||
onChange={e => updatePodcastLinkStringArray(activeHighlight.id, 'showNotesScripture', e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="admin-field">
|
||||
<label htmlFor={`podcast-notes-quotes-${activeHighlight.id}`}>Key Quotes (one per line)</label>
|
||||
<textarea
|
||||
id={`podcast-notes-quotes-${activeHighlight.id}`}
|
||||
rows={3}
|
||||
placeholder="God meets us in the middle of our mess."
|
||||
value={(activeHighlight.showNotesQuotes ?? []).join('\n')}
|
||||
onChange={e => updatePodcastLinkStringArray(activeHighlight.id, 'showNotesQuotes', e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="admin-field">
|
||||
<label htmlFor={`podcast-notes-resources-${activeHighlight.id}`}>Resources & Links (one per line)</label>
|
||||
<textarea
|
||||
id={`podcast-notes-resources-${activeHighlight.id}`}
|
||||
rows={3}
|
||||
placeholder="Book: The Ruthless Elimination of Hurry by John Mark Comer https://example.com"
|
||||
value={(activeHighlight.showNotesResources ?? []).join('\n')}
|
||||
onChange={e => updatePodcastLinkStringArray(activeHighlight.id, 'showNotesResources', e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="admin-field">
|
||||
<label htmlFor={`podcast-dq-${activeHighlight.id}`}>Discussion Questions (one per line)</label>
|
||||
|
||||
Reference in new issue
Block a user