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

feat: availability page functionality #85

Merged
merged 31 commits into from
May 10, 2024

Conversation

KevinWu098
Copy link
Member

@KevinWu098 KevinWu098 commented Apr 15, 2024

Summary

  1. Fully incorporates Login Modal into the availability page
  2. Signed-in users can create and update availabilities
  3. Guest users can be created and edit their availability (until they reload, or otherwise lose their current session)

Testing Plan

  1. Create a meeting (example given in databaseUtils.server.ts) -- feel free to test dates/times other than the one I listed, but some values are hardcoded (start and end times), so ymmv
  2. Go to /auth and create a user
  3. Logout of account
  4. Go to /availability/[YOUR_MEETING_ID_FROM_ABOVE]

Login Modal Flow

  1. Select availability
  2. Click save (cancel is not working, currently)
  3. Auth Modal pops up

Authed User

  1. Login with an account
  2. Auth Modal closes
  3. Availability saves
  4. Confirm that availability is saved by refreshing the page (or check DB)

Guest User

  1. Choose a guest name and click save
  2. Modal closes
  3. Availability saves
  4. Confirm availability is saved by going to availabilityStore.ts and setting the value of guestSession.guestName to whatever name you choose above
  5. Availability should render in (click on calendar to forcibly trigger rerender)

Future Followup

  1. Currently, if a username has already been chosen, users cannot use that name in the login flow.
  • For now, I've defaulted to this behavior allowing a guest to sign in again (load in their previous schedule) through the LoginModal
  • As @MinhxNguyen7 suggested, we can offer users the ability to either load in their prior availability or to overwrite their existing availability
  1. Cancel button
  • The cancel button isn't working right now, which is possibly related to # 3
  • Currently, when clicked, we grab the DB's availability and (hopefully) replace/bring back the pre-edit availability
  1. Rendering the availability from the store
  • For some reason, the calendar component does not render in the values from the store all at once, often only rendering in availabilities for the first column
  • This requires a user input to forcibly rerender the component and display the current availabilities, which, to reiterate, are written to the store all at the same time (so why is it not rendered at the same time?)

@KevinWu098 KevinWu098 temporarily deployed to staging-85 April 15, 2024 23:53 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 temporarily deployed to staging-85 April 16, 2024 04:53 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 temporarily deployed to staging-85 April 16, 2024 06:39 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 temporarily deployed to staging-85 April 17, 2024 05:16 — with GitHub Actions Inactive
@KevinWu098
Copy link
Member Author

Note: Use some byte (0, 1) string in database instead of true, false

@KevinWu098
Copy link
Member Author

note: add in guest stuff here, move group availability to followup

@KevinWu098 KevinWu098 closed this Apr 22, 2024
@KevinWu098 KevinWu098 temporarily deployed to staging-85 April 22, 2024 22:01 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 reopened this Apr 22, 2024
@KevinWu098 KevinWu098 temporarily deployed to staging-85 April 22, 2024 22:04 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 temporarily deployed to staging-85 April 22, 2024 22:26 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 force-pushed the kw/74-availability-page-functionality branch from 83a8b14 to 45d0aec Compare April 22, 2024 22:38
@KevinWu098 KevinWu098 temporarily deployed to staging-85 April 22, 2024 22:40 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 temporarily deployed to staging-85 April 29, 2024 22:16 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 temporarily deployed to staging-85 April 30, 2024 09:38 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 temporarily deployed to staging-85 May 6, 2024 18:45 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 temporarily deployed to staging-85 May 6, 2024 19:39 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 temporarily deployed to staging-85 May 6, 2024 19:54 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 temporarily deployed to staging-85 May 6, 2024 19:55 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 requested a review from seancfong May 6, 2024 20:01
@MinhxNguyen7
Copy link
Member

I think the deployment doesn't work because it's not up to date with what's on main

Copy link
Member

@seancfong seancfong left a comment

Choose a reason for hiding this comment

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

Looks good to me. I'll go merge this in now to unblock other issues.

@seancfong seancfong temporarily deployed to staging-85 May 6, 2024 22:29 — with GitHub Actions Inactive
@seancfong
Copy link
Member

@KevinWu098 Merging to main is blocked because of failing deployment. It might be because of the schema revert in 89a751c.

Can you change zotMeet.table to pgTable in src/lib/db/schema.ts? You can also look at the action log to see if anything else might be causing the issue.

@KevinWu098 KevinWu098 temporarily deployed to staging-85 May 7, 2024 03:35 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 temporarily deployed to staging-85 May 7, 2024 03:45 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 requested a review from seancfong May 7, 2024 03:48
@seancfong seancfong requested review from MinhxNguyen7 and removed request for seancfong May 7, 2024 20:47
@seancfong
Copy link
Member

@MinhxNguyen7 Requesting review since I made a commit on this branch

Copy link
Member

@MinhxNguyen7 MinhxNguyen7 left a comment

Choose a reason for hiding this comment

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

Your merge looks good to me @seancfong. That's the extent of my review.

@seancfong seancfong merged commit cd42556 into main May 10, 2024
2 checks passed
@seancfong seancfong deleted the kw/74-availability-page-functionality branch May 10, 2024 19:41
@MinhxNguyen7
Copy link
Member

🎉

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