-
Notifications
You must be signed in to change notification settings - Fork 921
Open
Labels
APP: Setup WizardRe: Setup Wizard (facility import, superuser creation, settings, etc.)Re: Setup Wizard (facility import, superuser creation, settings, etc.)DEV: frontendSIZE: mediumTAG: tech update / debtChange not visible to userChange not visible to userTODO: needs decisionsDesign or specifications are necessaryDesign or specifications are necessary
Milestone
Description
Overview
#10277 opened up a conversation regarding how we manage state between transitions in the Setup Wizard state machine (and potentially others).
The first pass at the SetupWizard machine works such that:
- Each step only "commits" the update to the state when the user clicks "CONTINUE"
- If the user clicks "BACK" the state is not resolved (with 1-2 exceptions)
- Thus, each component needs to initialize its own internal state (ie, values of form elements) every time it is mounted and fall back to a default.
The suggestion in #10277 was to use the native XState history feature. This, however, presented us with a sort of inverse problem. Rather than the component the user goes back to reading the XState state for its initial value, we would have to manually pass the state to the component when we pop the history stack since going back on the history stack "undoes" the changes to state made based on the user's selections.
Another suggestion from @MisRob was to look into https://github.com/marcelkalveram/xstate-undoable
# Deliverables
- [ ] Research and prepare an agenda for a discussion around the potential solutions
- [ ] Lead a discussion with any interested parties to arrive at a decision on how we can revise and possibly standardize our use of XState
- [ ] Create an issue detailing what changes should happen to the SetupWizard
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
APP: Setup WizardRe: Setup Wizard (facility import, superuser creation, settings, etc.)Re: Setup Wizard (facility import, superuser creation, settings, etc.)DEV: frontendSIZE: mediumTAG: tech update / debtChange not visible to userChange not visible to userTODO: needs decisionsDesign or specifications are necessaryDesign or specifications are necessary