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

Move out store setup from extension/woocommerce to my-sites section #49879

Merged
merged 3 commits into from
Feb 17, 2021

Conversation

ilyasfoo
Copy link
Contributor

@ilyasfoo ilyasfoo commented Feb 9, 2021

Changes proposed in this Pull Request

This PR moves the setup of WooCommerce for Atomic sites that do not yet have the WooCommerce plugin out extensions/woocommerce to a standalone page in located under my-sites.

The new section can be accessed via https://wordpress.com/woocommerce/{site}. In order to support Nav Unification, the actual link to the new woocommerce section from sidebar should be addressed in wpcomsh repository.

Fixes #49424.

Testing instructions

  • Start calypso in local.
  • Create a new business plan site (Alternatively, you can also disable WooCommerce plugin in an existing business site).
  • If site is not yet Atomic, go to plugins, and install any plugin other than WooCommerce to convert site to Atomic.
  • In the site's URL, replace home with woocommerce.
  • Click on "Setup my store".
  • Observe the progress and page should redirect to first step of WooCommerce onboarding wizard.
  • For tracks, calypso_woocommerce_dashboard_action_click should be called with { action: 'initial-setup' } when setup is run.

Demo

@ilyasfoo ilyasfoo added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Feb 9, 2021
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

matticbot commented Feb 9, 2021

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

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

name                   parsed_size           gzip_size
entry-main                 +1442 B  (+0.1%)     +267 B  (+0.1%)
entry-login                 +255 B  (+0.0%)     +115 B  (+0.0%)
entry-gutenboarding         +255 B  (+0.0%)     +115 B  (+0.0%)
entry-domains-landing       +255 B  (+0.0%)     +115 B  (+0.1%)

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

Sections (~1528 bytes added 📈 [gzipped])

name                      parsed_size           gzip_size
woocommerce-installation    +141729 B    (new)   +45287 B    (new)
woocommerce                    +183 B  (+0.0%)     +930 B  (+0.1%)
settings-writing               +183 B  (+0.0%)     +818 B  (+0.5%)
plugins                        +103 B  (+0.0%)      -60 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.

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

name                                 parsed_size           gzip_size
async-load-calypso-my-sites-sidebar       +276 B  (+0.1%)      +39 B  (+0.1%)

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.

Copy link
Contributor

@moon0326 moon0326 left a comment

Choose a reason for hiding this comment

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

Nice work @ilyasfoo !!

It tested well and LGTM 👍 🚢

@mattsherman
Copy link
Contributor

In the site's URL, replace home with woocommerce

@ilyasfoo @moon0326 @becdetat @adrianduffell

When a new route like this is added in Calypso, we will need to make a Systems Request to have that route added to those that get handled by Calypso. Otherwise, in production, it will result in a 404.

And in this case, we probably shouldn't use /woocommerce... it's already used by us as a landing page for WooCommerce. Hmm. Maybe /woocommerce-installation? It's not a url that customers will be entering in manually ever, so its not a problem if it is a little longer.

@ilyasfoo
Copy link
Contributor Author

ilyasfoo commented Feb 16, 2021

@mattsherman Oh, that's great to know, thanks! I agree with the new URL /woocommerce-installation and made changes in 6897d1b.

I'll be making the request to Systems Request p2 early tomorrow.
Request to allow route made here: pMz3w-cBC-p2

@ilyasfoo ilyasfoo merged commit d6487d4 into trunk Feb 17, 2021
@ilyasfoo ilyasfoo deleted the refactor/49424-move-out-woocommerce-setup branch February 17, 2021 03:14
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Feb 17, 2021
@a8ci18n
Copy link

a8ci18n commented Feb 17, 2021

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

Thank you @ilyasfoo for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Feb 25, 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
None yet
Development

Successfully merging this pull request may close these issues.

Store|Woo: Move setup of WooCommerce for Atomic sites without WooCommerce plugin out of extensions/woocommerce
5 participants