migtools / crane-ui-plugin

OpenShift Dynamic Plugin for Crane UI
1 stars 11 forks source link

Add welcome message when reaching wizard, navigate back to correct place when clicking Cancel #114

Closed mturley closed 2 years ago

mturley commented 2 years ago

Resolves #105

Adds the following modal when you reach the import wizard page:

Screen Shot 2022-07-20 at 4 02 24 PM

Note: at first we intended to have this modal only appear if you are not coming from the Add page, since the Add page card has a short similar description. To that end I implemented a ?from= URL parameter that I then reverted when we decided to have it show up no matter the source. If it ever becomes useful later, you can see that implementation in https://github.com/konveyor/crane-ui-plugin/pull/114/commits/ea5f0c4b708792c80e240305ed72d13855c6c30e . This was also initially used as the method for navigating back to the right place on Cancel, before I realized we can just use history.goBack().

In order to implement the "don't show this again" checkbox, this PR also introduces a new common hook useLocalStorage that would be a good contribution to lib-ui later on (see https://github.com/konveyor/lib-ui/issues/106). This is a simpler alternative to the LocalStorageContext we implemented in forklift-ui.

openshift-ci[bot] commented 2 years ago

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

openshift-ci[bot] commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ibolton336, mturley

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/konveyor/crane-ui-plugin/blob/main/OWNERS)~~ [ibolton336,mturley] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment