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

Export to Calendar (URL) #126

Merged
merged 84 commits into from
Sep 9, 2023
Merged

Export to Calendar (URL) #126

merged 84 commits into from
Sep 9, 2023

Conversation

diogogmatos
Copy link
Member

@diogogmatos diogogmatos commented Sep 4, 2023

Added the very requested feature of exporting Calendarium events to a external calendar app, like Google Calendar. After discussing with @RuiL1904 we came to this way of doing it. By using the subscribe to calendar or add from url features of Google Calendar, Apple Calendar, etc. we can make our app send a .ics (iCal) file in response to a certain request on a certain path, the external calendar app will read and parse that file, importing all the events included on it. The external calendar app will also periodically check for updates on this events, so they are dynamic and will be updated on people's calendars according to the changes we make.

For this I created an API for events and for schedule that is able to receive and respond to requests with different query parameters, that define what subjects the user wants to see events from or which shifts he wants to see on his schedule. Side by side with this was also created the appropriate front-end to support this. Selecting Export > Calendar a new Modal will appear with relevant information about how to subscribe to the calendar and how it works, but most importantly it automatically generates a calendar URL with the query parameters in accordance with the unique user's options.

@netlify
Copy link

netlify bot commented Sep 4, 2023

Deploy Preview for cesium-calendarium ready!

Name Link
🔨 Latest commit 021998a
🔍 Latest deploy log https://app.netlify.com/sites/cesium-calendarium/deploys/64fcc451ee1d130009c0666d
😎 Deploy Preview https://deploy-preview-126--cesium-calendarium.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@diogogmatos diogogmatos marked this pull request as draft September 4, 2023 22:46
pages/api/export.tsx Outdated Show resolved Hide resolved
pages/api/export.tsx Outdated Show resolved Hide resolved
pages/api/export.tsx Outdated Show resolved Hide resolved
components/ActiveLink/ActiveLink.tsx Show resolved Hide resolved
components/Sidebar/Sidebar.tsx Outdated Show resolved Hide resolved
pages/api/export.tsx Outdated Show resolved Hide resolved
@diogogmatos diogogmatos marked this pull request as ready for review September 7, 2023 18:30
@diogogmatos diogogmatos self-assigned this Sep 7, 2023
@diogogmatos diogogmatos added the enhancement New feature or request label Sep 7, 2023
@diogogmatos diogogmatos changed the title Export to Calendar (ICS) Export to Calendar (URL) Sep 7, 2023
Copy link
Member

@ruilopesm ruilopesm left a comment

Choose a reason for hiding this comment

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

What about a section on the README.md explaining which endpoints the API supports while providing a few a examples for each one? 🙏🏼

Copy link
Member

@ruilopesm ruilopesm left a comment

Choose a reason for hiding this comment

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

image
Not having margins, makes it a little weird imo (tested on mobile).

@diogogmatos
Copy link
Member Author

@RuiL1904 Implemented your suggestions 🙌

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
diogogmatos and others added 2 commits September 9, 2023 20:15
Co-authored-by: Rui Lopes <[email protected]>
Co-authored-by: Rui Lopes <[email protected]>
Copy link
Member

@ruilopesm ruilopesm left a comment

Choose a reason for hiding this comment

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

Great work! 🚀

@ruilopesm ruilopesm merged commit 67fe6d2 into master Sep 9, 2023
5 checks passed
@ruilopesm ruilopesm deleted the dm/ics branch September 9, 2023 20:29
@diogogmatos diogogmatos mentioned this pull request Oct 9, 2023
diogogmatos added a commit that referenced this pull request Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants