wp-calypso icon indicating copy to clipboard operation
wp-calypso copied to clipboard

Add intent based plans

Open alshakero opened this issue 1 year ago • 3 comments

Related to https://github.com/Automattic/dotcom-forge/issues/7019

Proposed Changes

  • Add mapping to show relevant plans based on user segment

P2 Segment to Plan mapping: pdDR7T-1xi-p2

Why are these changes being made?

Testing Instructions

  • Checkout branch
  • Navigate through /start/guided until you reach the plans page
  • Choose different intent and goal combinations and verify the shown plans.
  • To make testing easier:
  1. Switch the order of the domains and plans-guided steps for the guided flow in client/signup/config/flows-pure.js.
  2. Manually pass segment values to useSegmentedPlans to retrieve the different plan combinations.

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)?

alshakero avatar May 16 '24 17:05 alshakero

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

Sections (~235 bytes added 📈 [gzipped])

name                  parsed_size           gzip_size
update-design-flow         +391 B  (+0.0%)     +106 B  (+0.0%)
link-in-bio-tld-flow       +391 B  (+0.0%)     +106 B  (+0.0%)
plugins                    +253 B  (+0.0%)      +63 B  (+0.0%)
plans                      +253 B  (+0.0%)      +63 B  (+0.0%)
jetpack-app                +253 B  (+0.1%)      +63 B  (+0.1%)
entrepreneur-flow          +141 B  (+0.1%)      +16 B  (+0.1%)
signup                     +138 B  (+0.0%)      +43 B  (+0.1%)
jetpack-connect            +130 B  (+0.0%)      +53 B  (+0.0%)
checkout                   +130 B  (+0.0%)      +62 B  (+0.0%)
accept-invite              +130 B  (+0.1%)      +49 B  (+0.1%)
videopress-flow             +51 B  (+0.0%)      +17 B  (+0.0%)
sensei-flow                 +51 B  (+0.0%)      +17 B  (+0.0%)
podcasts-flow               +51 B  (+0.0%)      +17 B  (+0.0%)
gutenberg-editor            +51 B  (+0.0%)      +17 B  (+0.0%)
domains                     +51 B  (+0.0%)      +17 B  (+0.0%)
copy-site-flow              +51 B  (+0.0%)      +17 B  (+0.0%)

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 (~782 bytes added 📈 [gzipped])

name                                             parsed_size           gzip_size
async-load-signup-steps-plans-theme-preselected      +1022 B  (+0.3%)     +338 B  (+0.3%)
async-load-signup-steps-plans                        +1022 B  (+0.3%)     +337 B  (+0.3%)
async-load-signup-steps-initial-intent                +380 B  (+0.4%)     +108 B  (+0.3%)
async-load-calypso-my-sites-checkout-modal            +130 B  (+0.0%)      +62 B  (+0.0%)
async-load-calypso-blocks-editor-checkout-modal        +79 B  (+0.0%)      +45 B  (+0.0%)
async-load-calypso-blocks-app-banner                   +51 B  (+0.0%)      +17 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.

matticbot avatar May 16 '24 17:05 matticbot

Restarted the e2e looked like it's flaky

heavyweight avatar May 28 '24 14:05 heavyweight

Love how much simpler this got

heavyweight avatar May 30 '24 08:05 heavyweight

Note: don't merge because this introduces a regression. The survey answers are now carried over from the guided flow into the following visits of the plans grid in other flows.

Edit: Fixed.

alshakero avatar May 30 '24 14:05 alshakero