Expand description
The wizard kit’s surface (docs/design/admin-forms.md, section 5.3):
a wizard declared in a manifest (egui_pop_model::admin::wizard)
fills the Settings app’s page while it runs: the stepper on the left,
the step’s form, and a footer with Cancel, Back, Skip and Next (Finish
on the summary).
- Next is greyed while the step has a blocking problem, its reason in the tooltip and beside it; each problem shows under its field.
- The stepper goes back to any step, and ahead to a step whose steps before it are valid; it says “Step 2 of 4, Destination” to assistive technology.
- Cancel (and Escape) asks first when anything was entered.
- Keys: Enter (when no widget takes it first: a text field, an open
list, a focused control) and
Alt+Ngo next or finish,Alt+Bback, Escape cancels. - Every gesture is a command an agent runs too:
admin.wizard.open({"id", "step", "values", "focus"}),admin.wizard.set({"key", "value"}or{"values"}),admin.wizard.next,admin.wizard.back,admin.wizard.skip,admin.wizard.go({"step"}),admin.wizard.finishandadmin.wizard.cancel({"force"}); each answers the flow’s state, which theadmincollector shows too.
Draft fields: a toggle, a number, a choice, a text, a path (with
Browse when its input names a file to open or save: the files
plugin’s chooser, its choice written into the draft), and a multi (a
tick box per choice; its value the choices ticked, null for every
choice).
A wizard opened as a focus screen (Admin::open_focus_wizard,
"focus": true) is drawn over the main window’s whole page whatever
the app’s window setting, the shell’s menus, status bar and centre
hidden while it runs: a first-run setup, where nothing else is to be
seen yet.
Finishing runs the wizard’s command with the draft as its arguments, then closes the wizard (and the Settings app, when the wizard opened it).
Constants§
- CMD_
WIZARD_ BACK - Goes back a step.
- CMD_
WIZARD_ CANCEL - Closes the wizard; asks first when anything was entered, unless
{"force": true}. - CMD_
WIZARD_ FINISH - Runs the wizard’s command with the draft, and closes it.
- CMD_
WIZARD_ GO - Goes to a step (
{"step"},summaryfor the summary). - CMD_
WIZARD_ NEXT - Goes to the next step, if the step shown is valid.
- CMD_
WIZARD_ OPEN - Opens a wizard (
{"id", "step", "values"}). - CMD_
WIZARD_ SET - Sets draft values (
{"key", "value"}or{"values": {...}}). - CMD_
WIZARD_ SKIP - Skips an optional step.