enhancement
major
minor
defect
critical
major
minor
major
#30077
TL Views: Wizard—re-entering an "Auto-Next" step without a separate navigation path leaves the user with no way to return to the workflow
Follow-up to #29599 (the <wizard> element).
Problem
A step with auto-advance only advances automatically when the user enters it in the forward direction; a step to which the user returns waits for the user (ReactWizardControl.displayCurrentStep: AUTO_ADVANCE only for forward). Such an intermediate screen typically has no buttons of its own. When the user re-enters it, they are stuck on a step that neither advances nor offers any navigation options.
This can be achieved via
- the “Back” button of the following step (<wizard-back/> leads to the intermediate step),
- the step list (step-list): a completed step is clickable and takes the user back—even an auto-advance step—and
- the browser’s back button: the intermediate step appears in the browser history with its own URL.
Reenact this in tl-demo-react, “Wizard” navigation: Start, enter name, Next; after the automatic switch to “Role,” click “Being set up” in the step list. The step displays only its text, does not proceed to the next step, and the footer has no buttons; you can only exit via the step list. (For “Back,” the demo now works around this by having the Back button on the first question jump directly to the profile; see #30045.)
Solution
A step with auto-advance is a pass-through step (WizardStep.passThrough()): the flow proceeds through it, and the user never returns to it.
- "Back" skips pass-through steps. <wizard-back/> (WizardScope.back()) goes to the next preceding step without auto-advance, even across multiple pass-through steps; <wizard-has-back/> is only true if such a step exists.
- The step list does not offer a pass-through step as a jump target: a completed pass-through step is displayed as text rather than a button ( transit entry in the step state); the gotoStep command also rejects it.
- The timer for a loop step runs every time it is entered, not just when moving forward (e.g., after an explicit <wizard-goto>). A step that only changes its position during a recalculation of the step sequence continues counting instead of restarting.
- A transition step is not an address. It typically indicates ongoing processing that cannot be forced by loading a URL. As long as it is displayed, ReactWizardControl keeps a RouteManager navigation open (beginNavigation()), so that the address bar remains on the previous step; only the step that follows is reported as an entry in the browser history. The browser’s Back button thus leads directly from the step after the intermediate step to the one before it; reloading during the intermediate step displays the step before it. To prevent the step channel’s binding to the URL (<param-bindings>) from reporting the intermediate step prematurely, every movement of the WizardScope is a navigation (RouteManager.navigate(...)), including the retry after a veto due to unsaved changes (new: ChannelVetoException.withContinuation(Runnable)). If the wizard leaves the view during a flow step or is disposed of, the navigation also ends. Writing directly to the step channel bypassing the wizard API (<write-channel>) does not constitute such navigation.
- A URL that nevertheless specifies a flow step (old bookmarks, manually entered) displays the step to which “Back” would lead from there; the address bar is updated accordingly (new: RouteManager.isAdopting()). If no such step precedes it (the flow begins with the intermediate step), the through step runs.
- The special handling in the "Back" button of the demo (demo/wizard-demo.view.xml) is no longer used; the "Role" question uses a simple <wizard-back/> again. Described in the developer article view-layer/navigation (section Auto-advance).