Appearance
Guided flow
A dialog that creates linked records step by step, and lists what it added.
repetitiveform-guidedflow--defaultOpen in Storybook ↗When to use
- Records that belong together and are created in one go: a person and their role, a work and its expression.
- Adding several of the same chain in a row, such as a list of authors.
- Picking existing records and linking them to the page you are on.
When not to use
- One record on its own: use a dynamic form.
- Changing existing records: edit them in place in their field rows.
Anatomy
- Dialog: a modal on
--radius-overlay, with the same header band as every modal (--color-surface-panel-header, padding--panel-header-pad): the flow's name, then the step strip, then a close button. - Step strip: one chip per step, 1. Person, 2. Role, with
--chip-padding. The current step is filled--color-accent-darkwith--color-text-on-accent; a done step is white with a check; steps to come are faded. - Step card: the current step on
--color-surface-group-form,--radius-card. It holds a dynamic form to create the record, or an entity picker to choose existing ones, with Create new above it. A picker step has no card around it. - Added this session: on wide screens a rail beside the card,
--guided-flow-rail-widthwide; on narrow screens it moves under the card. Newest first, one row per finished chain: a success check, each step's label and record, and a remove button. The newest row also has Undo. - Footer: Previous step (ghost) on the left, Save and close (commit) on the right.
Variants
| Variant | Where | What changes |
|---|---|---|
| Repeating | adding several chains, such as authors | after the last step it starts again at step 1; the rail collects every chain |
| Single chain | one chain only | after the last step the card says This item is complete. Save and close to finish. |
| With finalize | a container record linked to every chain | Save and close opens one more form that creates it |
| Straight through | one pass, such as work → expression → manifestation | no rail and no Save and close; the last step ends the flow and opens the record |
repetitiveform-guidedflow--later-stepOpen in Storybook ↗A step is either a create step or a picker step. A create step shows only the form. A picker step lists the existing records: pick one or more and Confirm selection links them. Create new above the list switches to the step's form, with Back to search to return to the list.
repetitiveform-guidedflow--picker-stepOpen in Storybook ↗Each step saves as you go: Create in a step creates the record at once, and picking records links them straight away. Moving on to the next step needs no extra button.
States
| State | What you see | Trigger |
|---|---|---|
| First step | step 1 filled, no Previous step | the flow opens |
| Later step | done steps checked, Previous step shown | a step is finished |
| Chain in progress | Save and close disabled, with a help icon: Finish or go back from the current item first | a chain has started but is not finished |
| Chain saved | a new row on top of the rail, with Undo | the last step is finished |
| Rail empty | Nothing created yet. | nothing finished yet |
| Undone | the row disappears; the records that chain created are deleted | Undo |
| Working | a blocking overlay over the dialog; Save and close shows a spinner | linking or saving |
repetitiveform-guidedflow--rail-statesOpen in Storybook ↗Undo is offered only on the newest row, and only while no other chain is in progress. It deletes only records the chain created; picked records stay. A row without created records has a remove button only, which takes it off the list.
Keyboard & accessibility
- The dialog is a native
<dialog>, named by its title. Focus stays inside it. - Escape and the close button close it. When something was added, it asks first: Leave guided flow, with Leave and Cancel. Records already created stay.
- The current step chip has
aria-current="step"; a done step adds (completed) for screen readers. - The rail is a
role="log"witharia-live="polite", so a new row is announced. - Undo is named Undo {record}, the remove button Remove {record}.
Content
- The title names the task: Add authors.
- Step labels are short nouns: Person, Role.
- Translation keys live under
repetitiveForm.*, for examplerepetitiveForm.save-and-closeandrepetitiveForm.created-this-session.
Related
Dynamic form · Entity picker · Modal · Button