The Details step is renamed to Name Image and moved to the last step
before Review. Also, the validation is removed since all utf-8
characters are supported for image names.
Validation is not enforced on the image output step
when selecting and then deselecting an image type. This
is because the only validation which is set is `Required`.
However, after deselecting an image type the input becomes
a key-value object with all the values set to false. This
commit adds a custom validator to check that at least one
value in the object is set to true. Fixes#575
Resolves#466. The default behavior for the DDF Wizard is to either advance to
the next step or submit the form when the ENTER is pressed.
This is inappropriate for complex forms that contain many different
types of elements that are typically interacted with using ENTER. For
instance, the default behavior when a link is focused and ENTER is pressed
is not to open the link in a browser but to advance or submit the form.
This commit overrides the default behavior by passing an onKeyDown prop
to the wizard which calls a custom onKeyDown function. The new custom
function does not define any behavior for when ENTER is pressed,
but does recreate DDF's default ESCAPE behavior, which is to close the
modal.
When recreating an image navigate to the review step instead of the
initial step. This requires forming the step history to enable a
functional sidebar.
Changes the Wizard's description (defined in the schema) to `Image
builder allows you to create a custom image and push it to target
environments` as indicated in the UI design prototype. The previous
description (`Create a RHEL image and push it to cloud providers`)
is no longer accurate since CentOS images are also currently supported.
Add a details step where the user can enter a descriptive image name.
This name is displayed in the review step above the Release. Both these
fields are now horizontal to save vertical space.
Update the registration options to include registering without insights.
Also, improve the text info in the step.
The org id is also removed from the registration step since we no
longer display the id in this step.
The image types 'vsphere', 'guest-image', and 'image-installer' are now
supported by the CreateImageWizard. They require no additional
customizations and support the current registration and packages
customizations.
Loading the organization ID is now done in the registration step. This
prevents the entire wizard from waiting on the org id and prevents the
wizard from remounting when the async getUser() completes.
This also mitigates the issue where clicking the image-builder nav link
would redirect you to `image-builder/image-builder` if image-builder was
already opened. And `/` didn't catch that path.
The review step is improved. The create button now states 'Create
image'. The step description text is updated. The fields to be reviewed
are now split into tabs for 'Target environment', 'Registration',
'System Configuration'. The target environments show the logo of the
environment now. The quantity of packages selected also displays now.
Tests are also updated.
The composeAdded action includes a field 'insert'. When set to true
`insert` will place the added compose at the beginning of the images
list. The test is modified so the new composes are added to the
beginning of the list.
When image creation failed to start the wizard would get stuck in the
saving state with no notice to the user. Now the user will get an error
alert contain the status code and message. The wizard no longer gets
stuck in the saving state.
Tests were failing because we are now calling getUser when wizard is shown. This call is asynchronous and requires wrapping the wizard in act to wait for it to be fulfilled
The patternfly Wizard component's description is wrapped in a p tag. The
patternfly Text component also uses a p tag. A p tag should not be
nested inside another p tag.