-
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 first: Reset onboard store when entering the flow #97936
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~83 bytes removed 📉 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~545 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. Async-loaded Components (~101 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. |
@paulopmt1 reported a problem with the approach (p1735915114483079-slack-C04H4NY6STW), so I piggybacked on @candy02058912's idea of clearing up the step persisted state. This should be good to go 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.
Work as intended. Shared a full review here: p1736002952764819/1735915114.483079-slack-C04H4NY6STW
My main concern as a follow-up is to ensure the .wordpress.com
domain suggestion always shows up as the first time we go through the flow.
Thanks for working on it @zaguiini and @candy02058912 !
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 testing and talking in p1736137453158579/1735915114.483079-slack-C04H4NY6STW I think it's ok to move the reseting of the onboarding state to the front of the 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.
Also, go through the flow with a paid domain and leave the cart while keeping the domain there. Enter /setup/onboarding and verify that the paid domain is preselected.
Domain is preseleted.
But the price isn't 0 with the "Free for the first year with annual paid plans." description. Also, the price doesn't match the regular price.
demo.mp4
Don't think that's a blocker for merging this PR as the amount in the checkout cart is still correct. (Free domain with an annual plan selected)
c5ee77d
to
1742c4c
Compare
That's fair @candy02058912 , here it is: 1742c4c
The weird thing is if I go back to the design setup step and skip to domains again, it works 🤷🏻 Here's a fix that makes the free wpcom domain show up: 82c9bd8 cc @alshakero let me know if there's a better solution for this problem. @p-jackson @vykes-mac, feel free to add the site setup onboard reset as a commit to this PR 👍🏻 |
...pper/declarative-flow/internals/steps-repository/unified-domains/use-is-managed-site-flow.ts
Outdated
Show resolved
Hide resolved
For reference, team testing discussed here: p1736205027317489/1736196927.663189-slack-C085HCWCEDN |
wasSignupCheckoutPageUnloaded() && | ||
signupDestinationCookieExists && | ||
isReEnteringFlow && | ||
getSignupCompleteSlug() |
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've added this check because further on (in the createSite
function), if isManageSiteFlow
is true
then we go ahead an use the signup complete slug, just assuming that it will be valid. So we shouldn't really go into that branch unless we also know the signup complete slug is valid.
This was causing an issue where if the user went back and made another site using the onboarding flow a 2nd time, isReEnteringFlow
so it didn't think it had to create a site. But we don't have a site slug, we really do need to create a site.
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 |
Shared testing creating two sites here: p1736224151854289/1736196927.663189-slack-C085HCWCEDN Let's 🚢 |
…)" This reverts commit 9aae00e.
Closes #97887.
Proposed Changes
Title. We're keeping the domain selection information as it is in case the user wants to create a new site with their previously selected domain (that they haven't bought.)
Why are these changes being made?
Because right now it's impossible to create two sites through
/setup/onboarding
.Testing Instructions
Enter
/setup/onboarding
and create a site. Enter the flow again and create a second site. You should end up with two sites.On
trunk
, the user is getting redirected to/sites
after trying to create the second site.Also, go through the flow with a paid domain and leave the cart while keeping the domain there. Enter
/setup/onboarding
and verify that the paid domain is preselected.