[PoC] Allow apps to add their own collection to the calendar-home-set#6995
[PoC] Allow apps to add their own collection to the calendar-home-set#6995juliusknorr wants to merge 2 commits into
Conversation
|
cc @nickvergessen @georgehrke @schiessle as you recently commited to the dav app. 😉 |
|
I really like the idea of enabling apps to register their own calendars. I was looking forward to develop some GitHub Calendar app for a long time, that would automatically create VTODOs for your assigned issues and show VEVENTs for milestones of repositories that you are a collaborator of. But to be honest I'm not very sure about this approach. Do you have a PoC in the deck app that already integrates this? You only talked about DavDroid and Evolution so far. I would like to know if there are issues with clients like the Outlook caldav sync connector, iOS, macOS and Fantastical. Furthermore I see issues with not being able to share, publish (and most likely not being able to delete) such calendars. All the sharing / publishing logic would have to be reimplemented by each calendar-home. |
Codecov Report
@@ Coverage Diff @@
## master #6995 +/- ##
============================================
- Coverage 52.82% 52.81% -0.01%
- Complexity 22817 22831 +14
============================================
Files 1443 1443
Lines 88589 88608 +19
Branches 1349 1349
============================================
+ Hits 46795 46799 +4
- Misses 41794 41809 +15
|
I have a messy local branch, that by now works just read-only. I can clean that up and push it tomorrow, so you can have a look. It is basically a custom CalDavBackend and CalendarRoot implementation.
Those were the ones I have around. I don't have any iOS/MacOS device at the moment. But yes, i only davdroid is able to use multiple homes, then we should consider something different.
Another option might be to add some API that allows apps to extend the nextcloud calendars (either by injecting events or adding own calendars). I only started working on this PoC for now, since it seemed to be the simplest solution without interfering with the existing dav system to much. |
That would be great! I would be happy to test it with iOS/macOS/Fantastical
I'm really torn between those two concepts. Cons: Maybe the dav-app could allow calendar-homes to register their own sharing-types (like |
|
@georgehrke Here we go: https://github.com/nextcloud/deck/compare/dav Outlook CalDAV Synchronizer seems to support multiple calendar homes: aluxnimm/outlookcaldavsynchronizer#139 |
|
@juliushaertl You will be at the hackweek right? I checked out the deck branch, forced it to upgrade the appconfig, created a board and a card with a deadline, but yet I only see one calendar-home. |
|
My opinion on clients not knowing other |
…property This way apps providing a CalDAV collection can be found by clients looking for the calendar-home-set. Since some client implementations only check for the first entry in that set, we need to make sure that the calendars collection is at index 0. Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
0e85e3b to
bc8bccd
Compare
|
@georgehrke Yes, I'll be there on thursday. I just pushed a fix for this. It seems that when only requesting a single property, it somehow loaded the parent CalDAV plugin first. @tcitworld Yep good point, but we need to be sure that this doesn't break any existing caldav client. |
|
macOS only shows the first calendar-home-set Fantastical keeps crashing ever since I added the endpoint with multiple calendar homes ... Edit: I reported this bug to Fantastical and they have provided me with a patch, which I have yet to test. |
|
@georgehrke Great, thanks for testing and also reaching out to fantastical. I've updated the list in the first post with that information.
I'll need to have a more detailed look on the calendar sharing code to see if there might be an easy way to avoid each app building their own code there. |
|
Given how many calendars only show the first calendar home, we might want to consider different approaches. What do you think? |
|
@georgehrke Yes, actually makes sense to invest time into a different approach. Custom caldav endpoints can be implemented already, so adding the calendar to the home set is quite a small enhancement. Let's close this. I'll open a issue so we can discuss other implementation ideas. |
|
@juliushaertl What do you think about this alternative approach:
(Or have |

This way apps providing a CalDAV collection can be found by clients
looking for the calendar-home-set. Since some client implementations
only check for the first entry in that set, we need to make sure that
the calendars collection is at index 0.
This is as it is specified in RFC 4791 https://tools.ietf.org/html/rfc4791#section-6.2.1
Use case
With #6835 apps can register custom dav collections. For the https://github.com/nextcloud/deck I plan to implement an additional CalDAV endpoint, that exposes each board as a calendar. In order to let apps like davdroid detect existing calendars using the calendar-home-set, it should be possible for apps to extend this.
Client implementations
Clients that can handle multiple entries:
Clients that use only the first entry:
Clients that break:
I'm not sure if there are clients that will have problems with this implementation, but in general they should be fine, since the first entry will always be the Nextcloud default calendar set.
cc @nextcloud/calendar @nextcloud/tasks