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

Accept and decline invitations #3864

Merged
merged 1 commit into from
Jan 28, 2022
Merged

Conversation

st3iny
Copy link
Member

@st3iny st3iny commented Jan 4, 2022

Fixes #144

According to https://icalendar.org/CalDAV-Scheduling-RFC-6638/b-3-example-attendee-replying-to-an-invitation.html responding to an invitation is done by setting the participation status and sending the modified ics data to the server. Thunderbird seems to do the same thing.

The local participation status in the invitees list is updated right away (without reloading the page). There is one minor side effect: The accept/decline buttons internally trigger a full save which also persists changes of e.g. reminders. Fixing this would need a lot of potentially ugly code. Again, Thunderbird also ignores this case and other changes to the event are also saved upon accepting or declining.

Simple Sidebar
Screenshot 2022-01-04 at 18-04-30 April 2022 - Calendar - Nextcloud Screenshot_20220104_180654

Accept using the sidebar editor

accept-sidebar

Decline using the simple editor

decline-simple

TODO

  • Fix red CI

@st3iny st3iny added 2. developing Work in progress Feature: Editor Feature: Scheduling Anything around scheduling meetings, free-busy, resources, attendees and so on labels Jan 4, 2022
@st3iny st3iny added this to the v3.1.0 milestone Jan 4, 2022
@st3iny st3iny self-assigned this Jan 4, 2022
@codecov
Copy link

codecov bot commented Jan 4, 2022

Codecov Report

Merging #3864 (fae3fc5) into main (d771339) will decrease coverage by 0.25%.
The diff coverage is 0.00%.

❗ Current head fae3fc5 differs from pull request most recent head 58c4df7. Consider uploading reports for the commit 58c4df7 to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##               main    #3864      +/-   ##
============================================
- Coverage     29.61%   29.36%   -0.26%     
+ Complexity      322      318       -4     
============================================
  Files           220      220              
  Lines          7529     7455      -74     
  Branches        993      925      -68     
============================================
- Hits           2230     2189      -41     
+ Misses         5299     5266      -33     
Flag Coverage Δ
javascript 20.55% <0.00%> (-0.43%) ⬇️
php 67.86% <ø> (+0.51%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rc/components/Editor/InvitationResponseButtons.vue 0.00% <0.00%> (ø)
src/mixins/EditorMixin.js 0.00% <0.00%> (ø)
src/views/EditSidebar.vue 0.00% <0.00%> (ø)
src/views/EditSimple.vue 0.00% <0.00%> (ø)
src/fullcalendar/rendering/eventDidMount.js 27.45% <0.00%> (-0.62%) ⬇️
src/filters/recurrenceRuleFormat.js 82.00% <0.00%> (-0.53%) ⬇️
...dar/lib/Controller/AppointmentConfigController.php 76.34% <0.00%> (-0.26%) ⬇️
...xtcloud/apps/calendar/lib/Db/AppointmentConfig.php 46.34% <0.00%> (-0.18%) ⬇️
src/models/alarm.js 100.00% <0.00%> (ø)
src/models/event.js 100.00% <0.00%> (ø)
... and 37 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d771339...58c4df7. Read the comment docs.

@tcitworld
Copy link
Member

tcitworld commented Jan 5, 2022

This makes me notice we don't have any visual feedback in the calendar grid for when an event invitation is rejected?

@st3iny
Copy link
Member Author

st3iny commented Jan 7, 2022

This makes me notice we don't have any visual feedback in the calendar grid for when an event invitation is rejected?

Indeed. This would be a nice followup.

@st3iny st3iny force-pushed the enh/144/inline-invitation-response branch from fae3fc5 to f7e4e89 Compare January 7, 2022 14:13
@st3iny st3iny marked this pull request as ready for review January 7, 2022 14:13
@st3iny st3iny added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jan 7, 2022
@miaulalala
Copy link
Contributor

I like it, but I dislike the button colours. Is there any way to make them fit in with them theming? Or maybe ask the design team for some input?

@GretaD
Copy link
Contributor

GretaD commented Jan 11, 2022

I like it, but I dislike the button colours. Is there any way to make them fit in with them theming? Or maybe ask the design team for some input?

the accept one is a primary button so its the same as the colour of the theme(see also his example is green as the theme one), the decline is the error one that we use everywhere. So if we change it here, should be changed everywhere.

@miaulalala
Copy link
Contributor

I like it, but I dislike the button colours. Is there any way to make them fit in with them theming? Or maybe ask the design team for some input?

the accept one is a primary button so its the same as the colour of the theme(see also his example is green as the theme one), the decline is the error one that we use everywhere. So if we change it here, should be changed everywhere.

Ah, I didn't realise it's the same colour as the theme :)

Copy link
Contributor

@GretaD GretaD left a comment

Choose a reason for hiding this comment

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

code looks good but i cannot test it

@st3iny st3iny force-pushed the enh/144/inline-invitation-response branch 2 times, most recently from 79f0890 to 5f39858 Compare January 28, 2022 10:29
@ChristophWurst
Copy link
Member

Bildschirmfoto von 2022-01-28 11-30-00

with a custom theme color the accept button looks a bit strange :)

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

Works as expected. UX and design can be improved :)

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
@st3iny st3iny force-pushed the enh/144/inline-invitation-response branch from 5f39858 to 58c4df7 Compare January 28, 2022 10:41
@st3iny
Copy link
Member Author

st3iny commented Jan 28, 2022

The button that corresponds to the current participation status is automatically hidden. E.g., the accept button will be hidden if I already accepted earlier.

@st3iny st3iny merged commit 4134f5c into main Jan 28, 2022
@delete-merged-branch delete-merged-branch bot deleted the enh/144/inline-invitation-response branch January 28, 2022 10:47
@tcitworld
Copy link
Member

The button that corresponds to the current participation status is automatically hidden. E.g., the accept button will be hidden if I already accepted earlier.

Maybe we can just disable it and update the label (accept -> accepted) instead?

@st3iny
Copy link
Member Author

st3iny commented Jan 28, 2022

The button that corresponds to the current participation status is automatically hidden. E.g., the accept button will be hidden if I already accepted earlier.

Maybe we can just disable it and update the label (accept -> accepted) instead?

This should be discussed in the next design review. I'll add it to the list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature request Feature: Editor Feature: Scheduling Anything around scheduling meetings, free-busy, resources, attendees and so on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calendar-inbox: Accept / Reject and show responses in calendar
5 participants