-
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
WooCommerce setup improvements #51932
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~49 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. 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.
Changes requested to only log the Tracks event when the "Get in touch" button is actually clicked!
@@ -535,7 +547,13 @@ class RequiredPluginsInstallView extends Component { | |||
title={ translate( "We can't update your store" ) } | |||
subtitle={ subtitle } | |||
> | |||
<Button primary href={ CALYPSO_CONTACT } target="_blank" rel="noopener noreferrer"> | |||
<Button | |||
onClick={ this.trackContactSupport( 'failure' ) } |
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 calls trackContactSupport()
immediately when the contact support message is rendered.
What you want is something like...
onClick={ () => { this.trackContactSupport( 'failure' ) } }
or
onClick={ this.trackContactSupport.bind( this, 'failure' ) }
They both create a new function every time the message is rendered. I'd go with the anonymous arrow function, since I think it is more readable and familiar to newer JS devs.
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.
Ah, rookie mistake! Thanks for catching this
@@ -562,7 +580,13 @@ class RequiredPluginsInstallView extends Component { | |||
title={ translate( 'We were unable to set up your store.' ) } | |||
subtitle={ subtitle } | |||
> | |||
<Button primary href={ CALYPSO_CONTACT } target="_blank" rel="noopener noreferrer"> | |||
<Button | |||
onClick={ this.trackContactSupport( 'timeout' ) } |
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.
Same comment as above.
@mattsherman Thanks for reviewing and catching my mistake, I've addressed in c371e33 |
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.
Nice work!
Changes proposed in this Pull Request
This PR does the following:
calypso_woocommerce_setup_contact_support
to better understand user behaviour after experiencing setup timeout or failure.Testing instructions
client/my-sites/woocommerce/dashboard/required-plugins-install-view.jsx
this.props.installAndActivatePlugin( site.ID, plugin );
.Hello Dolly
plugin to turn it into Atomic site./woocommerce-installation/{your new site}
.Set up my store!
.localStorage.setItem( 'debug', 'calypso:analytics*' )
to debug tracks.calypso_woocommerce_setup_contact_support
is recorded in console containingreason: 'timeout'
.Related to #50833