From ee9d76ada77e040e7c8daa606fd0d2c25417e3a2 Mon Sep 17 00:00:00 2001 From: nmemmert Date: Tue, 9 Jun 2026 10:23:54 -0400 Subject: [PATCH] Wire lesson discussion to community, fix search links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace standalone StudySectionComments with CommunityBoard locked to section tag on lesson page — lesson discussion now feeds directly into the community system - Quiz "share to discussion" posts to community API (not separate comments) - "Go to Community" button no longer pre-filters by section (lesson discussion is now on-page) - Add "See all community posts" link from lesson discussion block - Fix search: download results now use correct custom-- ID format - Fix search: episodes with a highlight page route to /episodes/:id internally instead of opening the external link Co-Authored-By: Claude Sonnet 4.6 --- src/colossiansStudy.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/colossiansStudy.tsx b/src/colossiansStudy.tsx index b859485..32e29f6 100644 --- a/src/colossiansStudy.tsx +++ b/src/colossiansStudy.tsx @@ -4,7 +4,6 @@ import type { SiteContent, StudyProgram, StudySection } from './content' import { DEFAULT_COLOSSIANS_STUDY_SECTIONS } from './colossiansStudyData' import { usePageMeta } from './hooks/usePageMeta' import { Breadcrumbs } from './components/Breadcrumbs' -import { StudySectionComments } from './components/StudySectionComments' import { StudyCertificate } from './components/StudyCertificate' type Props = { content: SiteContent } @@ -1729,7 +1728,7 @@ export function ColossiansStudySectionPage({ content }: Props) {
Write My Answers - Go to Community + Go to Community Ask Nate
@@ -1810,11 +1809,12 @@ export function ColossiansStudySectionPage({ content }: Props) { })()}
- +

Lesson Discussion

+

+ Share a thought or reaction with other students in this lesson.{' '} + See all community posts → +

+
@@ -3079,10 +3079,10 @@ export function StudyQuizPage({ content }: Props) { const questionText = section.studyQuestions?.[idx] ? `**${section.studyQuestions[idx]}**\n\n` : '' const text = `${questionText}${answers[idx].trim()}` try { - const res = await fetch(`/api/study-comments/${encodeURIComponent(studySlug)}/${encodeURIComponent(sectionId)}`, { + const res = await fetch('/api/study-community/posts', { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ text: text.slice(0, 2000) }), + body: JSON.stringify({ studySlug, sectionId, message: text.slice(0, 2000) }), }) if (res.ok) newlyShared.push(idx) } catch { /* ignore individual share failures */ }