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

Signup: reset signup state before navigation to destination outside Calypso #34078

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

jsnajdr
Copy link
Member

@jsnajdr jsnajdr commented Jun 18, 2019

The code path that handled navigation outside Calypso (typically site frontend by virtue of the getSiteDestination function) didn't call signupFlowController.reset(), leaving the signup state in Redux (and in IndexedDB) and causing weird behavior should we return to /start again shortly after.

This patch also unifies the code paths that handle inside- and outside-Calypso destinations, as there is no longer any difference between them. The inside- one used to use page( ... ) to navigate, but that's no longer true.

Also removes the defer call that was needed for Flux, but is not needed in Redux-only code.

How to test:
Go through a flow that has getSiteDestination as destination and doesn't add any cart items that would cause a "layover" at the Calypso checkout page, but goes there directly. One example is the /start/blog flow where you select a free domain and the free plan.

After arriving at the destination site frontend, press the Back button. The flow should start again rather than freezing in a weird state (typically the "Awesome" page with big WP logo).

@jsnajdr jsnajdr added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Feature] Signup & Account Creation All screens and flows for making a new WordPress.com account. [Type] Janitorial [Status] Needs e2e Testing labels Jun 18, 2019
@jsnajdr jsnajdr requested review from scruffian and a team June 18, 2019 13:12
@jsnajdr jsnajdr self-assigned this Jun 18, 2019
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

matticbot commented Jun 18, 2019

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

Sections (~23 bytes removed 📉 [gzipped])

name    parsed_size           gzip_size
signup        -62 B  (-0.0%)      -23 B  (-0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

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.

…alypso

The code path that handled navigation outside Calypso (typically site frontend by virtue of
the `getSiteDestination` function) didn't call `signupFlowController.reset()`, leaving the
signup state in Redux (and in IndexedDB) and causing weird behavior should we return to `/start`
again shortly after.

This patch also unifies the code paths that handle inside- and outside-Calypso destinations,
as there is no longer any difference between them. The inside- one used to use `page( ... )`
to navigate, but that's no longer true.

Also removes the `defer` call that was needed for Flux, but is not needed in Redux-only code.
@jsnajdr jsnajdr force-pushed the fix/signup-reset-after-complete branch from f0e0717 to fb7526a Compare June 19, 2019 05:39
@sarayourfriend sarayourfriend changed the base branch from master to trunk November 20, 2020 16:14
@github-actions
Copy link

github-actions bot commented May 5, 2021

This PR has been marked as stale due to lack of activity within the last 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Signup & Account Creation All screens and flows for making a new WordPress.com account. [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Type] Janitorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants