Expand description
The wizard kit (docs/design/admin-forms.md, section 5.3): a
multi-step flow declared as data, each step a form built with the same
groups and items as a section’s page, its values a draft handed to
a command on finish.
- Steps: declared in order; a step whose
whendoes not hold (read against the draft asform.<key>) does not exist for now, and its values are not handed on. - Validation per step: each field’s own checks (
Field::check: required, range, choices), itsvalidatehook, then the step’s; a problem of the danger tone blocks Next with its message, a warning is shown and lets through. - Navigation: Next, Back, Skip (an optional step: its values go back to their defaults), and going to any step whose steps before it are valid; one that is not lands on the first invalid one, with its reason.
- Summary: after the last step (unless declared without), every step’s fields with their values as shown.
- Finish: the command, with the template filled from the draft (or the draft itself when the wizard declares no arguments).
Flow is the state of a wizard being filled: pure, no egui, so an
agent and a test drive it as the shell does.
Structs§
- Finish
- What finishing runs: a command, its arguments’ template (
${key};null: the draft itself, as an object), and the button’s verb. - Flow
- A wizard being filled: the step shown, the draft, the steps passed.
- Judge
- What a flow needs to judge its steps: the application’s context keys, the hooks, and the words of a field’s own checks.
- Step
- A step: a form (groups of fields, statuses, callouts, records), its
validatehook, whether it may be skipped. - Wizard
- A wizard: its steps, its summary, what finishing runs, and what cancelling asks when something was entered.
Enums§
- Check
- What a field’s own checks found (
Field::check); the shell words it in the interface’s language.
Constants§
- SUMMARY
- Where a flow stands after its last step: the summary.