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

Woo Installer: Convert transfer step to use v2 endpoint data-layer #58848

Merged
merged 13 commits into from
Dec 14, 2021

Conversation

lsl
Copy link
Contributor

@lsl lsl commented Dec 6, 2021

Changes proposed in this Pull Request

Testing instructions

  • Start an install flow with a simple site via /woocommerce-installation, it should kick off a transfer and install WooCommerce and Woo Payments. It will also require an upgrade if needed.
  • Start an install flow with an Atomic site from /woocommerce-installation, it should install WooCommerce and Woo Payments.

Related to #58227

@lsl lsl self-assigned this Dec 6, 2021
@matticbot
Copy link
Contributor

matticbot commented Dec 6, 2021

@github-actions
Copy link

github-actions bot commented Dec 6, 2021

@matticbot
Copy link
Contributor

matticbot commented Dec 6, 2021

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

App Entrypoints (~173 bytes added 📈 [gzipped])

name                   parsed_size           gzip_size
entry-main                 +1052 B  (+0.1%)     +173 B  (+0.1%)
entry-login                 +550 B  (+0.1%)     +129 B  (+0.0%)
entry-gutenboarding         +271 B  (+0.0%)      +40 B  (+0.0%)
entry-domains-landing       +271 B  (+0.0%)      +40 B  (+0.0%)
entry-browsehappy           +271 B  (+0.3%)      +40 B  (+0.1%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~16097 bytes removed 📉 [gzipped])

name                                 parsed_size           gzip_size
signup                                   -1220 B  (-0.3%)      -34 B  (-0.0%)
themes                                    -519 B  (-0.1%)    +2388 B  (+1.7%)
plugins                                   +447 B  (+0.1%)    +2587 B  (+1.4%)
scan                                      +419 B  (+0.1%)     -316 B  (-0.2%)
automated-transfer-state-middleware       -334 B  (-1.7%)     -254 B  (-4.0%)
devdocs                                   +216 B  (+0.1%)      +27 B  (+0.1%)
hosting                                   +213 B  (+0.1%)    +1167 B  (+1.0%)
marketing                                 -141 B  (-0.0%)     -462 B  (-0.3%)
woocommerce-installation                  -112 B  (-0.1%)     -426 B  (-0.6%)
email                                      +92 B  (+0.0%)     -402 B  (-0.3%)
marketplace                                +91 B  (+0.0%)     -150 B  (-0.1%)
settings-performance                       +81 B  (+0.0%)     -944 B  (-0.8%)
woocommerce                                +55 B  (+0.0%)      +13 B  (+0.0%)
theme                                      +55 B  (+0.0%)      +13 B  (+0.0%)
stats                                      +55 B  (+0.0%)      +12 B  (+0.0%)
sites                                      +55 B  (+0.0%)      +13 B  (+0.0%)
site-purchases                             +55 B  (+0.0%)      +13 B  (+0.0%)
settings-writing                           +55 B  (+0.0%)      +13 B  (+0.0%)
settings-security                          +55 B  (+0.0%)      +13 B  (+0.0%)
settings-jetpack                           +55 B  (+0.0%)      +13 B  (+0.0%)
settings-discussion                        +55 B  (+0.0%)      +13 B  (+0.0%)
purchases                                  +55 B  (+0.0%)      +13 B  (+0.0%)
preview                                    +55 B  (+0.0%)      +13 B  (+0.0%)
posts-custom                               +55 B  (+0.0%)      +13 B  (+0.0%)
posts                                      +55 B  (+0.0%)      +13 B  (+0.0%)
plans                                      +55 B  (+0.0%)      +13 B  (+0.0%)
people                                     +55 B  (+0.0%)      +13 B  (+0.0%)
pages                                      +55 B  (+0.0%)      +13 B  (+0.0%)
migrate                                    +55 B  (+0.0%)      +13 B  (+0.0%)
media                                      +55 B  (+0.0%)      +16 B  (+0.0%)
jetpack-search                             +55 B  (+0.0%)      +13 B  (+0.0%)
jetpack-connect                            +55 B  (+0.0%)      +13 B  (+0.0%)
jetpack-cloud-settings                     +55 B  (+0.0%)      +13 B  (+0.0%)
jetpack-cloud-pricing                      +55 B  (+0.0%)      +13 B  (+0.0%)
jetpack-cloud                              +55 B  (+0.0%)      +13 B  (+0.0%)
import                                     +55 B  (+0.0%)      +13 B  (+0.0%)
home                                       +55 B  (+0.0%)      +13 B  (+0.0%)
google-my-business                         +55 B  (+0.0%)      +13 B  (+0.0%)
export                                     +55 B  (+0.0%)      +13 B  (+0.0%)
earn                                       +55 B  (+0.0%)      +12 B  (+0.0%)
domains                                    +55 B  (+0.0%)      +13 B  (+0.0%)
customize                                  +55 B  (+0.0%)      +13 B  (+0.0%)
concierge                                  +55 B  (+0.0%)      +13 B  (+0.0%)
comments                                   +55 B  (+0.0%)      +13 B  (+0.0%)
backup                                     +55 B  (+0.0%)     +131 B  (+0.1%)
activity                                   +55 B  (+0.0%)      +32 B  (+0.0%)
settings                                   +17 B  (+0.0%)       -1 B  (-0.0%)
gutenberg-editor                           +14 B  (+0.0%)       +0 B
checkout                                   -14 B  (-0.0%)     -352 B  (-0.1%)

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

