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

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

User Onboarding Flow #90

wants to merge 18 commits into from

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.
  • 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 Out User
image

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 Nov 30, 2024 0:25am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cooper-auth ⬜️ Skipped (Inspect) Nov 30, 2024 0:25am
cooper-docs ⬜️ Skipped (Inspect) Nov 30, 2024 0:25am

@vercel vercel bot temporarily deployed to Preview – cooper-auth November 28, 2024 11:29 Inactive
@vercel vercel bot temporarily deployed to Preview – cooper-auth November 28, 2024 20:34 Inactive
@RishikeshNK RishikeshNK changed the title [WIP] User Onboarding Flow User Onboarding Flow Nov 28, 2024
Copy link
Contributor

@banushi-a banushi-a left a comment

Choose a reason for hiding this comment

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

if the shoe fits

heading,
subheading,
buttonText,
onClick,
Copy link
Contributor

Choose a reason for hiding this comment

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

So would it be crazy to pass a button as a prop rather than text and onClick. Then maybe if we are feeling lazy we can just reuse the new-review-dialog for the meantime

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

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