feat(calendars): add per-calendar notification muting toggle - #8796
SebastianKrupinski merged 1 commit into
Conversation
cd12e64 to
8588554
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
79b4522 to
663ba16
Compare
|
Hi @SoleroTG Thank you for the PR. We appreciate the contribution! |
| const ignoreReminders = Boolean( | ||
| calendar.ignoreReminders | ||
| || calendar.props?.['{http://nextcloud.com/ns}ignore-reminders'] === '1' | ||
| || calendar.props?.['{http://nextcloud.com/ns}ignore-reminders'] === true, | ||
| ) |
There was a problem hiding this comment.
We do not use raw DAV properties like this in calendar.
These will need to be added to the nextcloud/cdav-library
Also we use the term "Alarm/Alarms" everywhere we should also do the same for this something like disableAlarmNotifications maybe?
There was a problem hiding this comment.
Thanks for the feedback, @SebastianKrupinski Makes total sense.
- Renamed the property to disableAlarmNotifications / {http://nextcloud.com/ns}disable-alarm-notifications across server and calendar app to stay aligned with defaultAlarmPartDay.
- Created a PR against cdav-library to parse the property natively: feat(calendar): parse {http://nextcloud.com/ns}disable-alarm-notifications property cdav-library#1088
Both PRs (nextcloud/server#63774 and #8796) have been updated accordingly!
There was a problem hiding this comment.
Can you also update this PR, you still have the code for the bare props.
4f6f2ce to
f08b3d3
Compare
f08b3d3 to
6e19521
Compare
| || calendar.props?.['{http://nextcloud.com/ns}disable-alarm-notifications'] === '1' | ||
| || calendar.props?.['{http://nextcloud.com/ns}disable-alarm-notifications'] === true, | ||
| ) | ||
|
|
There was a problem hiding this comment.
I still see bare imports and not the predefined props
There was a problem hiding this comment.
You were completely right, @SebastianKrupinski.
The previous push didn't include the staged changes. Thank you for catching that!
The updated commit (8cabf87) is now force-pushed: all bare props fallbacks and namespace strings have been completely removed, and it now uses calendar.disableAlarmNotifications natively via cdav-library.
6e19521 to
8cabf87
Compare
8cabf87 to
a376c93
Compare
| <ActionButton @click.prevent.stop="toggleDisableAlarmNotifications"> | ||
| <template #icon> | ||
| <BellOffOutline v-if="calendar.disableAlarmNotifications" :size="20" decorative /> | ||
| <BellOutline v-else :size="20" decorative /> | ||
| </template> | ||
| {{ calendar.disableAlarmNotifications ? t('calendar', 'Unmute notifications') : t('calendar', 'Mute notifications') }} | ||
| </ActionButton> |
There was a problem hiding this comment.
Lets remove this from the drop down menu
| <NcCheckboxRadioSwitch v-model="disableAlarmNotifications"> | ||
| {{ $t('calendar', 'Disable alarm notifications for this calendar') }} |
There was a problem hiding this comment.
This needs to be version gated server 36+
| const defaultAlarmPartDay = isAfterVersion(34) && calendar.defaultAlarmPartDay !== undefined ? calendar.defaultAlarmPartDay : null | ||
| // Default alarm for full-day events in this calendar (in seconds) | ||
| const defaultAlarmFullDay = isAfterVersion(34) && calendar.defaultAlarmFullDay !== undefined ? calendar.defaultAlarmFullDay : null | ||
| const disableAlarmNotifications = Boolean(calendar.disableAlarmNotifications) |
There was a problem hiding this comment.
This should also be version gated
There was a problem hiding this comment.
Thanks for the feedback, @SebastianKrupinski
- Removed the mute action button from the calendar list dropdown menu.
- Version-gated the property parsing in calendar.js and the checkbox in EditCalendarModal.vue to Nextcloud 36+.
a376c93 to
d60e917
Compare
ada0d2b to
4c6c6a3
Compare
4c6c6a3 to
488d589
Compare
|
Hey @SoleroTG I made a few small adjustments and re-based it. I was just faster to make the adjustments then to make comments. |
Add ignoreReminders property support in model/store and UI toggle controls in EditCalendarModal and CalendarListItem. Signed-off-by: SoleroTG <github-29h@solero.quietmail.eu>
Head branch was pushed to by a user without write access
488d589 to
9289d9d
Compare
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
Adds frontend UI controls to mute/unmute notifications per calendar.
EditCalendarModal.vue.BellOffOutline) inCalendarListItem.vue.{http://nextcloud.com/ns}ignore-reminders.Checklist