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

Checkout: Remove wpcom-proxy-request from calypso-paypal package #97525

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

sirbrillig
Copy link
Member

Proposed Changes

This PR removes the wpcom-proxy-request from the dependencies of @automattic/calypso-paypal.

Why are these changes being made?

Originally, I had added wpcom-proxy-request to the calypso-paypal package as a way to have the package make its own HTTP API requests to the WPCOM paypal configuration endpoint. However, it appears that in some cases this does not work well, so in #97487 I made checkout inject its own network request function as an argument. Since that seems to always work, this PR will make that technique required and remove the ability for the package to make its own calls.

Testing Instructions

Add a product to your cart and visit checkout. Verify that you see PayPal as a payment method option listed.

@sirbrillig sirbrillig self-assigned this Dec 16, 2024
@sirbrillig sirbrillig added the [Feature] Checkout The checkout screen and process for purchases made on WordPress.com. label Dec 16, 2024
@matticbot
Copy link
Contributor

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

Sections (~45 bytes removed 📉 [gzipped])

name            parsed_size           gzip_size
site-purchases       -149 B  (-0.0%)      -22 B  (-0.0%)
purchases            -149 B  (-0.0%)      -22 B  (-0.0%)
checkout             -149 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.

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

name                                             parsed_size           gzip_size
async-load-calypso-my-sites-checkout-modal            -149 B  (-0.0%)      -23 B  (-0.0%)
async-load-calypso-blocks-editor-checkout-modal       -149 B  (-0.0%)      -23 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.

@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • blaze-dashboard
  • command-palette-wp-admin
  • help-center
  • notifications
  • odyssey-stats
  • whats-new

To test WordPress.com changes, run install-plugin.sh $pluginSlug remove/wpcom-proxy-req-from-paypal on your sandbox.

@sirbrillig sirbrillig merged commit d221dec into trunk Dec 16, 2024
13 checks passed
@sirbrillig sirbrillig deleted the remove/wpcom-proxy-req-from-paypal branch December 16, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Checkout The checkout screen and process for purchases made on WordPress.com.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants