Questionnaire Page

v0.1.4

Questionnaire page: pipeline questions with single-choice answers, free-text custom answers, an additional-context field, and answered-count progress, with empty, confirmed and submitting states.

View as Markdown

Preview

Open full page ↗

Install & usage

npx shadcn@latest add @signalos/questionnaire-01

Pulls the page source plus its widget dependencies (@signalos/tokens, @signalos/utils, @signalos/button, @signalos/page-header, @signalos/textarea, @signalos/badge, @signalos/checkbox, @signalos/command, @signalos/dialog, @signalos/input, @signalos/label, @signalos/popover, @signalos/progress, @signalos/select, @signalos/skeleton, @signalos/tooltip) into your app - you own the copy. Requires access.

usage
// after: npx shadcn@latest add @signalos/questionnaire-01
// mount the pulled page in a route, e.g. src/app/semantics-details/page.tsx
import { Questionnaire } from "@/components/blocks/questionnaire-01/Questionnaire"

export default function Page() {
  return <Questionnaire />
}

Props

QuestionnaireOption

PropTypeDefaultDescription
id*string-
value*string-
label*string-

QuestionnaireQuestion

PropTypeDefaultDescription
id*string-
question*string-
contextstring | null | undefined-
categorystring | null | undefined-
options*QuestionnaireOption[]-
selected_answerstring | null | undefined-
custom_answerstring | null | undefined-

QuestionnaireData

PropTypeDefaultDescription
questions*QuestionnaireQuestion[]-

QuestionnaireAnswer

PropTypeDefaultDescription
id*string-
categorystring | undefined-
questionstring | undefined-
selected_optionstring | undefined-
selected_option_labelstring | undefined-
custom_answerstring | undefined-

QuestionnaireFdeInput

PropTypeDefaultDescription
answers*QuestionnaireAnswer[]-
additional_contextstring | undefined-

SubmitQuestionnairePayload

PropTypeDefaultDescription
action*"retry" | "submit"-
answersQuestionnaireAnswer[] | undefined-
additional_contextstring | undefined-

QuestionnaireViewProps

PropTypeDefaultDescription
questions*QuestionnaireQuestion[]-
selectedAnswers*Record<string, string>-
customAnswers*Record<string, string>-
additionalContext*string-
answeredCount*number-
isConfirmedboolean | undefined-
isSubmittingboolean | undefined-
isNavigatingboolean | undefined-
onSelectOption*(qid: string, value: string) => void-
onSelectCustom*(qid: string) => void-
onCustomTextChange*(qid: string, text: string) => void-
onAdditionalContextChange*(context: string) => void-
onSubmit*(action: "retry" | "submit") => void-
headerActionsReactNode-
confirmedBannerReactNode-
classNamestring | undefined-
data-testidstring | undefined-

More Semantics Stages variants

Changelog

0.1.4

  • Replace the copied placeholder description with one that actually describes this block; the registry description is what the agent skill shows as "pick it when".

0.1.3

  • Questionnaire: replace PageHeaderLeft used as a title with PageHeaderTitle for correct semantic markup.
  • Questionnaire: add data-testid="questionnaire-question" to each question container div.
  • Questionnaire: add hidden questionnaire-retry-button alongside the submit button for consistency with other stage blocks.
  • Questionnaire: wrap submit and retry buttons in a gap-2 flex row.
  • Questionnaire.types.ts: allow null for context, category, selected_answer, and custom_answer fields on QuestionnaireQuestion.

0.1.2

  • Content updates.

semantics-details-01

0.1.1

0.4.0

  • Register all 54 component files in registry-item.json so consumers receive the full component tree on install.

0.3.0

  • Remove legacy components/semantics/ folder; all components now live in per-stage directories (glossary/, relationships/, cross-source/, metrics/, signal-rules/, equilibrium/, content-profile/).
  • Register all migrated component files in registry-item.json so consumers receive the full component tree.

0.2.0

  • Lift navigation out of card sub-components: ReviewQueueCard, SharedStageCard, and CompletedStageCard no longer call useRouter — they now accept an onNavigate: (path: string) => void prop and call it instead.
  • Add onNavigate to ReviewQueueViewProps; ReviewQueueView threads it through QueueSection to each card.
  • Replace @/types imports in card components and StepProgress with relative imports from ../../pipeline.types (removes the forbidden app-level alias from shipped files).
  • Remove StageActionDialog import from SharedStageCard (pointed to @/components/features/…, a forbidden app-side path).

0.1.0

  • Initial block: review queue view with per-source and shared stage sections, tab navigation, and questionnaire view.