Skip to main content

Module questionnaire

Module questionnaire 

Source
Expand description

Questionnaire behavior: answers, validation, navigation, focus and shortcuts.

The state machine lives here so an application can replace the visual language without reimplementing it. gpui-component owns the skin.

Structs§

QuestionnaireAnswer
A serializable-in-spirit answer snapshot. Input drafts are deliberately excluded.
QuestionnaireAnswerChange
QuestionnaireAnswers
QuestionnaireChoiceDefinition
Describes one selectable answer.
QuestionnaireChoiceState
QuestionnaireInputDefinition
Describes the optional freeform answer owned by an item.
QuestionnaireItemDefinition
Describes one ordered questionnaire item.
QuestionnaireItemState
QuestionnaireNavigationState
QuestionnaireProgressState
QuestionnaireState
Owns questionnaire answers, validation, navigation and focus state.
QuestionnaireSubmission
QuestionnaireSubmissionItem
QuestionnaireValidationContext
Immutable validation input. Validators cannot mutate the questionnaire.

Enums§

QuestionnaireChoiceControl
The answer control for one choice, wired to the questionnaire’s behavior.
QuestionnaireEvent
QuestionnaireItemStatus
QuestionnaireSchemaError
QuestionnaireShortcutMode
QuestionnaireValidationError
Why an item currently fails validation.

Functions§

handle_key_down
Routes a key press to the questionnaire’s behavior and reports whether it was consumed. The skin installs it on the root; the contract — arrows move between answers and items, Enter confirms a filled answer, a bare letter or digit activates a shortcut — lives here so a different skin keeps it.

Type Aliases§

QuestionnaireValidator
Validates one questionnaire item against the current questionnaire answers.