Skip to content

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 ​

Anatomy ​

  1. 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.
  2. Step strip: one chip per step, 1. Person, 2. Role, with --chip-padding. The current step is filled --color-accent-dark with --color-text-on-accent; a done step is white with a check; steps to come are faded.
  3. 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.
  4. Added this session: on wide screens a rail beside the card, --guided-flow-rail-width wide; 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.
  5. Footer: Previous step (ghost) on the left, Save and close (commit) on the right.

Variants ​

VariantWhereWhat changes
Repeatingadding several chains, such as authorsafter the last step it starts again at step 1; the rail collects every chain
Single chainone chain onlyafter the last step the card says This item is complete. Save and close to finish.
With finalizea container record linked to every chainSave and close opens one more form that creates it
Straight throughone pass, such as work → expression → manifestationno 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 ​

StateWhat you seeTrigger
First stepstep 1 filled, no Previous stepthe flow opens
Later stepdone steps checked, Previous step showna step is finished
Chain in progressSave and close disabled, with a help icon: Finish or go back from the current item firsta chain has started but is not finished
Chain saveda new row on top of the rail, with Undothe last step is finished
Rail emptyNothing created yet.nothing finished yet
Undonethe row disappears; the records that chain created are deletedUndo
Workinga blocking overlay over the dialog; Save and close shows a spinnerlinking 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" with aria-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 example repetitiveForm.save-and-close and repetitiveForm.created-this-session.

Dynamic form · Entity picker · Modal · Button

Powered by Elody - Open Source Semantic Data Platform