-
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
[Goals Capture] Display Continue
button in goals capture screen
#64656
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~63 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. 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. |
241e3b1
to
a23c654
Compare
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.
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 3 issues that need to be addressed are:
- Flow routing needs changes. See further comment here.
- The "Continue" button behavior when no goals are selected.
- Untranslated strings.
For future work, I would recommend, where possible, breaking compound work down into separate PRs to make things easier to review.
</div> | ||
|
||
<div className="select-goals__actions-container"> | ||
<Button primary disabled={ ! hasSelectedGoals } onClick={ onSubmit }> |
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.
Actually, user should be allowed to click Continue button when no goals are selected. When no goals are selected, it should route to the build
flow, meaning the intent is build
.
Be aware of the subtle difference:
- Continue button's intent is
build
when no goals are selected. - Skip button's intent is
wpadmin
.
Have a feeling something needs to change in the goalsToIntent mapping function. Let me know what you find out! :)
Context: p1653902033117909-slack-C02TCEHP3HA
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.
Hmmm... Ok. I will make the button always enabled then. However the fix to have the build
intent selected by default, if no goals are selected, will need to be addressed in another PR. It will add a little bit more complexity because we will need to ensure that this default value is only set (locally and remotely) when goals capture screen is used.
client/landing/stepper/declarative-flow/internals/steps-repository/goals/select-goals.tsx
Outdated
Show resolved
Hide resolved
client/landing/stepper/declarative-flow/internals/steps-repository/goals/select-goals.tsx
Outdated
Show resolved
Hide resolved
client/landing/stepper/declarative-flow/internals/steps-repository/goals/goals.tsx
Show resolved
Hide resolved
Write = 'write', | ||
Sell = 'sell', | ||
Build = 'build', | ||
DIFM = 'difm', // "Do It For Me" | ||
WpAdmin = 'wpadmin', |
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.
Nit: Not sure if this should be WPAdmin
, wpAdmin
or WpAdmin
. All 3 use cases seem to exist across different codebases.
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.
Relooking this PR with fresher eyes and more focus on the routing part, there are some routing issues that need to align more to the flow on whimsical.
case 'intent': | ||
return navigate( isEnabled( 'signup/site-vertical-step' ) ? 'vertical' : 'intent' ); | ||
return navigate( | ||
isEnabled( 'signup/site-vertical-step' ) ? 'vertical' : intentCaptureStep | ||
); |
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.
Given that this context is under goBack()
, something feels off here.
- When the current step is
intent
, we know that this is a version of the onboarding flow that doesn't have Goals Capture, and therefore replacingintent
withintentCaptureStep
is likely incorrect, asintentCaptureStep
could be eitherintent
orgoals
. - Goals Capture will be the first step, Verticals is the second step, so a case for handling go-back flow when
vertical
is the second step is likely needed.
case 'intent':
return navigate( isEnabled( 'signup/site-vertical-step' ) ? 'vertical' : 'intent' );
case 'vertical':
// the latter part of is something I'm unsure of
return navigate( isEnabled( 'signup/goals-step') ? 'goals' : 'vertical' );
case SiteIntent.Write: | ||
case SiteIntent.Sell: | ||
return navigate( 'options' ); | ||
case SiteIntent.Build: | ||
return navigate( 'designSetup' ); |
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.
If V13N is enabled, this should first route to the Verticals step. And after the Verticals step is completed, it should continue with the logic above. See more about post-verticals routing comment below.
If V13N is not enabled, where import flow should go is still a question that needs addressing.
case 'vertical': { | ||
return navigate( 'intent' ); | ||
return navigate( intentCaptureStep ); | ||
} |
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.
Under the scenario where both GC + V13N are enabled, it should:
- Check if the goal
import
is selected, and route to Import flowimport
. - Check if the intent is
write
orsell
, then route to Write/Sell flowoptions
. - Else if the intent is
build
, then route to Build flowdesignSetup
.
Can't wrap my headspace around this at the moment, but double-check for possible scenarios like:
- No V13N
- V13N only
- GC with V13N
- GC only (without V13N)
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.
What about the difm
goal/intent was selected? Do we still go through vertical
step? And then, only after, exit out to /start/website-design-services/?siteSlug=${ siteSlug }
? Or we skip the vertical
step then and exit out directly from goals
capture screen?
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.
After reviewing the flow routing issues, I think those mentioned issues need to be addressed before the PR can be merged.
Or split the site-setup-flow.ts
changes to another PR, and address other issues in the comments above in other smaller PRs.
c1f6ee4
to
0778c09
Compare
Continue
button to goals capture screen and its navigation flowContinue
button in goals capture screen
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 a lot! Let's roll it in.
Proposed Changes
Continue
button to goals capture screenBefore (Desktop and Mobile)
No
Continue
button atGoals capture
step screen.After (Desktop and Mobile)
Continue
button is present.Testing Instructions
config/development.json
setsignup/goals-step
property totrue
wp-calypso
locally.http://calypso.localhost:3000/setup/goals?siteSlug=<YOUR SITE'S ADDRESS HERE>
, e.g.: http://calypso.localhost:3000/setup/goals?siteSlug=blajh198278453.wordpress.comContinue
button being displayed.Related to #63921