-
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
Add Cart Variant Dropdown Selector for A/B Test #61174
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~1269 bytes added 📈 [gzipped])
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 (~1269 bytes added 📈 [gzipped])
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. Generated by performance advisor bot at iscalypsofastyet.com. |
cc63200
to
841da18
Compare
ad90ccd
to
e7f3737
Compare
174579b
to
816e310
Compare
816e310
to
af13fd9
Compare
34e6114
to
36b7da5
Compare
9beeeff
to
89a868d
Compare
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 very good as described. Looks good comparing to design. Code looks good & I don't spot any issues, except for 2 small nit-picks I describe in the comments below.
LGTM! 👍
...tes/checkout/composite-checkout/components/item-variation-picker/item-variation-dropdown.tsx
Outdated
Show resolved
Hide resolved
...tes/checkout/composite-checkout/components/item-variation-picker/item-variation-dropdown.tsx
Outdated
Show resolved
Hide resolved
8c7e627
to
fe884cd
Compare
<ItemVariationRadioButtons { ...props } /> | ||
); | ||
export const ItemVariationPicker: FunctionComponent< ItemVariationPickerProps > = ( props ) => { | ||
if ( props.isLoading ) { |
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.
this is a temporary construct, once the A/B Test is complete it can be safely removed.
? 'dropdown' | ||
: 'buttons' | ||
} | ||
isLoading={ isJetpackCheckout && isLoadingExperimentAssignment } |
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.
I tried separating the loading logic between here and the composite-checkout placeholder, but it still briefly flashed the radio buttons. isLoading
is a temporary fix and can be removed once the test is complete.
@@ -0,0 +1,43 @@ | |||
import { keyframes } from '@emotion/react'; |
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.
This whole component is part of a temporary fix and can be removed once the A/B test is complete.
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.
I didn't test it but the code looks good and I have no concerns from a payments perspective.
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7185299 Thank you @cbauerman for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
Changes proposed in this Pull Request
<ItemVariantPicker />
component to render either radio buttons or dropdown.calypso_jetpack_cart_with_dropdown_variant_selector_2
to Calypso to control which variant picker type is used.Testing instructions