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

/start/onboarding always redirects to /setup/onboarding #97958

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

p-jackson
Copy link
Member

@p-jackson p-jackson commented Jan 5, 2025

Related to #96659

This is a pre-requisite for #97699

Proposed Changes

Now the stepper confidence check is complete p8AJCL-Zq-p2 we can take all onboarding flow traffic for /start and redirect it to /setup.

  • Remove the calypso_signup_onboarding_stepper_flow_confidence_check_3 logic and assume all users would have been in the stepper variant.
  • Remove code that used session storage and ?redirect_1220 to prevent double redirection
  • Remove experiment assignment for calypso_signup_onboarding_aa_test, which is also now completed

As far as I can tell ?redirect_1220 was there to stop redirects happening when the legacy signup framework redirected back to the signup framework again. Now we're always redirect to the stepper this is no longer needed. It also caused issues where navigating to /start would only redirect me to the stepper on the first time (because of the session storage). But with this PR we always want /start to redirect to stepper. So it was getting in the way of that.

Why are these changes being made?

The control for the Goals-First test should be Stepper, not Classic/Start. So before releasing the goals-first test we need all (onboarding flow) users to be using the stepper. Goals-first test: pbxNRc-4GM-p2

Testing Instructions

  • Navigate to /start, you should be taken to the stepper framework.
  • Navigate to /start again, you should once again be taken to the stepper framework

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 UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • 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)?

@p-jackson p-jackson self-assigned this Jan 5, 2025
@p-jackson p-jackson requested review from a team January 5, 2025 21:58
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jan 5, 2025
@p-jackson p-jackson added the [Feature] Site Goals & Onboarding Paths The onboarding flows for all new sites. label Jan 5, 2025
@matticbot
Copy link
Contributor

matticbot commented Jan 5, 2025

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

App Entrypoints (~61 bytes removed 📉 [gzipped])

name           parsed_size           gzip_size
entry-stepper       -252 B  (-0.0%)      -61 B  (-0.0%)

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

Sections (~378 bytes removed 📉 [gzipped])

name             parsed_size           gzip_size
signup                -640 B  (-0.2%)     -139 B  (-0.2%)
site-settings         -252 B  (-0.0%)      -74 B  (-0.0%)
settings              -252 B  (-0.0%)      -74 B  (-0.0%)
jetpack-connect       -252 B  (-0.0%)      -54 B  (-0.0%)
home                  -252 B  (-0.0%)      -57 B  (-0.0%)
checkout              -252 B  (-0.0%)      -57 B  (-0.0%)
accept-invite         -252 B  (-0.1%)      -54 B  (-0.1%)

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

name                                                                              parsed_size           gzip_size
async-load-purchase-modal-wrapper                                                      -252 B  (-0.1%)      -57 B  (-0.0%)
async-load-my-sites-checkout-purchase-modal-is-eligible-for-one-click-checkou...       -252 B  (-0.1%)      -59 B  (-0.0%)
async-load-calypso-lib-analytics-signup                                                -252 B  (-1.9%)      -54 B  (-1.1%)
async-load-calypso-layout-masterbar-checkout                                           -252 B  (-0.4%)      -56 B  (-0.2%)
async-load-calypso-blocks-editor-checkout-modal                                        -252 B  (-0.0%)      -60 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.

Copy link
Contributor

@candy02058912 candy02058912 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I enter the flow from /sites > Add new site, it redirects to /start -> /setup/onboarding -> Home of primary site (I think)

demo.mp4

Directly going to /start does correctly redirect to /setup/onboarding

@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

  • notifications

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/redirect-all-onboarding-traffic-to-stepper on your sandbox.

@escapemanuele
Copy link
Contributor

Tested various entry points and they all worked as expected.

I wonder if, since we're switching to use Stepper, shouldn't we change LOHP to directly point to /setup/onboarding, so to avoid a redirect.

Copy link
Member

@alshakero alshakero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should redirect on the server to avoid loading all /start and only then redirecting to Stepper. These are precious cycles before the LCP.

Don't be blocked by my comment, though because this PR does the job. You can redirect on the server like this if you'd like to address this later.

'calypso_signup_onboarding_stepper_flow_confidence_check_3'
);

if ( isOnboardingFlow( flowName ) ) {
Copy link
Member

@alshakero alshakero Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a lot of the logic above this will run for no reason. Maybe hoist this up as high as possible?

Comment on lines -64 to -78
export const getHasRedirectedForExperiment = () =>
ignoreFatalsForStorage( () =>
sessionStorage?.getItem(
'wpcom_redirected_calypso_signup_onboarding_stepper_flow_confidence_check_2'
)
);

export const setHasRedirectedForExperiment = () =>
ignoreFatalsForStorage( () =>
sessionStorage?.setItem(
'wpcom_redirected_calypso_signup_onboarding_stepper_flow_confidence_check_2',
'1'
)
);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♥️

@alshakero
Copy link
Member

I wonder if, since we're switching to use Stepper, shouldn't we change LOHP to directly point to /setup/onboarding, so to avoid a redirect.

I agree 100%, but we should still redirect because the URL /start is long-established and is linked to from many places.

@escapemanuele
Copy link
Contributor

Totally right @alshakero, I should have said that I suggested to do that and also the redirect ✌️

Copy link
Contributor

@paulopmt1 paulopmt1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works as expected, nice work!

I think we should redirect on the server to avoid loading all /start

Agree that we can additionally perform this redirect by changing the LOHP. Do we plan to do that?

@autumnfjeld
Copy link
Contributor

Agree that we can additionally perform this redirect by changing the LOHP. Do we plan to do that?

Yes. But does not have to be done for today's launch. But feel free to do asap.

All LOHP CTAs should point to /setup/onboarding #97957

@p-jackson
Copy link
Member Author

I think we should redirect on the server to avoid loading all /start and only then redirecting to Stepper. These are precious cycles before the LCP.

I thought we were going to have to go through all the LOHP's before we could get any performance improvements, but I hadn't thought about redirecting on the server, that's a good idea @alshakero.

I'm going to merge as is so we can inch closer to launching the experiment. Luckily (for our experiment at least) both control and treatment will be subject to the same redirecting.

@p-jackson p-jackson merged commit c26ead4 into trunk Jan 6, 2025
12 checks passed
@p-jackson p-jackson deleted the update/redirect-all-onboarding-traffic-to-stepper branch January 6, 2025 20:48
@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 Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Goals & Onboarding Paths The onboarding flows for all new sites.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants