-
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
Remove design picker from site-setup flow #97540
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
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 |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~548 bytes added 📈 [gzipped])
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. Generated by performance advisor bot at iscalypsofastyet.com. |
I'm curious why do we need to redirect to the site-setup flow after the onboarding in the "goals first" experiment? |
According to this comment #97383 (comment) it's so that we can reuse the flow for theme activation. Perhaps we can use another flow for this, like /with-theme? |
@arthur791004 the issue is that we need somewhere to apply the design to the site. @taipeicoder I'll take a look into the |
There is another flow called |
Oops...I misclicked the "Ready for review" 😓 |
Is there a step that does the theme activation? If so, would bringing that step to /setup/onboarding work better? |
|
||
return setDesignOnSite( siteSlugOrId, selectedDesign, { | ||
styleVariation: selectedStyleVariation, | ||
globalStyles: {}, |
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.
@arthur791004 to hack things together and get it working we just passed an empty object here for globalStyles
. It works, but I'm not sure why or whether this is a problem.
The design picker passes a proper globalStyles
object here, but the data is loaded very indirectly, so I don't know the easy way to pass the global styles in here.
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 empty object{}
will clear the user's global styles on the selected theme because people may come from the existing sites.
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...the preselected global styles can be loaded via query parameters but it needs to go through the Design Preview step to load the data...
I think we can address this in the follow-up PR.
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.
I tried to see if things would work by changing this to use selectedGlobalStyles which is now loading from the store but it's not loading, would need more investigation for this.
We don't have this step because the theme activation should happen when people finish the flow. If we activate the theme immediately, we have to do it again when people go back to the Design Picker.... |
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.
Let's go 🚢
955b414
to
d04f02e
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.
Getting the globalStyles
and styleVariation
still needs to be worked in a follow-up PR, but this is good to 🚢 to keep things going.
|
||
return setDesignOnSite( siteSlugOrId, selectedDesign, { | ||
styleVariation: selectedStyleVariation, | ||
globalStyles: {}, |
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.
I tried to see if things would work by changing this to use selectedGlobalStyles which is now loading from the store but it's not loading, would need more investigation for this.
Related to #97383
Proposed Changes
Builds on the changes in #97383 which moves the design picker to the
onboarding
flow.In the "goals first" experiment:
site-setup
flow other than those needed for processingsite-setup
flow, queues a processing job to apply the selected design to the selected siteuseSideEffects
hook is mostly a copy-paste from the unified design picker's click handler:wp-calypso/client/landing/stepper/declarative-flow/internals/steps-repository/design-setup/unified-design-picker.tsx
Line 644 in 955b414
CleanShot.2024-12-17.at.19.16.16.mp4
You still can't test premium themes/variations because this modal still blocks the user from moving forward. That can be removed in another PR.
Why are these changes being made?
For free sites with free themes it just needs to happen after site creation. It strikes me now that if a user chooses free everything we can do it in the onboarding flow before redirecting to /home
For paid themes, we need to be sure the user successfully completed checkout before we apply the design. That's why it has to be in a separate flow after the checkout.
This PR implements the separate flow, since that works for free and paid. But skipping the extra flow for free sites seems like a nice bit of polish.
Testing Instructions
/setup/onboarding
flow/start
flow hasn't changed! The/start
flow eventually lands in thesite-setup
flow and it needs to still have the goals and design picker step working as expectedPre-merge Checklist