Async-loaded Components (~6722 bytes removed 📉 [gzipped])

name                                                  parsed_size            gzip_size
async-load-signup-steps-woocommerce-install-transfer     -39523 B  (-33.1%)   -12315 B  (-32.7%)
async-load-signup-steps-woocommerce-install-confirm        -227 B   (-0.2%)     -452 B   (-1.3%)
async-load-calypso-my-sites-sidebar-unified                +143 B   (+0.1%)     +608 B   (+2.0%)
async-load-calypso-blocks-editor-checkout-modal             -41 B   (-0.0%)      -32 B   (-0.0%)

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.

@lsl lsl force-pushed the update/woop-install branch 2 times, most recently from 8becad8 to 26edb6b Compare December 10, 2021 06:18
@lsl
Copy link
Contributor Author

lsl commented Dec 13, 2021

Happy path is now pretty stable for both existing atomic sites and non atomic sites.

You can test by starting an install flow with a simple site, it will kick off a transfer (which will complete) but until D70856-code is merged it won't install software. The transfer component will poll until both transfer is complete and software is applied.

Since D70860-code is merged, you can test the existing atomic site flow in another tab, it will auto confirm, "re-install" the software set, and redirect to wc-admin.

At the same time, your original tab should complete and redirect to wc-admin.

Once D70856-code testing each flow individually will be possible.

Error handling needs confirming end to end, both transfer failures and http request failures need checking how they're handled.

I think we should just rely on errorNotice for request failures (e.g. this, not this), that pops up a notice bar in the top right of the page. For transfer failures we should set an error state and show it in place of the progress bar.

Code is sort of set up for all this already but I think it just needs testing / working out any bugs. (We can/should do all this in a follow up)

@retrofox
Copy link
Contributor

image

Tested the whole process, according to PR instructions and it works as expected.

@lsl lsl marked this pull request as ready for review December 13, 2021 21:30
@lsl lsl added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 13, 2021
@lsl lsl changed the title Update/woop install Woo Installer: Convert transfer step to use v2 endpoint data-layer Dec 13, 2021
lsl and others added 9 commits December 14, 2021 13:18
The title shown on the install flow was kind of weird as the loading
ellipsis matches the prelim loading checks pre-confirm but then the
title shows up half way through "loading" during the install phase.
Copy link
Contributor

@retrofox retrofox left a comment

Choose a reason for hiding this comment

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

LGTM. Although it shows an error when installing software when it's an atomic site, it works as expected. We can iterate later in follow-up PRs .

@retrofox retrofox added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 14, 2021
Copy link
Member

@allilevine allilevine left a comment

Choose a reason for hiding this comment

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

This is working great now that the endpoint changes are merged. I updated the testing instructions.

@retrofox retrofox merged commit 727d1f4 into trunk Dec 14, 2021
@retrofox retrofox deleted the update/woop-install branch December 14, 2021 18:28
@a8ci18n
Copy link

a8ci18n commented Dec 14, 2021

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7041289

Hi @lsl, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include all of the following strings:

  • We've hit a snag
  • It looks like something went wrong while setting up your store. Please contact support so that we can help you out.

Thank you in advance!

@a8ci18n
Copy link

a8ci18n commented Dec 24, 2021

Translation for this Pull Request has now been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🎉 Done
Development

Successfully merging this pull request may close these issues.

5 participants