Closed razvanpapadopol closed 2 years ago
Note to self on next steps, after some investigation today:
Refactor the hooks without changing functionality:
createSite
function out of the useOnLogin
and useOnSignup
hookscreateSite
function as a callback to the hooksIntroduce the "Use a domain I own" button for logged out users
useOnLogin
and useOnSignup
hooksSteps 1 and 2 should probably happen in 2 separate PR, to facilitate the review process
Idea for handling Calypso Login success: pass the URL (/start/domains/use-your-domain?source=${ window.location.href }
) to SignupForm and use it at https://github.com/Automattic/wp-calypso/blob/trunk/client/landing/gutenboarding/components/signup-form/index.tsx#L193
What
Add the option to redirect to the existing
use-your-domain
flow on DomainStep in New onboarding for new (logged-out) users.Why
Allow users to create wp com sites using their own domain
A/C
use-your-domain
flowHow
Refactor useOnLogin and useOnSignup hooks to stop creating the site by default at signup/login and do any action set by the Gutenboarding app.
Examples of such actions:
use-your-domain
when used in DomainStep/new
flow after Login / SignupBasically we currently have
createSite
as theaction X
in the diagram below and we want it to be a configurable action.Additional context PR that added this feature for existing users (already logged-in): https://github.com/Automattic/wp-calypso/pull/48692 Main issue: https://github.com/Automattic/wp-calypso/issues/44645