-
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
Remove legacy Jetpack + Woo onboarding flow and replace with Woo JPC flow #99558
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~362 bytes removed 📉 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~549 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. Async-loaded Components (~304 bytes removed 📉 [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. |
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.
Thanks for working on this! @ciampo 👍
The changes look good to me. We can remove all code related to the old flow (isJetpackWooCommerceFlow, isWooOnboarding) and merge/replace with isWooJPCFlow by adding the 'woocommerce-onboarding' === get( getCurrentQueryArguments( state ), 'from' )
check to isWooJPCFlow selector.
be15721
to
fd1c127
Compare
@@ -36,25 +34,6 @@ export class JetpackHeader extends PureComponent { | |||
return null; | |||
} | |||
|
|||
if ( isWooOnboarding ) { |
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.
cc @mirka in case this deletion unlocks further improvements to the JetpackHeader
component
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
client/jetpack-connect/authorize.js
Outdated
// Should we keep this around, since we otherwise removed other instances | ||
// where we fired this tracks event? | ||
// if ( 'woocommerce-onboarding' === from ) { | ||
// recordTracksEvent( 'wcadmin_storeprofiler_connect_store', { use_account: true } ); | ||
// } |
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.
@chihsuan just wanted to double-check if we're also ok deleting the firing of this tracks event, and more in general, of the other tracks event across this PR:
wcadmin_storeprofiler_create_jetpack_account
wcadmin_storeprofiler_login_jetpack_account
wcadmin_storeprofiler_connect_store
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.
It's ok to delete them. To make sure we don't break any analytics, I searched for them in nosara and didn't find any usage. I also checked the Funnel, and the last usage of the Funnel is 3 years ago before the core profiler was introduced.
For core profiler, we're using the calypso_jpc_wc_coreprofiler_*
events for tracking so I don't see the need to keep these.
Thank you @chihsuan — I've pushed changes according to your feedback, including the merging of the Left one additional comment, and added tentative testing instructions (please don't hesitate to add better testing instructions if possible!) I think this PR is ready for a wider round of review. |
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.
Thank you for tidying up the code! @ciampo It's great to see the removal of the old flow. 🥇 😃
I have verified both flows using the provided links and ensured that sites created with the old WC plugin function as expected.
Additionally, I reviewed the WooDNA flow (link) and confirmed that it remains unaffected by these changes.
// The legacy Jetpack Woo Onboarding flow is not in use anymore, | ||
// and is now absorbed into the Woo JPC Onboarding flow. | ||
// See https://github.com/Automattic/wp-calypso/pull/99558 for more details. | ||
const isLegacyJetpackWooOnboardingFlow = ( state: AppState ) => { |
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.
👍
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.
Thanks so much for working on this, @ciampo! I also tested this change with WooCommerce.com auth flow and found no regression.
I took another look in WooCommerce core, and I found an instance that still used woocommerce-onboarding
. Apologies for missing it the first time around. Good news is that the flow still works as expected. To reproduce:
- Create a fresh JN site with Jetpack installed
- Skip core profiler onboarding
- Go to
WooCommerce > Home
- Look for stats widget, and click on
Connect Jetpack
- Observe it goes to Jetpack connection screen with
from=woocommerce-onboarding
Since the connection still works with the WooJPC flow (recording), I think this PR is good to go as it is a step forward the right direction with streamlining flows, and Ghidorah can refine the UX as follow-ups if needed (for example, the copy about accessing features). Let me know what you think @chihsuan @Automattic/ghidorah
Good catch! @ilyasfoo I agree with you. 🙌 |
e19f76b
to
a3bad34
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.
Thanks for the great cleanup!
Follow-up to #99266
Proposed Changes
isJetpackWooCommerceFlow
andisWooOnboarding
variables, and associated to thefrom='woocommerce-onboarding'
query string) is removed and "merged" into the Woo JPC flowwcadmin_storeprofiler_create_jetpack_account
wcadmin_storeprofiler_login_jetpack_account
wcadmin_storeprofiler_connect_store
Why are these changes being made?
Testing Instructions
trunk
, visit this linkfrom=
query parameter:woocommerce-onboarding
for the legacy onboarding flow,woocommerce-core-profiler
for the Woo JPC flowtrunk
Pre-merge Checklist