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

Add Download as ics option #137

Merged
merged 3 commits into from
Mar 2, 2021
Merged

Add Download as ics option #137

merged 3 commits into from
Mar 2, 2021

Conversation

ChaseC99
Copy link
Member

@ChaseC99 ChaseC99 commented Feb 25, 2021

Summary

Users can now download their schedules as an .ics file. This allows them to import a schedule into their calendar app.
Currently only the class schedule is include in the download. Finals and Custom Events will be added later.
image

Test Plan

  • Create a variety of schedules
  • Include various types of courses such as
    • AM and PM courses
    • Courses that start AM and end PM
    • Weekend courses (03095)
    • Overlapping courses
  • Attempt to download the schedules
  • Verify that the .ics file correctly imports to gcal and apple calendars

Future Followup

This commit allows users to download their schedules as a .ics file.
Note: this does not yet include Final Exams or custom events
@ChaseC99
Copy link
Member Author

ChaseC99 commented Feb 25, 2021

I wanted to get this PR out asap but there are a still a few things that need to be done before it is ready to merge.

  • Include Final Exams and Custom events
  • ✅ Handle classes that occur on Saturday and Sunday
    • ✅ One example of a Saturday class is Drama 100. Sunday class is course code 03250
  • More testing! Make sure everything is working properly. I am very tired and haven't had time to test everything that I want.
    • What does this code do when a class's time is TBA? Hopefully doesn't break lol
    • Upload to google calendar
    • Verify that different schedules under the same username download properly
  • ✅ Known bugs
    • parseTime
      • ✅ Just realized am classes don't have an 'a' on the end of the time. parseTime will return the wrong result.
      • ✅ For classes that start before noon but end after noon, parseTime will return the wrong result.

@ChaseC99
Copy link
Member Author

Closes #109

@ChaseC99 ChaseC99 linked an issue Feb 25, 2021 that may be closed by this pull request
- Fix bug in parseTime where classes that start AM and end PM got all messed up
- Display calendar in local time. This fixes a bug with weekend classes but also means the time will be wrong for those outside of PST (less than 3% of users).
- Added support for Saturday/Sunday classes
@ChaseC99 ChaseC99 changed the title [WIP] Add Download as ics option Add Download as ics option Feb 27, 2021
@ChaseC99
Copy link
Member Author

I think this is ready for review now! Although Finals and Custom Events haven't been implemented yet, the ability to download a class schedule is completed.

I figured we might want to get this out now since people are registering for classes. We can always finish up finals and custom events later.

One thought, should I move all of those helper functions in ExportCalendar.js to a separate file or just leave them as is?

@devsdevsdevs
Copy link
Contributor

Reviewed all thus far, looking beautiful. Will merge soon ™️ . Comment when ready for re-review and second merge.

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.

Export as .ICS
2 participants