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

Integrate store state with stepper navigation #3198

Merged
merged 10 commits into from
Jun 2, 2020
Merged

Conversation

yscik
Copy link
Contributor

@yscik yscik commented May 22, 2020

Fixes #3135

Changes proposed in this Pull Request

  • Mark steps as completed based on their actual completion
  • When leaving and returning/reloading the page, pick up at the next step
  • Allow to navigate back to completed steps
  • Don't render until state is loaded (isFetching starts with true) - this saves a render with default data before the spinner is shown
  • Move defaultRoute to QueryStringRouter - makes it a bit clearer, and saves an iteration rendering a different route

Testing instructions

  • Delete the sensei_setup_wizard_data to start fresh
  • Open Setup Wizard, should show Welcome step
  • Complete welcome step
  • Welcome step should be marked as completed
  • User can navigate between Welcome and Purpose step
  • Re-open Setup Wizard (without a ?step= query parameter)
  • Should open Purpose step, and allow similar navigation between Welcome and Purpose steps

Not done here

  • Block accessing steps not yet available by directly navigating to them, (for example, going to ?step=ready). — This adds some complexity and issues so if it's not critical we could skip/delay it. Steps not yet available are not clickable, so this is not affecting any real-world use cases.

@yscik yscik marked this pull request as ready for review May 28, 2020 13:33
@yscik yscik requested review from renatho and donnapep May 28, 2020 13:36
@donnapep
Copy link
Collaborator

  • Block accessing steps not yet available by directly navigating to them, (for example, going to ?step=ready). — This adds some complexity and issues so if it's not critical we could skip/delay it.

Agreed. This sounds like overkill.

@donnapep donnapep added this to the 3.1.0 milestone May 28, 2020
yscik added 2 commits May 28, 2020 17:08
# Conflicts:
#	includes/rest-api/class-sensei-rest-api-setup-wizard-controller.php
renatho
renatho previously approved these changes Jun 1, 2020
Copy link
Contributor

@renatho renatho left a comment

Choose a reason for hiding this comment

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

Looks great! 🚀
Just a few comments about JSDoc.

It would be good in the future we take a look again in an eslint rule for that. I'll jot down here to see it at some moment.

assets/onboarding/index.jsx Show resolved Hide resolved
assets/onboarding/data/actions.js Show resolved Hide resolved
assets/onboarding/navigation/index.jsx Outdated Show resolved Hide resolved
@yscik
Copy link
Contributor Author

yscik commented Jun 2, 2020

Fixed JSDoc issues in 31e634c

@yscik yscik merged commit 1afc25d into master Jun 2, 2020
@yscik yscik deleted the add/saved-progress branch June 2, 2020 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use server-persisted state in frontend navigation
3 participants