-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix onboarding status refacto #6533
Conversation
c907134
to
f61f9dc
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.
PR Summary
The pull request focuses on refining the onboarding process by renaming methods and adding conditional checks to ensure consistency and clarity.
- Renamed Method: Updated method name from
setOnboardingCreateProfileCompletion
tosetOnboardingCreateProfilePending
across multiple files for consistency. - Conditional Check: Added a check in
packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts
to set the 'create profile pending' variable only if bothfirstName
andlastName
are empty. - Onboarding Initialization: Modified
packages/twenty-server/src/database/commands/upgrade-version/0-23/0-23-backfill-new-onboarding-user-vars.ts
to set onboarding variables for users in workspaces with aPENDING_CREATION
status. - Listener Update: Adjusted
packages/twenty-server/src/engine/core-modules/workspace/workspace-workspace-member.listener.ts
to reflect the renamed method, ensuring consistency in event handling.
4 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
workspaceId: workspace.id, | ||
value: true, | ||
}); | ||
if (firstName === '' && lastName === '') { |
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 don't think this is actually right anymore, we should always show the create profile popin, it is prefill with currentInformation
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.
This is how onboarding worked before the optimisation. When login with google sso, first name and last name are already filled at user creation, so there is no particular reason to display the create profile modale in that case
...-server/src/database/commands/upgrade-version/0-23/0-23-backfill-new-onboarding-user-vars.ts
Show resolved
Hide resolved
workspaceId: workspace.id, | ||
value: true, | ||
}); | ||
if (firstName === '' && lastName === '') { |
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.
same
@martmull @charlesBochet Merging to avoid increasing the stock of PR while many are away. I agree "firstname === ''" doesn't seem very clean but it makes sense to skip profile creation when going through Google. OK for me to merge like as I don't have something better to offer |
see comments in #6531 (review)