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

User Onboarding Flow #90

Merged
merged 25 commits into from
Feb 4, 2025
Merged

User Onboarding Flow #90

merged 25 commits into from
Feb 4, 2025

Conversation

RishikeshNK
Copy link
Collaborator

@RishikeshNK RishikeshNK commented Oct 27, 2024

Description

Adds a user onboarding flow to force the user to create a profile.

Please read this before reviewing:

  • Please, please, please 🎵 DESTROY this PR in code review
  • The onboarding flow can be initiated by wrapping any layout with the OnboardingWrapper component
    • I have to do some more research to make sure that this doesn't cause re-render hell / we don't fetch the user profile every second
    • Future Rishi: yes I was right there is a re-render problem caused by fetching companies and roles ...
  • Currently, the "Take me there!" button after finishing onboarding (and saying that you have finished a co-op) does not work. It only closes the dialog for now but ideal behavior is to close the dialog and open the "+ New Review" dialog.
    • Will have to think about this one for a bit since I couldn't find an elegant way of triggering that (it sits in the header).
  • The design is almost the same as the one on the Figma
  • except the Yes/No field for previous co-ops. I will open a separate PR for that but this onboarding flow should be functional.
    • Tailwind lover banushi-a fixed this <3
    • I also made it responsive in the meantime
  • Dialog closes and doesn't save state when you browse to a different page / switch windows.

For Testing:

  • Testing using the Vercel Preview
    • Delete any user profile associated with your account from the "production" database (on Vercel)
    • Go to the latest Vercel Preview
    • Sign In using the button on the top right
    • Go to /roles / /companies and confirm that the onboarding flow is initiated
    • Finish the onboarding flow in both cases: said "Yes" to previous co-ops and said "No" to previous co-ops.
  • Testing locally
    • Same as above but you'll (hopefully 🤨) be using a development Neon database
    • Delete any profiles from this database (Use Drizzle studio using pnpm db:studio
    • I would recommend doing a pnpm build instead of pnpm dev since it will take a hot sec for the onboarding flow to appear if you run it in dev mode.

Motivation and Context

Closes #88

How has this been tested?

With me eyes (no but fr will add frontend unit and e2e tests after showcase)

Screenshots (if appropriate):

Signed In User w/ No Profile
image

Post Onboarding Prompt - Has done a co-op before
image

Post Onboarding Prompt - Has not done a co-op before
image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • I have moved the ticket to "In Review"
  • I have added reviewers to this PR
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

vercel bot commented Oct 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cooper ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 3, 2025 0:03am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cooper-auth ⬜️ Skipped (Inspect) Feb 3, 2025 0:03am
cooper-docs ⬜️ Skipped (Inspect) Feb 3, 2025 0:03am

@vercel vercel bot temporarily deployed to Preview – cooper-auth October 27, 2024 02:13 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-docs October 27, 2024 02:13 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper October 27, 2024 02:14 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-docs October 27, 2024 18:40 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-auth October 27, 2024 18:40 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper October 27, 2024 18:41 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-docs November 21, 2024 13:14 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-auth November 21, 2024 13:14 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper November 21, 2024 13:15 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-docs November 27, 2024 20:37 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-auth November 27, 2024 20:37 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper November 27, 2024 20:38 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-docs November 28, 2024 11:01 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-auth November 28, 2024 11:01 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper November 28, 2024 11:02 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-auth November 28, 2024 11:29 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper November 30, 2024 00:25 Inactive
Copy link
Contributor

@gpalmer27 gpalmer27 left a comment

Choose a reason for hiding this comment

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

LGTM

@vercel vercel bot temporarily deployed to Preview – cooper-auth February 1, 2025 00:25 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-docs February 1, 2025 00:25 Inactive
const [cooped, setCooped] = useState<boolean | undefined>(undefined);
const profile = api.profile.create.useMutation();

const user = api.user.getById.useQuery({ id: userId });
Copy link
Contributor

Choose a reason for hiding this comment

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

@RishikeshNK why is this not working i'm going to rip my hair out

@vercel vercel bot temporarily deployed to Preview – cooper February 1, 2025 00:27 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-docs February 1, 2025 16:38 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-auth February 1, 2025 16:38 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper February 1, 2025 16:39 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-auth February 1, 2025 16:40 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-docs February 1, 2025 16:40 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper February 1, 2025 16:41 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-auth February 1, 2025 16:43 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-docs February 1, 2025 16:43 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper February 1, 2025 16:44 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-docs February 2, 2025 15:06 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-auth February 2, 2025 15:06 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper February 2, 2025 15:07 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-docs February 3, 2025 00:02 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-auth February 3, 2025 00:02 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper February 3, 2025 00:03 Inactive
@banushi-a banushi-a merged commit 8683211 into main Feb 4, 2025
8 checks passed
@banushi-a banushi-a deleted the onboarding branch February 4, 2025 15:56
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.

Create onboarding form
3 participants