wp-calypso
wp-calypso copied to clipboard
Setup guided flow redirects
Related to 7365-gh-Automattic/dotcom-forge
Proposed Changes
The guided flow has a few cases where we want to redirect the users to another flow.
- If the user answers
Migrating or importing an existing site
we redirect to/setup/import-hosted-site
- If the user answer
Create newsletter
we redirect to/setup/newsletter
- If the user answers
Sell something
andGet a website built quickly
we redirect to/start/do-it-for-me-store
- If the user answers
Get a website built quickly
we redirect to/start/do-it-for-me
Why are these changes being made?
- The
SegmentationSurvey
didn't offer a way to bypass the navigation to the next page. To avoid navigation issues after redirection I extended it to haveskipNextNavigation
which is called with the question key and answers. This will easily allow us to customize how the navigation happens and avoid issues with history.
Testing Instructions
- Visit
/start/guided
- Verify that selecting
Migrating or importing an existing site
will redirect to/setup/import-hosted-site
- Verify that selecting
Create newsletter
will redirect to/setup/newsletter
- Verify that by selecting
Sell something
andGet a website built quickly
we redirect to/start/do-it-for-me-store
- Verify that by selecting
Get a website built quickly
we redirect to/start/do-it-for-me
Pre-merge Checklist
- [ ] Has the general commit checklist been followed? (PCYsg-hS-p2)
- [ ] Have you written new tests for your changes?
- [ ] Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
- [ ] Have you checked for TypeScript, React or other console errors?
- [ ] Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
- [ ] Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
- [ ] For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?