Skip to content
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

Merged
merged 2 commits into from
Aug 7, 2024
Merged

Conversation

martmull
Copy link
Contributor

@martmull martmull commented Aug 4, 2024

see comments in #6531 (review)

  • rename method
  • add check before setting create profile pending user var

@martmull martmull force-pushed the fix-onboardingStatus-refacto branch from c907134 to f61f9dc Compare August 4, 2024 21:03
@martmull martmull marked this pull request as ready for review August 4, 2024 21:09
Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 to setOnboardingCreateProfilePending 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 both firstName and lastName 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 a PENDING_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 === '') {
Copy link
Member

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

Copy link
Contributor Author

@martmull martmull Aug 5, 2024

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

workspaceId: workspace.id,
value: true,
});
if (firstName === '' && lastName === '') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@FelixMalfait FelixMalfait self-assigned this Aug 7, 2024
@FelixMalfait
Copy link
Member

@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

@FelixMalfait FelixMalfait merged commit 10817c5 into main Aug 7, 2024
5 of 6 checks passed
@FelixMalfait FelixMalfait deleted the fix-onboardingStatus-refacto branch August 7, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants