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

Billing: Remove setting CartStore site id in ManagePurchase #50283

Merged
merged 1 commit into from
Feb 22, 2021

Conversation

sirbrillig
Copy link
Member

@sirbrillig sirbrillig commented Feb 19, 2021

Changes proposed in this Pull Request

The ManagePurchase component caches the currently selected site ID in the CartStore. I'm not 100% sure why this is the case, but presumably it was used when later adding products to the cart (renewals, for example). In any case, as most uses of the CartStore have been removed (see #24019), I suspect this use no longer has any value and remove it here.

Testing instructions

Verify that viewing a purchase works as expected.

@matticbot
Copy link
Contributor

@sirbrillig sirbrillig self-assigned this Feb 19, 2021
@matticbot
Copy link
Contributor

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

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

name                   parsed_size           gzip_size
entry-main                  +105 B  (+0.0%)      +30 B  (+0.0%)
entry-login                 +105 B  (+0.0%)      +32 B  (+0.0%)
entry-gutenboarding         +105 B  (+0.0%)      +28 B  (+0.0%)
entry-domains-landing       +105 B  (+0.0%)      +37 B  (+0.0%)

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

Sections (~57 bytes removed 📉 [gzipped])

name            parsed_size           gzip_size
site-purchases       -230 B  (-0.0%)      -57 B  (-0.0%)
purchases            -230 B  (-0.0%)      -57 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.

@sirbrillig sirbrillig mentioned this pull request Feb 19, 2021
@sirbrillig sirbrillig changed the title Remove setting CartStore site id in ManagePurchase Billing: Remove setting CartStore site id in ManagePurchase Feb 19, 2021
@sirbrillig sirbrillig marked this pull request as ready for review February 19, 2021 18:49
@sirbrillig sirbrillig requested a review from a team as a code owner February 19, 2021 18:49
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Feb 19, 2021
@sirbrillig sirbrillig added the [Feature Group] WPCOM Store & Purchases All things billing on WordPress.com. This includes the backend store, plans, and billing management. label Feb 19, 2021
Copy link
Contributor

@nbloomf nbloomf left a comment

Choose a reason for hiding this comment

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

Looks good. All the doo-dads on the /me/purchases management page seem to work as expected.

@nbloomf nbloomf 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 Feb 22, 2021
@sirbrillig sirbrillig merged commit 37d3f31 into trunk Feb 22, 2021
@sirbrillig sirbrillig deleted the remove/cart-store-use-manage-purchase branch February 22, 2021 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature Group] WPCOM Store & Purchases All things billing on WordPress.com. This includes the backend store, plans, and billing management.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants