Skip to content

wizard: replace the reasoning list with a real survey preview (#38) - #42

Merged
jstet merged 1 commit into
mainfrom
issue-38-survey-view
Sep 25, 2026
Merged

jstet merged 1 commit into
mainfrom
issue-38-survey-view

Conversation

@jstet

@jstet jstet commented Sep 25, 2026

Copy link
Copy Markdown
Member

The on-page result used to be a flat list of label + rationale + source per question — no type, no choices, no hint, no relevance. After a run the user had to download the .xlsx to actually see the questionnaire.

New SurveyView.svelte renders one card per question with:

  • a colour-coded type badge (text / select / multiple / number / date / note / other)
  • the label as the heading, hint in muted text below
  • a choices table with code + label columns (exclusive answers tagged)
  • a relevance pill when a skip condition is present
  • a collapsed "Details" block for variable name, rationale, source and which RQs the question serves

The audit-trail reasoning and the (multi) research-question list sit at the top of the same section. Welcome and end notes become callouts around the question list. Demographics get their own divider if the wizard appended any, so the AI-written questions don't get mixed in.

+page.svelte shrinks by ~85 lines (the inline reasoning markup and its CSS move into the component); the result is reusable for any future "preview this survey" surface. New i18n keys in EN/DE.

Verified: npm run test:unit (82 pass), npm run test:e2e (45 pass), npm run check, npm run lint.

Closes #38.

The on-page result used to be a flat list of label + rationale + source
per question — no type, no choices, no hint, no relevance. After a run
the user had to download the .xlsx to actually see the questionnaire.

New SurveyView.svelte renders one card per question with:
  * a colour-coded type badge (text/select/number/date/note)
  * the label as the heading, hint in muted text below
  * a choices table with code + label columns (exclusive answers tagged)
  * a relevance pill when a skip condition is present
  * a collapsed 'Details' block for name, rationale, source and which RQs
    the question serves

The audit-trail reasoning and the (multi) research-question list sit at
the top of the same section. Welcome and end notes become callouts
around the question list. Demographics get their own divider if the
wizard appended any, so the AI-written questions don't get mixed in.

+page.svelte shrinks by ~85 lines (the inline reasoning markup and its
CSS move into the component); the result is reusable for any future
'preview this survey' surface. New i18n keys in EN/DE.
@jstet
jstet merged commit 50f1f76 into main Sep 25, 2026
1 check passed
@jstet
jstet deleted the issue-38-survey-view branch September 25, 2026 12:01
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.

Improve survey view

1 participant