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 Migration: Add user step to the hosting flow #90680

Merged
merged 8 commits into from
May 20, 2024

Conversation

ddc22
Copy link
Contributor

@ddc22 ddc22 commented May 14, 2024

Related to #

Proposed Changes

  • Brings the user step to the stepper framework with minimal changes
  • Introduces a new temporary flow new-hosted-site-user-included to experiment with adding the user step to the hosting flow without breaking the existing implementation
  • The new flow is added behind a feature flag onboarding/user-on-stepper-hosting if landed on flow without feature flag, the user will be redirected to new-hosted-site flow
  • Raises the error handling of the <PasswordlessSignupForm /> component so that consuming client code can implement redirect side effects either with page.js or any other preferred mechanism.
  • This change is merged prematurely since its hard to test flows locally.

Why are these changes being made?

  • User on stepper is a critical step in completing the migration from signup to stepper completely.

Testing Instructions

Scenarios

  • Login with new email by entering manually, makes sure user is logged in
  • Login with exisitng email --> redirect to login ---> after login make sure the user redirects
  • Login with existing user and go back, the user step should show the logged in user

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

matticbot commented May 14, 2024

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

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

name                   parsed_size           gzip_size
entry-stepper               +917 B  (+0.0%)     +298 B  (+0.1%)
entry-subscriptions         +750 B  (+0.0%)     +239 B  (+0.0%)
entry-domains-landing       +750 B  (+0.1%)     +239 B  (+0.1%)
entry-browsehappy           +750 B  (+0.3%)     +239 B  (+0.3%)
entry-main                  +728 B  (+0.0%)     +256 B  (+0.0%)
entry-login                 +630 B  (+0.0%)    +2871 B  (+0.7%)

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

Sections (~15152 bytes added 📈 [gzipped])

name                                parsed_size           gzip_size
new-hosted-site-flow-user-included      +7419 B    (new)    +2332 B    (new)
accept-invite                           +2553 B  (+1.3%)     +535 B  (+1.0%)
jetpack-connect                         +2493 B  (+0.2%)     +542 B  (+0.2%)
new-hosted-site-flow                     +147 B  (+1.8%)      +26 B  (+1.0%)
signup                                   +121 B  (+0.0%)      +18 B  (+0.0%)
update-design-flow                        +76 B  (+0.0%)       +4 B  (+0.0%)
link-in-bio-tld-flow                      +76 B  (+0.0%)       +4 B  (+0.0%)
devdocs                                   +48 B  (+0.0%)      +20 B  (+0.0%)
themes                                    +45 B  (+0.0%)      +19 B  (+0.0%)
theme                                     +45 B  (+0.0%)      +19 B  (+0.0%)
sites-dashboard                           +45 B  (+0.0%)      +14 B  (+0.0%)
site-monitoring                           +45 B  (+0.0%)      +14 B  (+0.0%)
settings                                  +45 B  (+0.0%)      +17 B  (+0.0%)
plugins                                   +45 B  (+0.0%)      +21 B  (+0.0%)
plans                                     +45 B  (+0.0%)      +68 B  (+0.0%)
marketplace                               +45 B  (+0.0%)      +20 B  (+0.0%)
jetpack-app                               +45 B  (+0.0%)      +13 B  (+0.0%)
hosting                                   +45 B  (+0.0%)      +14 B  (+0.0%)
home                                      +45 B  (+0.0%)      +19 B  (+0.0%)
github-deployments                        +45 B  (+0.0%)      +14 B  (+0.0%)
domains                                   +45 B  (+0.0%)      +19 B  (+0.0%)
dev-tools-promo                           +45 B  (+0.0%)      +14 B  (+0.0%)
checkout                                  +45 B  (+0.0%)      +19 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 (~1337 bytes added 📈 [gzipped])

name                                                                              parsed_size           gzip_size
async-load-signup-steps-user                                                          +2553 B  (+1.6%)     +584 B  (+1.3%)
async-load-design-blocks                                                               +181 B  (+0.0%)     +671 B  (+0.1%)
async-load-purchase-modal-wrapper                                                       +45 B  (+0.0%)      +12 B  (+0.0%)
async-load-my-sites-checkout-purchase-modal-is-eligible-for-one-click-checkou...        +45 B  (+0.0%)      +17 B  (+0.0%)
async-load-design                                                                       +45 B  (+0.0%)      +16 B  (+0.0%)
async-load-calypso-layout-masterbar-checkout-tsx                                        +45 B  (+0.0%)      +18 B  (+0.0%)
async-load-calypso-layout-masterbar-checkout                                            +45 B  (+0.1%)      +17 B  (+0.1%)
async-load-calypso-blocks-editor-checkout-modal                                         +45 B  (+0.0%)      +18 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.

@ddc22 ddc22 force-pushed the add/user-step-to-hosting-flow branch from 29b498e to 3320e0f Compare May 20, 2024 16:36
@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • blaze-dashboard
  • editing-toolkit
  • odyssey-stats
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/user-step-to-hosting-flow on your sandbox.

@ddc22 ddc22 marked this pull request as ready for review May 20, 2024 21:17
@ddc22 ddc22 requested review from a team and jeyip May 20, 2024 21:17
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels May 20, 2024
@ddc22 ddc22 self-assigned this May 20, 2024
@ddc22
Copy link
Contributor Author

ddc22 commented May 20, 2024

I am merging these changes behind a feature flag so that I can investigate more deeply in production/wpcalypso. There is relatively low impact to previous change and the only risky change is done here where a callback was raised to the parent level to delegate error handling to the caller.

https://github.com/Automattic/wp-calypso/pull/90680/files#diff-4429c22f5c781fc067387f540b93e856a249701220c0e88e7e2adb1d8c36a181R1288-R1300

Please feel free to revert this change if there is any impactful breaking change. Also please feel free to leave a review which I can followup on immediately.

@ddc22 ddc22 changed the title Add user step to the hosting flow Stepper Migration: Add user step to the hosting flow May 20, 2024
@ddc22 ddc22 added the Stepper label May 20, 2024
@ddc22 ddc22 merged commit 3e33af1 into trunk May 20, 2024
15 of 17 checks passed
@ddc22 ddc22 deleted the add/user-step-to-hosting-flow branch May 20, 2024 22:33
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label May 20, 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.

None yet

2 participants