-
Notifications
You must be signed in to change notification settings - Fork 236
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
Easily add holidays #962
Comments
I would really like to ship holiday calendars, but the biggest problem is: Where to get the data from? It should be obvious that we can’t copy and paste the Google Holiday calendars for copyright reasons. @ryanprior Are you aware of any database that offers holiday data under a free (foss) license? |
Wikimedia Commons has your back, with holiday data covering the globe and dozens of cultures, all under Creative Commons Attribution-ShareAlike:
Just doing this research is making clear to me the enormity of this task. It seems like massaging all this into a query-friendly format would be an undertaking all by itself. Possibly if we reach out to Wikimedia they might know somebody who has already done this? I'm also aware that libraries often have query-friendly databases that they share with people. I'll ask a librarian if they have further ideas and report back here. Another thing worth pointing out is that this problem can be significantly collapsed: building holiday support for a few locales could cover most of NextCloud's user base and simultaneously lay the groundwork for global coverage once the appropriate comprehensive database is made available. |
So it's basically unusable until the data is filled into Wikidata or someone finds an existing tool to scrape it from Wikipedia. :/ |
At least more usable than scraping from Google Calendar. I'm investigating to see if there's a convenient option that already exists. |
There is a large collection of national holiday calendars for Lightning on the Mozilla site. The ICS file can be dowloaded or added as an online calendar subscription. I have just downloaded and imported into Nextcloud the ICS holiday file for the Netherlands (contains holidays up to the year 2050), and this works fine. Theoretically it might be preferable to have an "internal" Nextcloud solution, but why reinvent the wheel? |
Thanks for the link! The issue is that there's no way to link to a specific ICS file from the information we have (language, locale). So there's multiple options:
Moreover these calendars don't seem to have school holiday informations (at least for France) and specific public holidays for some regions. |
I probably should have emphasized that this is a rather crude workaround until something better can be arranged. Regarding school vacations, I appreciate that might be useful info, but seems to me it belongs in a separate calendar from national holidays. Also, I don't know how they are planned in France, but here in NL the start and end dates are now staggered geographically and rotated every year to reduce congestion. It might not be possible to "program" such a calendar very far in the future, at least in this particular case. It might be an idea to alert the Thunderbird/Lightning team to the fact that these calendars are useful for other applications as well, and look into creating some kind of simple interface for retrieving them. |
Incremental steps in this direction are a good idea. In order of fanciness, we could:
Each one of those steps that we take brings an incrementally better experience for our users. This is an area where our interests are aligned with the Mozilla Lightning folks and we should take advantage of that in any way we can, whether that means linking to them, consuming their webcal feeds automatically, or using the same backing data in our own native approach. Reaching out to them seems like a good idea- @cbrace will you open a line of communication and link to the discussion here so people can follow? |
Done! I posted here: https://discourse.mozilla.org/t/holiday-calendars-useful-resource/39993 In an earlier life I worked as a technical writer, and I would be happy to lend a hand with a help page, if pointed in the right direction. |
@cbrace That would be really great! Contributing to our documentation is really easy. Just fork our documentation repo, edit this rst file and send a pull request. Once it's merged, our online documentation will automatically be updated within minutes. |
@georgehrke Done! This is my first pull request on Github, so I hope I did it correctly. One thing I wasn't sure about is whether importing calendars from file is available for all users, or whether it can be disabled by an admin. I believe it is possible to subscribe to the calendars published on the thunderbird site rather than downloading and importing. I could test this and add it if people think it is a good idea. (I prefer to import myself) |
Resource from KDE: https://cgit.kde.org/kholidays.git/tree/holidays/plan2 The source from KDE seems more reliable than Mozilla. Ideally this should be implemented as an individual app registering its own calendars. |
For reference: nextcloud/server#17126 |
On KHolidays, I maintain the holidays for Mauritius (https://github.com/KDE/kholidays/blob/master/holidays/plan2/holiday_mu_en). How can I help to maintain the same here, if any? |
Hi @nadimattari, thanks for volunteering to help maintain Nextcloud! @georgehrke is working on an addition to the Nextcloud framework that will allow applications to add dates to the calendar. Then we can create a Nextcloud app, perhaps based on the KDE calendar data, which can handle holidays. So if you're interested in getting involved with Nextcloud development, you could start building an app which assumes some as-yet-unspecified API for exposing calendar events, and pulls data from KDE repositories to do so. We could also use help finding or creating documentation for how to easily make use of KDE's holiday data without using the KDE framework, for example using PHP. Thanks again, we're glad to have you here! |
This comment has been minimized.
This comment has been minimized.
For those interested in this issue, I wanted to mention I created an app allowing to subscribe easily to various public holidays: https://apps.nextcloud.com/apps/holiday_calendars |
Can this app add custom link (e.g. google calendar ics) and share to some member? The default function in calendar add subscribe by link only for myself, I can't share the calendar to another person. Thank you. |
@tcitworld fyi we are planning to work on this and add a shortcut to Calendar to add subscriptions from https://www.thunderbird.net/en-US/calendar/holidays easily |
^ @nimishavijay @jancborchardt for design feedback. If there are bigger changes please provide us with a mockup :) |
Super nice! That looks great! :) No super major points of feedback, only some adjustments with spacing and formatting:
It could look like this: 2 nice-to-have follow up enhancements:
|
I'd also add a bottom line crediting Thunderbird as the source and explaining the calendar will be downloaded from their servers. |
@tcitworld agreed, nice catch! It can be a subline below the heading in |
@tcitworld do you recall the magic behind https://framagit.org/framasoft/nextcloud/holiday_calendars/-/blob/66873b114e3dbc42429a5e08fe9eba721d1b5382/src/services/caldavService.js#L83? In Calendar all subscriptions are found as calendars and they have no source property. I need the prop to disable the subscribe button for existing subscriptions. ✌️ It's strange how everything ends up in |
I noticed you're using |
I'm unable to get unsubscribe handling working. The calendar app fetches subscriptions as calendars. To detect already subscribed holiday calendars we have to fetch subscriptions separately. Mapping that together and keeping it in sync with new or removed subscriptions is not trivial. I'll save that for a follow-up ticket. For now a user can use the modal to subscribe to a holiday calendar. To unsubscribe they have to use the Delete action in the navigation. I say that is good enough. Edit: created #5168 |
That's right, only subscriptions expose the Would it be so bothering to refetch subscriptions (as such, with Webcal-Caching off) when opening the holiday modal? |
We'll have a look when working on #5168! |
There ought to be an easy, obvious interface to add a standard holiday calendar to your NextCloud.
In nextcloud/server#1363 the request was made to "make national holidays available in calendar" and this was implemented by allowing webcal subscriptions. That technically works but it has these drawbacks:
A way to resolve this is to provide a convenient interface for users to find a holiday calendar that's relevant to them and add it in a few clicks, without having to know about the implementation. Advantages of this approach:
Acceptance criteria
Work packages
Follow-ups
The text was updated successfully, but these errors were encountered: