Disables the back button on the first step of the wizard. Disabling the
back button (as opposed to hiding it) is how the wizard works in the
Patternfly official examples.
Store validation status in redux state.
This is bit complex on the redux side, but pretty simple on the components.
It allows for reuse of the validation state instead of revalidating wherever needed.
Add an optional search parameter to the wizard like so:
`/insights/image-builder/imagewizard?target=iso`
or
`/insights/image-builder/imagewizard?target=qcow`
This results in wizard being opened and iso or qcow target being pre-selected. The Insights assistant chat bot will make use of this feature.
Add an optional search parameter to the wizard like so:
/insights/image-builder/imagewizard?arch=aarch64
This results in the wizard being opened and 'aarch64' being pre-selected as the architecture.
The Insights assistant chat bot and our websites (access.redhat.com and
developers.redhat.com) will make use of this feature.
Relates to HMS-3684
The FSC step is added to the wizard and takes full advantage of Redux
for state management.
This is still a work in progress.
Supported features:
1. Select partition mountpoint prefix (e.g. /var, /home)
2. Edit partition mountpoint suffix (e.g. /home/videogames)
3. Change displayed units (KiB, MiB, GiB)
Supported but buggy features:
1. Edit partition size
Unsupported features:
1. Add partitions
2. Remove partitions
3. Validation
Adding an optional search parameter to the V2 wizard like so:
/insights/image-builder/imagewizard?release=rhel8
results in the wizard being opened and RHEL 8 being pre-selected as the release.
The Insights assistant chat bot will make use of this feature.
The render() test utility function had to be updated to accept an
optional searchParams argument.
This created a new folder for the Review step and copies components that will be needed:
- ReviewStep.tsx
- ReviewStepTables.tsx
- ReviewStepTextLists.tsx
This adds the OpenSCAP step to the V2Wizard,
adds new values to the wizardSlice and enables relevant tests in the `CreateImageWizard.test.tsx` test suite
This migrates all the needed components from Javascript and DDF to Typescript and RTK.
New slices were added for registration type and activation key.
Disabling the "Next" button should work correctly now.
Fixes#1552.
The wizardSlice's initializeWizard action was not working because when it
was passed to `dispatch()` as an argument it was missing the `()`...
oops!
It also needs to be dispatched inside of a useEffect hook with an empty
dependency array so that it is only dispatched once, when the wizard
opens.
We encountered a number of bugs with the previous implementation where
going to the next or previous step and returning to the AWS step
resulted in incorrectly displayed information about the selected source,
etc...
All state that needs to be available during the entire wizard life cycle
has been moved to RTK.
Bring in a review step in the wizard. The purpose is to incrementally
develop it while new steps are added to the mix. This way the Wizard
gets to be integration testable from the early beginning.
Right now the review step is only showing information about the Image
Output step. Even though the Image Output step contains data about the
target environment, these information are going to need the Target
Environment step to be developed in order to be fully shown.
Port the image output step to the new wizard v2.
This is also the first step in the new redesigned wizard and this commit
message is an opportunity to detail a bit the organisation of it:
The code is organised as followed:
- CreateImageWizard is the root and contains all the code associated
with the PF wizard. (i.e Wizard and WizardStep).
- Each step has its code under the step/ sub directory.
- The step directory is named after the step (i.e ImageOutput for the
Image Output step
- At the root of the step directory there is a file which contains the
code of the step (i.e ImageOutput.tsx).
- The main component of the step can access many subcomponents and they
have to be stored alongside it in its directory.
State management:
- The state management is only done with react use states, prop drilling
and state lifting. This is to ensure simplicity as it makes the wizard
- If necessary in the future, there might be needs for context and
reducers, but it's quite not the case RN. And using them come at the
cost of making exploring the code harder.
- CreateImageWizard will declare all the states
Developing a new wizard will require many pull requests and some of them
might even be worked on in parallel. To allow to develop all of that
without interfering with the legacy wizard this commit introduces a new
dev environment alongside an unleash flag when we later want to do the
switch.
To use the new dev en use `npm run stage-beta:experimental` or `npm run
stage-beta:msw+experimental` depending on what you want.
Then unleash flag to toggle in stage and prod is: `image-builder.new-wizard.enabled`
fixes: HMS-2859