-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Setup guided flow redirects #91094
Setup guided flow redirects #91094
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
} | ||
|
||
if ( _answerKeys.includes( 'client' ) ) { | ||
// return `/setup/${ IMPORT_HOSTED_SITE_FLOW }`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@escapemanuele for some reason I thought that we needed to redirect to a separate flow for agencies. Will delete it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, only migration, difm and newsletter!
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Async-loaded Components (~190 bytes added 📈 [gzipped])
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. Generated by performance advisor bot at iscalypsofastyet.com. |
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
@@ -79,6 +81,11 @@ const useSegmentationSurveyNavigation = ( { | |||
recordContinueEvent( currentQuestion, answers ); | |||
|
|||
await onContinue?.( currentQuestion ); | |||
|
|||
if ( skipNextNavigation?.( currentQuestion.key, answers?.[ currentQuestion.key ] ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc. @phcp incase you have any thoughts on these changes inside the segmentation survey.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pinging, it looks good to me. 😄
@@ -40,7 +41,38 @@ export default function InitialIntentStep( props: Props ) { | |||
// eslint-disable-next-line react-hooks/exhaustive-deps | |||
}, [] ); | |||
|
|||
const getRedirectForAnswers = ( _answerKeys: string[] ): string => { | |||
if ( _answerKeys.includes( 'migrate-or-import-site' ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The redirection changes are working well!
Adding a reminder that we need to handle the scenario when the user selects the Create a site for a client
option for the first question. It does not need to be done in this PR.
Based on the segment for that option, the user should not be redirected to any of these custom flows. We have to add logic to skip the second goal question if the user selects Create a site for a client
. (@wongasy - Correct me if this is inaccurate).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to add logic to skip the second goal question if the user selects
Create a site for a client
Yes, we shouldn't show the second question in that case nor the user be redirected. We should go on and show the appropriate plans.
The only doubt I have is that in Figma https://www.figma.com/design/3u71fUJraClkRQiLrAORPf/Trail-Map-Project?node-id=3981-1577&m=dev there is Hosting Flow (Developers / Agencies)
. Is that something we don't need? @nuriapenya @wongasy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, https://github.com/Automattic/dotcom-forge/issues/7433, as Q1 is not skippable for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @escapemanuele for reaching out for clarification!
The requirements have evolved and the design we have in Figma doesn't necessarily match up with what we landed on for the solution.
If users answered "Create a site for a client", they should not see question 2, but instead be taken to the plans page. We also need to add a link to A4A sign up in the plans page (which wasn't mentioned in the PT). Looks like we'll also need a design from @nuriapenya for that. Let's also ensure we gate the A4A link such that it only shows up for users in the developer segment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened https://github.com/Automattic/dotcom-forge/issues/7434 to keep track of the A4A link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated i2 designs in Figma and added more context on Slack: p1716831873951849/1716813332.564069-slack-C0347E545HR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! The PR looks good, I also tested on the Entrepreneur Trial flow and I haven't spotted any regression.
@@ -79,6 +81,11 @@ const useSegmentationSurveyNavigation = ( { | |||
recordContinueEvent( currentQuestion, answers ); | |||
|
|||
await onContinue?.( currentQuestion ); | |||
|
|||
if ( skipNextNavigation?.( currentQuestion.key, answers?.[ currentQuestion.key ] ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pinging, it looks good to me. 😄
Related to 7365-gh-Automattic/dotcom-forge
Proposed Changes
The guided flow has a few cases where we want to redirect the users to another flow.
Migrating or importing an existing site
we redirect to/setup/import-hosted-site
Create newsletter
we redirect to/setup/newsletter
Sell something
andGet a website built quickly
we redirect to/start/do-it-for-me-store
Get a website built quickly
we redirect to/start/do-it-for-me
Why are these changes being made?
SegmentationSurvey
didn't offer a way to bypass the navigation to the next page. To avoid navigation issues after redirection I extended it to haveskipNextNavigation
which is called with the question key and answers. This will easily allow us to customize how the navigation happens and avoid issues with history.Testing Instructions
/start/guided
Migrating or importing an existing site
will redirect to/setup/import-hosted-site
Create newsletter
will redirect to/setup/newsletter
Sell something
andGet a website built quickly
we redirect to/start/do-it-for-me-store
Get a website built quickly
we redirect to/start/do-it-for-me
Pre-merge Checklist