Skip to content

Conversation

@brelieu05
Copy link
Contributor

Summary

Implemented Schedule Link Sharing

  • User can share their schedule with a link
    • Currently, the sharing param is the db schedules UUID
  • When the user opens the share link, they see the schedule, but it's only temporary and if they refresh it will disappear
    • User can press the normal save button to add it as a permanent schedule
    • It loads the user's schedule first -> adds + switches to shared schedule
  • If invalid share link, snackbar will notify user so
image image image image image

Test Plan

Issues

How should I handle the multiple snackbars? Just one after everything loads or keep two to indicate when account schedules have loaded and when shared schedule has loaded? since they're separate things

Closes #1346

Copy link
Member

@KevinWu098 KevinWu098 left a comment

Choose a reason for hiding this comment

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

I haven't read the code deeply, but I'll share a few thoughts/feedback before doing a deeper read later

  1. Feature is definitely cool
  2. the mergeShortCourseSchedules breaks because it adds a (1) so adding a shared schedule "Foo" becomes "Foo (1)" if the receiving user has another schedule named "Foo"
  3. Anytime we ask someone to sign in, we should make it easy for them — give them a button
  4. We should be more clear that this is a static copy
  5. Relating to #4... do we have to be a static copy? 🌚

@KevinWu098 KevinWu098 linked an issue Dec 14, 2025 that may be closed by this pull request
@brelieu05 brelieu05 requested a review from alexespejo December 27, 2025 01:51
@brelieu05
Copy link
Contributor Author

Created new and separate Shared Schedule page

  • User can add to schedules list
  • Fixed shared schedule naming
  • Notify user if link is invalid or expired
  • Links will expire if the original sender resaves and thus changes id

Copy link
Collaborator

@alexespejo alexespejo left a comment

Choose a reason for hiding this comment

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

  1. I hate to be that guy but is there a way for you to consolidate the git diff so it only shows the file changes you made. If it's too much of a hassle it's whatevs we'll figure it out.

  2. Also can you restore the merge conflicts (resolving them might resolve the git diff issue) and may fix the staging deployment which seems to be breaking

image

@brelieu05
Copy link
Contributor Author

holay molay my bad

@brelieu05 brelieu05 force-pushed the 1346-sharable-course-schedule-links branch from a2d14ee to b1ae03e Compare December 27, 2025 04:13
@brelieu05
Copy link
Contributor Author

brelieu05 commented Dec 27, 2025

With some cursor shenanigans, I think I was able to fix it

Also when are we playing aram

@brelieu05 brelieu05 requested a review from KevinWu098 December 27, 2025 04:14
@brelieu05 brelieu05 requested review from alexespejo and removed request for KevinWu098 December 27, 2025 04:14
@alexespejo
Copy link
Collaborator

Resolve merge conflict so the deployment can run, gracias

@brelieu05
Copy link
Contributor Author

I finally figured out what was causing all tests to not run, it has been fixed and staging works 🫶

Copy link
Collaborator

@alexespejo alexespejo left a comment

Choose a reason for hiding this comment

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

Haven't looked at code too indepth yet but some bugs 🐞:

  1. Unsaved changes
    Repro: Opening a shared link -> editing the schedule (removing/adding classes) -> "refresh" -> "accept unsaved changes" -> the changes persist

The user either should be locked out of changing the shared schedule or lock unsaved changes from triggering

  1. Design

    1. Small detail I think it would be nice to preview the schedule name in the drop down button so that there isn't just some empty space
    2. Maybe bold the name of the schedule being imported (e.g. "Viewing Shared Schedule: 2026 Winter)
image
  1. Sharing a deleted schedule id "breaks" the user's data

Repro: have two users open (1 and 2) -> (1) copy share link -> (1) edit and save the schedule -> (2) open the shared link -> recieve error message -> hit "go home" -> the user's data should appear empty

Refreshing the page will fix the schedule but it would be offputting the the user to think their data has been wiped

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.

Sharable Course Schedule Links Suggestion: View Friends' Schedules

4 participants