Repository navigation
Conversation
- add a toggle to indicate if a speaker is also a moderator
- fix prelint errors - panelist avatars on first row - moderator on second
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds first-class “moderator” support for panel sessions by propagating an isModerator flag from Sanity through the data pipeline and updating the UI to visually separate moderators from panelists on session cards and speaker details.
Changes:
- Adds
isModeratorto Sanity session participants (schema + import script) and includes it in the Sanity fetch query. - Updates session aggregation +
SessionCardto render a moderator split (moderators on a separate line with distinct avatar styling / credits). - Extends generated speaker/session JSON to include participant metadata (
isModerator,sortOrder, and derived participant lists).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| studio/schemaTypes/session.ts | Adds isModerator boolean to session participants and updates participant preview to label moderators. |
| src/layouts/SessionsSection.jsx | Switches combined session aggregation to build/sort participants instead of separate speaker name/avatar arrays. |
| src/data/2026/speakers.generated.json | Regenerates data to include isModerator, sortOrder, and session.participants (+ derived speaker/moderator/panelist lists). |
| src/components/speakers/SpeakersContent.jsx | Passes sessionParticipants through to speaker card/details. |
| src/components/speakers/SpeakerDetails.jsx | Displays participants with moderator labeling (fallbacks to sessionSpeakers when needed). |
| src/components/speakers/SpeakerCard.jsx | Wires sessionParticipants prop through to SpeakerDetails. |
| src/components/sessions/SessionCard.jsx | Replaces speakers/speakerAvatars with participants, adds moderator split layout + credits. |
| scripts/sanity-import/import-speakers.mjs | Imports is_moderator from the sheet into session participant objects. |
| scripts/fetch-event-data.mjs | Fetches isModerator from Sanity participants and enriches rows with derived participant lists. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+133
to
+143
| function enrichSessionParticipants(rows) { | ||
| const bySessionTitle = new Map() | ||
|
|
||
| for (const row of rows) { | ||
| const title = row.session.title | ||
| if (!bySessionTitle.has(title)) bySessionTitle.set(title, []) | ||
| bySessionTitle.get(title).push(row) | ||
| } | ||
|
|
||
| for (const row of rows) { | ||
| const group = bySessionTitle.get(row.session.title) ?? [row] |
- prevents participants from two distinct sessions - where sessions share a title from being incorrectly merged - then sessionId is set on every row
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Fixes #25