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

Gutenboarding: Ensure checkout always lands in customer home. #44881

Merged
merged 6 commits into from Aug 17, 2020

Conversation

yansern
Copy link
Contributor

@yansern yansern commented Aug 12, 2020

Changes proposed in this Pull Request

  • Ensure gutenboarding checkout always lands in customer home.

Testing instructions

Setup

  • For old checkout, set "old-checkout-force": true in development.json and run yarn start.
    • Alternatively, you can add return 'old-checkout'; on getCheckoutVariant() function in checkout-system-decider.js to avoid restarting yarn.
  • For composite checkout, set "composite-checkout-force": true in development.json and run yarn start.
    • Alternatively, you can add return 'composite-checkout'; on getCheckoutVariant() function in checkout-system-decider.js to avoid restarting yarn.
  • Go to apps/full-site-editing and run yarn dev --sync.

Test twice, once with Old Checkout, once with Composite Checkout

  • Go through the calypso.localhost:3000/new flow.
    • Be sure to choose Free plan so you land in editor with launch flow.
  • Once you land in the editor, you have a site url. Sandbox the new site url, restart your browser and reload the page.
  • During the launch flow, pick a paid plan.
  • When you land in the checkout page, you should see redirect_to query param on the checkout url.
  • Clicking on Pay button it should redirect back to customer home.

Test launch from site home

  • Go through the calypso.localhost:3000/new flow.
  • When you land in editor, go to customer site home (click W on the upper left corner, then My Home).
  • Then click on Launch your site, and click Launch (see screenshot).
  • Go through the checkout process.
  • Clicking on Pay button should redirect back to customer home.

image

@yansern yansern self-assigned this Aug 12, 2020
@matticbot
Copy link
Contributor

@yansern yansern added [Goal] New Onboarding previously called Gutenboarding [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] Needs e2e Testing labels Aug 12, 2020
@simison simison requested a review from a team August 12, 2020 17:03
@simison
Copy link
Member

simison commented Aug 12, 2020

How come the redirectTo arg doesn't work, does it fail isExternal check?

@matticbot
Copy link
Contributor

matticbot commented Aug 12, 2020

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

Sections (~132 bytes added 📈 [gzipped])

name             parsed_size           gzip_size
signup                +119 B  (+0.0%)      +28 B  (+0.0%)
jetpack-connect       +119 B  (+0.0%)      +43 B  (+0.0%)
checkout              +119 B  (+0.0%)      +33 B  (+0.0%)
accept-invite         +119 B  (+0.0%)      +28 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.

@yansern
Copy link
Contributor Author

yansern commented Aug 13, 2020

How come the redirectTo arg doesn't work, does it fail isExternal check?

Follow-up discussion in Slack. p1597252036263900-slack-C0KDTA48Y

@matticbot
Copy link
Contributor

Caution: This PR affects files in the Editing Toolkit Plugin on WordPress.com
Please ensure your changes work on WordPress.com before merging.

D48140-code has been created so you can easily test it on your sandbox. See this FieldGuide page about developing the Editing Toolkit Plugin for more info: PCYsg-ly5-p2

@yansern
Copy link
Contributor Author

yansern commented Aug 14, 2020

Just to mention that theres another place where checkout url with the param preLaunch=1 is constructed and that is in getCheckoutUrl() function in client/signup/config/flows.js.

However, in my testing, this function doesn't seem to execute, so it makes me wonder if this was leftover code from older gutenboarding. This runs when launching through site home.

Copy link
Member

@simison simison left a comment

Choose a reason for hiding this comment

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

Tested both editor launch flow with old checkout, and customer home launch flow with new checkout.

Both landed me at customer home with right URL argument visible.

Just for extra confidence, @razvanpapadopol can you also ✅ this one?

@razvanpapadopol
Copy link

At the moment something is wrong when starting the launch flow in My Home after creating a site in Gutenboarding. If I choose an ecommerce plan, after purchasing it I get redirected to My Home instead of starting the atomic transfer and finally setting up my store.

@razvanpapadopol razvanpapadopol force-pushed the fix/gutenboarding-checkout-redirect-to-home branch from 036719e to 8576504 Compare August 17, 2020 13:15
@razvanpapadopol
Copy link

razvanpapadopol commented Aug 17, 2020

At the moment something is wrong when starting the launch flow in My Home after creating a site in Gutenboarding. If I choose an ecommerce plan, after purchasing it I get redirected to My Home instead of starting the atomic transfer and finally setting up my store.

The following should fix post-checkout redirect in case on eCommerce plan so the Atomic transfer should start automatically landing at this screen to start store setup:

  • Calypso new-launch flow (started from My Home checklist by pressing Launch Site button on a site created in Gutenboarding) : 8576504
  • Complete Setup flow (started from the editor): 070eb31

Copy link
Member

@alshakero alshakero left a comment

Choose a reason for hiding this comment

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

Tested with old and new checkouts, with personal and ecommerce plans. All works as expected.

@razvanpapadopol razvanpapadopol merged commit 58f7de0 into master Aug 17, 2020
@razvanpapadopol razvanpapadopol deleted the fix/gutenboarding-checkout-redirect-to-home branch August 17, 2020 14:44
@matticbot matticbot removed [Status] In Progress [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Goal] New Onboarding previously called Gutenboarding Post Checkout
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants