Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 13 commits into from Jul 21, 2022

Conversation

mturley
Copy link
Contributor

@mturley mturley commented Jul 19, 2022

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 ea5f0c4 . 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 migtools/lib-ui#106). This is a simpler alternative to the LocalStorageContext we implemented in forklift-ui.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 19, 2022
@openshift-ci
Copy link

openshift-ci bot commented Jul 19, 2022

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 19, 2022
@mturley mturley changed the title [WIP] Add welcome message when reaching wizard, navigate back to correct place when clicking Cancel Add welcome message when reaching wizard, navigate back to correct place when clicking Cancel Jul 20, 2022
</QueryClientProvider>
</>
);
} = useRouteMatch<{ namespace: string }>();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This little refactor is an artifact of the reverted changes for the from URL param, but I left it this way because it's still an improvement (useRouteMatch is less awkward than using the RouteMatch prop type)

@mturley mturley marked this pull request as ready for review July 20, 2022 20:09
@mturley mturley requested a review from a team July 20, 2022 20:09
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 20, 2022
@openshift-ci openshift-ci bot requested a review from ibolton336 July 20, 2022 20:09
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 21, 2022
@openshift-ci
Copy link

openshift-ci bot commented Jul 21, 2022

[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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit c9df219 into migtools:main Jul 21, 2022
@mturley mturley deleted the 105-wizard-cancel-nav branch July 21, 2022 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
3 participants