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

Redirect user to home page when home/launchpad-first is enabled #98835

Merged
merged 6 commits into from
Jan 24, 2025

Conversation

paulopmt1
Copy link
Contributor

@paulopmt1 paulopmt1 commented Jan 23, 2025

Also enabled it on dev by default since we lose that flag when redirecting through pages

Related to #98812

Proposed Changes

  • After creating the user's site, we're redirecting them to the new /home launchpad instead of /launchpad

Why are these changes being made?

This is part of Launchpad In My Home project: pet6gk-1T7-p2

Testing Instructions

  • Make sure you restart your yarn start command so your local development will use the "home/launchpad-first": true flag value
  • Go through the onboarding flow and once it's finished, you should land at the new home Launchpad:

image

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

@paulopmt1 paulopmt1 linked an issue Jan 23, 2025 that may be closed by this pull request
2 tasks
@matticbot
Copy link
Contributor

matticbot commented Jan 23, 2025

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

Sections (~137 bytes added 📈 [gzipped])

name                  parsed_size           gzip_size
write-flow                 +407 B  (+0.0%)      +91 B  (+0.0%)
link-in-bio-tld-flow       +407 B  (+0.0%)      +91 B  (+0.0%)
build-flow                 +407 B  (+0.0%)      +91 B  (+0.0%)
home                       +214 B  (+0.0%)      +46 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.

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.

@paulopmt1 paulopmt1 requested a review from a team January 23, 2025 18:10
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jan 23, 2025
@vykes-mac
Copy link
Contributor

There's an error at times in the launchpad, It's not related to this PR but just calling out.

Screen.Recording.2025-01-23.at.1.27.57.PM.mov

This PR works to redirect to launchpad my home.

Base automatically changed from launchpad-first/avoid-fs-launchpad-redirect to trunk January 23, 2025 20:47
Copy link
Contributor

@zaguiini zaguiini left a comment

Choose a reason for hiding this comment

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

I was thinking if this is the right solution.

In my head, redirecting within the Launchpad component would make sense, because then whenever they tried to enter any Launchpad flow step (after creating a site of course), they'd be sent home. This is especially true in cases where they click the onboarding link in emails or the help center. It's usually /setup/(flowname)/launchpad.

Now, the site-setup or onboarding flows don't have a Launchpad, so it depends on the intent of the site (write or build in this case.) Maybe we could do this differently, and within the Launchpad step redirect the user home if:

  1. They have created the site through onboarding
  2. Their intent is write or build (we can use the same helper function)
  3. The feature flag is on?

🤔

@@ -296,6 +297,10 @@ const siteSetupFlow: FlowV1 = {
}

if ( isLaunchpadIntent( intent ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We could write this as if ( isLaunchpadIntent( intent ) && ! config.isEnabled( 'home/launchpad-first' ) )

@zaguiini
Copy link
Contributor

cc @autumnfjeld #98835 (review)

@zaguiini zaguiini force-pushed the update/redirect-to-home-on-lauchpad-first branch from cd602bf to 6768100 Compare January 24, 2025 00:33
config/development.json Outdated Show resolved Hide resolved
@@ -96,6 +97,11 @@ const Launchpad: Step = ( { navigation, flow }: LaunchpadProps ) => {
return;
}

if ( config.isEnabled( 'home/launchpad-first' ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we should also check if the site_creation_flow is onboarding because we want to gate the changes to that flow.

Like this. I think we can even extract that function to its own file and reuse it here 👍🏻

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, reused it here: 1189aac

@paulopmt1 paulopmt1 requested review from a team as code owners January 24, 2025 17:59
@paulopmt1 paulopmt1 removed request for a team January 24, 2025 18:00
@paulopmt1 paulopmt1 force-pushed the update/redirect-to-home-on-lauchpad-first branch from 548865c to 1189aac Compare January 24, 2025 18:01
@paulopmt1 paulopmt1 requested a review from zaguiini January 24, 2025 18:59
Copy link
Contributor

@zaguiini zaguiini left a comment

Choose a reason for hiding this comment

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

👍🏻

@matticbot
Copy link
Contributor

matticbot commented Jan 24, 2025

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-to-home-on-lauchpad-first on your sandbox.

@paulopmt1 paulopmt1 merged commit 853694d into trunk Jan 24, 2025
13 checks passed
@paulopmt1 paulopmt1 deleted the update/redirect-to-home-on-lauchpad-first branch January 24, 2025 20:25
@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 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task: Redirect users to the new full screen launchpad after the onboarding flow
5 participants