-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Domain Site Redirect: Use shoppingCartManager to add products in SiteRedirectStep #50282
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~68 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~48 bytes removed 📉 [gzipped])
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. Generated by performance advisor bot at iscalypsofastyet.com. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works - with the exception that there's a significant delay between clicking the "Add" button and anything happening. I know it's because of the async call to the shopping cart, etc., but to the user (or a CEO testing these flows... ;)), it could appear like you need to click a few times to get it to "work". Would it be possible to add a busy
state to the button while we're waiting for the shopping cart to refresh/reload?
Good thinking. I added a busy state and disabled the button (I always forget that the former does not imply the latter). Updated the description to include a gif. |
Failing tests seem to be unrelated. |
Testing works as expected, and the busy/disabled button also works. Using the X to leave checkout goes back to the Site Redirect page. |
Changes proposed in this Pull Request
As part of removing
CartStore
(see #24019), this PR replaces the code inSiteRedirectStep
that adds a redirect product to the cart with functions from@automattic/shopping-cart
.Testing instructions