Skip to content
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

Stepper: Apply extended props to calypso_stepper_flow_start #94131

Closed
wants to merge 16 commits into from

Conversation

chriskmnds
Copy link
Contributor

@chriskmnds chriskmnds commented Sep 3, 2024

Part of addressing #94108

Proposed Changes

  • Adds STEPPER_TRACKS_EVENT_FLOW_START
  • Implements props extension for calypso_stepper_flow_start event
  • Some general refactors to useFlowAnalytics. Also converted to useFlowStartTracking

DO NOT MERGE - depended on ongoing discussions in #94175 (similar/same problem)

Why are these changes being made?

  • Allow flows to extend the default props tracked by Stepper for all the major/framework events

Testing Instructions

  • test /setup/onboarding and /setup/newsletter
  • ensure tracking of calypso_stepper_flow_start when walking through steps in Stepper works like before
  • should fire once per flow

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@matticbot
Copy link
Contributor

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~238 bytes added 📈 [gzipped])

name                 parsed_size           gzip_size
entry-stepper             +868 B  (+0.0%)     +222 B  (+0.0%)
entry-subscriptions       +280 B  (+0.0%)      +48 B  (+0.0%)
entry-main                +280 B  (+0.0%)      +45 B  (+0.0%)
entry-login               +280 B  (+0.0%)      +45 B  (+0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~316 bytes removed 📉 [gzipped])

name                     parsed_size           gzip_size
jetpack-connect               -208 B  (-0.0%)      -38 B  (-0.0%)
domains                       -208 B  (-0.0%)      -49 B  (-0.0%)
themes                        -195 B  (-0.0%)      -47 B  (-0.0%)
signup                        -195 B  (-0.1%)      -57 B  (-0.1%)
posts-custom                  -195 B  (-0.0%)      -47 B  (-0.0%)
posts                         -195 B  (-0.0%)      -47 B  (-0.0%)
checkout                      -195 B  (-0.0%)      -54 B  (-0.0%)
accept-invite                 -195 B  (-0.1%)      -55 B  (-0.1%)
tailored-ecommerce-flow       +105 B  (+0.2%)      +31 B  (+0.5%)

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 (~228 bytes removed 📉 [gzipped])

name                                                         parsed_size           gzip_size
async-load-design-blocks                                          -208 B  (-0.0%)      -51 B  (-0.0%)
async-load-calypso-my-sites-site-settings-seo-settings-form       -208 B  (-0.1%)      -53 B  (-0.1%)
async-load-calypso-components-web-preview-component               -195 B  (-0.0%)      -71 B  (-0.1%)
async-load-calypso-blocks-editor-checkout-modal                   -195 B  (-0.0%)      -53 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.

@chriskmnds chriskmnds force-pushed the update/stepper-tracking-signup_step_start_extend branch 2 times, most recently from 6326821 to d5c885b Compare October 3, 2024 16:24
Base automatically changed from update/stepper-tracking-signup_step_start_extend to trunk October 3, 2024 16:46
@chriskmnds
Copy link
Contributor Author

Similarly to #94229 (comment).
Closing this for now.

@chriskmnds chriskmnds closed this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants