-
Notifications
You must be signed in to change notification settings - Fork 241
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
WIP: Setting for default calendar when creating new events #2331
Conversation
Signed-off-by: Lukas Boersma <mail@lukas-boersma.com>
Signed-off-by: Lukas Boersma <mail@lukas-boersma.com>
Codecov Report
@@ Coverage Diff @@
## master #2331 +/- ##
============================================
- Coverage 27.60% 22.11% -5.49%
============================================
Files 145 138 -7
Lines 5297 4929 -368
Branches 798 804 +6
============================================
- Hits 1462 1090 -372
- Misses 3835 3839 +4
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LukasBoersma Thanks a lot for this PR. Looks good on the first look.
My only remark so far: We shouldn't store the default calendar in the calendar app itself, but in the dav app. We already have a config option for that in the server.
appId: dav
, configKey: defaultCalendar
https://github.com/nextcloud/server/pull/19852/files#diff-fb3dce4f54794d914797a6c29849c11eR292
cc @tcitworld
If we use that config-key, the default calendar will serve as both the calendar for new events as well as the calendar for new scheduling invites. (That's how most calendar software, which offer this feature, handle it.)
Looks good! I'd also like to have this with #2304 instead of adding another setting item in our crowded setting menu. |
@georgehrke Thanks for the feedback! I finally found some time to look at this again. I managed to get the setting for the initial state from the dav app by loading it along with the calendar's own settings in the calendar's ViewControllers, but I can't figure out how to store the setting in the dav app the right way. I expect that there is already an API that I can call to store the value, but I can't find it. Or should I just add a function to the calendar's |
@tcitworld You were working on this, right? Is there already an API?
|
With more and more collaboration in Nextcloud HUB, this is more and more improtant. |
@ChristophWurst Since we'll have a groupware user settings section with nextcloud/server#27466 wouldn't it make sense to have this option in Server Settings instead of the Calendar app? |
I'd honestly vote against it because the setting would be very hard to discover this way. And this setting actually only correspends to the calendar so it should be in the calendar app, imo. |
I agree with @szaimen. The availability is relevant for any CalDAV client. This is only relevant for this app, right? It should be here. It will help to have a settings modal in this app like we have in Mail and Talk. The current bottom left settings area is already quite crammed. |
Nope, it's a dav setting. It should use the setting added in nextcloud/server#19852 instead of the custom one added here, like Georg said above. |
Though I still think that having the setting in the calendar app is better because of better discoverability, no? |
I have no strong opinions on this one, other than the fact that it would be better for the setting to be available without the app installed, but who doesn't install the calendar app anyway? 😎 |
You are right, makes sense because of that. But in this case I am definitely voting for adding a link in the calendar settings that links directly to the corresponding personal setting section like I've done it here: nextcloud/activity#621 |
If we implement the setting globally (Personal Setting -> Groupware) the picker (+ its backend) has to move into the dav app at |
Signed-off-by: Lukas Boersma mail@lukas-boersma.com
Description
This adds a setting for the default calendar when creating a new event.
To summarize my changes:
CalendarPicker
component so that the dropdown for the new setting can be disabled while the setting is saved.getCalendarObjectInstanceForNewEvent
(calendarObjectInstance.js
) andcreateNewEvent
(calendarObjects.js
) I addedcalendarId
as an new (optional) parameter to specify which calendar to use for a new event.sortedCalendars
is used).This is work in progress. I still have an issue with the calendar picker, it does only close when double clicking it, any help here is greatly appreciated. Also I have yet to write tests for this new setting. However it would be cool if somebody from the maintainers could let me know if this change has a chance of being merged.
Fixes #1835
Type of change
How to test / use your changes?
UI Changes
Checklist:
git commit -sm "Your commit message"
)