Add intent based plans
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/guideduntil you reach the plans page - Choose different intent and goal combinations and verify the shown plans.
- To make testing easier:
- Switch the order of the
domainsandplans-guidedsteps for theguidedflow inclient/signup/config/flows-pure.js. - Manually pass segment values to
useSegmentedPlansto 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)?
Jetpack Cloud live (direct link)
|
|
https://calypso.live?image=registry.a8c.com/calypso/app:build-109721&env=jetpack |
Automattic for Agencies live (direct link)
|
|
https://calypso.live?image=registry.a8c.com/calypso/app:build-109721&env=a8c-for-agencies |
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.
Restarted the e2e looked like it's flaky
Love how much simpler this got
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.