Skip to content

Survey review: add "All answers" per-question page - #241

Open
theschweitz wants to merge 3 commits into
efdevcon:mainfrom
theschweitz:survey-review-all-answers
Open

theschweitz wants to merge 3 commits into
efdevcon:mainfrom
theschweitz:survey-review-all-answers

Conversation

@theschweitz

@theschweitz theschweitz commented Nov 19, 2026 •

Copy link
Copy Markdown

Survey review: "All answers", side panel with search, dark mode

Follow-up to 76b3696 (survey review page for the Devcon 8 Feedback Survey).

What it adds

Side panel on the response page (/survey-review/<viewId>/<id>)

  • Lists every response with role, average rating, a snippet of their first written answer, and a dot for responses with an admin note.
  • Role filter chips, a word search across all answers, and an "only with written comments" toggle.
  • A Sort menu: Response # (default), lowest rating first, or highest rating first. Responses without a rating go last.
  • Prev/Next and the ← → keys follow the filtered, sorted list. Filters are kept for the browser tab, so they survive opening a question and coming back.

"All answers" per question

  • Each question gets an All answers link to /survey-review/<viewId>/question?column=…, showing everyone's answer to that question.
  • Ratings and choices get a breakdown (count, %, average for ratings); clicking a bar filters to those answers.
  • Role chips, search for written answers, a picker for any other question, and links back to each response.

Dark mode

  • The survey pages follow the viewer's light/dark device setting. Colors are --sr-* CSS variables scoped to the survey pages (.sr-theme), so the rest of devcon.org is unaffected.

Changes

  • New: GET /api/survey/review/[viewId]: the response list for the side panel (summary per response, plus the text of answers that respondent was shown, for the search).
  • New: GET /api/survey/review/[viewId]/question?column=…: everyone's answer to one question. Only respondents who were shown it (role rules apply) and only form columns.
  • Both are gated by BUILDER_REVIEW_PASSWORD like the existing endpoint.
  • Moved: the survey config (view allowlist + role → question groups) to services/survey-review.ts, shared by all three endpoints. The view id vwok5lvkv9uhyr6s and the MC / CLS Organizer roles from main are kept as-is.
  • Moved: shared UI (answer rendering, card styles, password gate, theme) to components/domain/survey-review; the side panel is components/domain/survey-review/ResponseList.tsx.
  • No new env vars, no changes outside the survey review files.

How to test

  1. pnpm dev, open /en/survey-review/vwok5lvkv9uhyr6s/<any id> and unlock with the builder review password.
  2. Side panel: pick a role, search a word (e.g. "lunch"), tick "only with written comments". Check Prev/Next and ← → stay within the filter.
  3. Click All answers on a star question (e.g. Wi-Fi): check the bars, click one to filter, try the role chips. Use Back to response and confirm the side panel filters are still set.
  4. Save an admin note and check the dot appears in the list.
  5. Switch your OS to dark mode and reload: both pages should switch; other pages should not.
  6. tsc --noEmit and npx eslint on the changed files in devcon/ (not run in the authoring environment, as dependencies weren't installed there; the pages were exercised in a browser harness with stubbed NocoDB data).

🤖 Generated with Claude Code

https://claude.ai/code/session_01HWm3DuqAd8a89WzuKgsMBk

Adds a page that shows everyone's answer to one survey question, opened
from a new "All answers" link beside each question on the response page.

- New page /survey-review/[viewId]/question?column=… with a breakdown for
  ratings and choices (click a bar to filter), role filter, search for
  written answers, a question picker, and links back to each response.
- New GET /api/survey/review/[viewId]/question endpoint (same
  BUILDER_REVIEW_PASSWORD gate). It only returns respondents who were
  shown the question, and only form questions.
- Moves the survey config (view allowlist, role -> question groups) to
  services/survey-review.ts so both endpoints share it. Keeps the view id
  and the MC / CLS Organizer roles from main.
- Moves the shared UI (answer rendering, cards, password gate) to
  components/domain/survey-review so both pages share it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HWm3DuqAd8a89WzuKgsMBk
@netlify

netlify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

👷 Deploy request for devcon-app pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 65eb116

@netlify

netlify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

👷 Deploy request for devcon-social pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 65eb116

@netlify

netlify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

👷 Deploy request for devconnect-pwa pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 65eb116

@netlify

netlify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

👷 Deploy request for devconnect-monorepo pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 65eb116

@netlify

netlify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

👷 Deploy request for devcon-monorepo pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 65eb116

@netlify

netlify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

👷 Deploy request for devcon-archive pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 65eb116

@netlify

netlify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

👷 Deploy request for devcon8-app pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 65eb116

- Response page gets a side panel listing every response: role filter
  chips, a word search across all answers, and an "only with written
  comments" toggle. Prev/Next and the arrow keys follow the filtered list.
  Filters are kept for the browser tab, so they survive a trip to a
  question page.
- New GET /api/survey/review/[viewId] endpoint for that list (same
  BUILDER_REVIEW_PASSWORD gate). It returns a summary per response: role,
  average rating, a snippet, note flag, and the text of the answers that
  respondent was shown, for the search.
- Survey pages follow the viewer's light/dark device setting. Colors are
  --sr-* CSS variables scoped to the survey pages (.sr-theme), so the rest
  of the site is unaffected.
- NOTES_COLUMN and roleLabel are shared instead of duplicated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HWm3DuqAd8a89WzuKgsMBk
Adds a Sort menu to the response list: Response # (default), lowest
rating first, or highest rating first. Responses without any rating go
last. Prev/Next and the arrow keys follow the sorted order, and the choice
is kept for the browser tab with the other filters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HWm3DuqAd8a89WzuKgsMBk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants