wp-calypso
wp-calypso copied to clipboard
DIFM: Adds the Extra Page product
Changes proposed in this Pull Request
PT: pdh1Xd-Oi-p2
- Removes the 5-page limit in the DIFM page selector step. This should allow all pages to be selected.
- Adds a custom line item sublabel for the DIFM Extra Page product in the shopping cart.
- Removes the "Remove from cart" CTA for the DIFM Extra Page product.
- Minor Fix: If the Premium plan and DIFM product were in the cart, the Premium plan could not be removed from the cart. This condition has now been changed so that the same restriction applies to the Pro plan instead of the Premium plan.
- #64798 (Will be merged after CFT to be rebased with trunk after this PR is shipped)
Testing instructions
- Go to
/start/do-it-for-me
and go through the flow steps. - On the page selector step, confirm that you can select all pages.
- Select more than 5 pages and proceed.
- On the checkout screen, confirm that the extra quantity of the "Do It For Me: Extra Page" product is displayed correctly.
- Confirm that the "Do It For Me: Extra Page" product cannot be removed from the cart.
- Confirm that the "WordPress.com Pro" product cannot be removed from the cart when the "Do It For Me: Website Design Service" is in the cart.
Fixes Automattic/martech#836
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:
App Entrypoints (~24 bytes added 📈 [gzipped])
name parsed_size gzip_size
entry-stepper +32 B (+0.0%) +24 B (+0.0%)
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.
Sections (~485 bytes added 📈 [gzipped])
name parsed_size gzip_size
checkout +399 B (+0.0%) +101 B (+0.0%)
woocommerce-installation +32 B (+0.0%) +15 B (+0.0%)
themes +32 B (+0.0%) +15 B (+0.0%)
theme +32 B (+0.0%) +15 B (+0.0%)
stats +32 B (+0.0%) +15 B (+0.0%)
site-purchases +32 B (+0.0%) +15 B (+0.0%)
signup +32 B (+0.0%) +15 B (+0.0%)
settings-writing +32 B (+0.0%) +13 B (+0.0%)
settings-security +32 B (+0.0%) +15 B (+0.0%)
settings-performance +32 B (+0.0%) +15 B (+0.0%)
settings-jetpack +32 B (+0.0%) +15 B (+0.0%)
settings-discussion +32 B (+0.0%) +14 B (+0.0%)
settings +32 B (+0.0%) +15 B (+0.0%)
scan +32 B (+0.0%) +15 B (+0.0%)
purchases +32 B (+0.0%) +15 B (+0.0%)
purchase-product +32 B (+0.0%) +16 B (+0.0%)
posts-custom +32 B (+0.0%) +15 B (+0.0%)
posts +32 B (+0.0%) +15 B (+0.0%)
plugins +32 B (+0.0%) +15 B (+0.0%)
plans +32 B (+0.0%) +15 B (+0.0%)
people +32 B (+0.0%) +14 B (+0.0%)
migrate +32 B (+0.0%) +16 B (+0.0%)
media +32 B (+0.0%) +10 B (+0.0%)
marketplace +32 B (+0.0%) +15 B (+0.0%)
marketing +32 B (+0.0%) +15 B (+0.0%)
jetpack-social +32 B (+0.0%) +16 B (+0.0%)
jetpack-search +32 B (+0.0%) +15 B (+0.0%)
jetpack-connect +32 B (+0.0%) +16 B (+0.0%)
jetpack-cloud-settings +32 B (+0.0%) +15 B (+0.0%)
jetpack-cloud-pricing +32 B (+0.0%) +15 B (+0.0%)
jetpack-cloud-plugin-management +32 B (+0.0%) +15 B (+0.0%)
jetpack-cloud-partner-portal +32 B (+0.0%) +14 B (+0.0%)
jetpack-cloud-agency-dashboard +32 B (+0.0%) +14 B (+0.0%)
jetpack-cloud +32 B (+0.0%) +17 B (+0.0%)
hosting +32 B (+0.0%) +15 B (+0.0%)
home +32 B (+0.0%) +12 B (+0.0%)
help +32 B (+0.0%) +18 B (+0.0%)
gutenberg-editor +32 B (+0.0%) +15 B (+0.0%)
google-my-business +32 B (+0.0%) +15 B (+0.0%)
email +32 B (+0.0%) +16 B (+0.0%)
earn +32 B (+0.0%) +14 B (+0.0%)
domains +32 B (+0.0%) +15 B (+0.0%)
backup +32 B (+0.0%) +15 B (+0.0%)
add-ons +32 B (+0.0%) +15 B (+0.0%)
activity +32 B (+0.0%) +15 B (+0.0%)
accept-invite +32 B (+0.0%) +15 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 (~204 bytes added 📈 [gzipped])
name parsed_size gzip_size
async-load-masterbar-cart-masterbar-cart-wrapper +395 B (+0.3%) +96 B (+0.2%)
async-load-calypso-my-sites-checkout-modal +367 B (+0.0%) +86 B (+0.0%)
async-load-calypso-blocks-editor-checkout-modal +367 B (+0.0%) +86 B (+0.0%)
async-load-signup-steps-page-picker -156 B (-0.2%) -67 B (-0.2%)
async-load-design-playground +32 B (+0.0%) +15 B (+0.0%)
async-load-design-blocks +32 B (+0.0%) +15 B (+0.0%)
async-load-design +32 B (+0.0%) +15 B (+0.0%)
async-load-calypso-reader-sidebar +32 B (+0.0%) +15 B (+0.0%)
async-load-calypso-my-sites-current-site-stale-cart-items-notice +32 B (+0.0%) +17 B (+0.1%)
async-load-calypso-my-sites-current-site-notice +32 B (+0.0%) +16 B (+0.1%)
async-load-calypso-components-web-preview-component +32 B (+0.0%) +15 B (+0.0%)
async-load-calypso-components-jetpack-sidebar +32 B (+0.0%) +16 B (+0.0%)
async-load-calypso-blocks-jitm-templates-sidebar-banner +32 B (+0.0%) +15 B (+0.1%)
async-load-calypso-blocks-jitm-templates-notice +32 B (+0.0%) +15 B (+0.1%)
async-load-calypso-blocks-jitm-templates-default +32 B (+0.0%) +16 B (+0.1%)
async-load-calypso-blocks-inline-help-popover +32 B (+0.0%) +12 B (+0.0%)
async-load-calypso-blocks-app-banner +32 B (+0.1%) +15 B (+0.2%)
async-load-automattic-help-center +32 B (+0.0%) +12 B (+0.0%)
async-load-signup-steps-website-content -13 B (-0.0%) -7 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.
Thanks for the review!
One thing I notice though is I can delete the main DIFM product from checkout, but the extra page one remains along with a reworked sum. I can also remove the pro plan from there and end up with just the extra page product.
Good catch! This is expected. However, I want to fix this via D78779-code. I'll modify D78779-code so that the Extra Page product is removed when the DIFM product is removed.
Good catch! This is expected. However, I want to fix this via D78779-code. I'll modify D78779-code so that the Extra Page product is removed when the DIFM product is removed.
Cool.
p.s. Ideally, I wouldn't expect to get an error back in this case (as we do for the rest of the logic in D78779). If I remove the core product from the cart, then I'd expect the dependent one "extra page" to also clear out if there's no way to link the two back together? It sounds like a frontend concern to me (but I don't know the logic that happens in the background). So validation can happen as in D78779, but the UI cart should also not contain an invalid product either.
This PR modifies the release build for editing-toolkit
To test your changes on WordPress.com, run install-plugin.sh editing-toolkit add/difm-extra-page
on your sandbox.
To deploy your changes after merging, see the documentation: PCYsg-mMA-p2
Closing this since we'll be removing the Extra Page product.
New changes will be behind a feature flag, introduced in https://github.com/Automattic/wp-calypso/pull/66902.