wp-calypso icon indicating copy to clipboard operation
wp-calypso copied to clipboard

Setup guided flow redirects

Open heavyweight opened this issue 1 year ago • 2 comments

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.

  1. If the user answers Migrating or importing an existing site we redirect to /setup/import-hosted-site
  2. If the user answer Create newsletter we redirect to /setup/newsletter
  3. If the user answers Sell something and Get a website built quickly we redirect to /start/do-it-for-me-store
  4. If the user answers Get a website built quickly we redirect to /start/do-it-for-me

image

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 have skipNextNavigation 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 and Get 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)?

heavyweight avatar May 24 '24 08:05 heavyweight

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Async-loaded Components (~190 bytes added 📈 [gzipped])

name                                    parsed_size           gzip_size
async-load-signup-steps-initial-intent       +437 B  (+0.4%)     +190 B  (+0.6%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

matticbot avatar May 24 '24 09:05 matticbot

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • odyssey-stats

To test WordPress.com changes, run install-plugin.sh $pluginSlug setup/guided-flow-redirects on your sandbox.

matticbot avatar May 24 '24 19:05 matticbot