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

feat: Ability to render groups as attendees #5396

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

onny
Copy link

@onny onny commented Aug 4, 2023

Ability to render groups as attendees including their members, as defined in events like this:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//IDN nextcloud.com//Calendar app 4.5.0-alpha.1//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
CREATED:20230815T181232Z
DTSTAMP:20230815T181354Z
LAST-MODIFIED:20230815T181354Z
SEQUENCE:2
UID:f07f616f-5ab1-4b62-ba4a-72562dd212d8
DTSTART;VALUE=DATE:20230818
DTEND;VALUE=DATE:20230819
STATUS:CONFIRMED
SUMMARY:Group Meeting
ATTENDEE;CN=MyGroup;CUTYPE=GROUP;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANTRSVP=TRUE;SCHEDULE-STATUS1.1:mailto:mygroup@localhost
ATTENDEE;MEMBER="mailto:mygroup@localhost";CN=user1;CUTYPE=INDIVIDUAL;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE;LANGUAGE=en;SCHEDULE-STATUS=1.1:mailto:user1@localhost
ATTENDEE;MEMBER="mailto:mygroup@localhost";CN=user2;CUTYPE=INDIVIDUAL;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE;LANGUAGE=en;SCHEDULE-STATUS=1.1:mailto:user2@localhost
ORGANIZER;CN=admin:mailto:admin@localhost
END:VEVENT
END:VCALENDAR

Import event file event1.ics:

curl -X PUT -u admin:test123 --data-binary "@event1.ics" "http://localhost:8080/remote.php/dav/calendars/admin/personal/event1.ics"

nextcloud_calendar_group

Work done

  • Frontend: Render groups and their members
  • Frontend: Remove groups and their members

Partly fixes #2954

Work inspired by @tcitworld PR #4742

@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Attention: 59 lines in your changes are missing coverage. Please review.

Comparison is base (ba79f11) 24.59% compared to head (33e236c) 24.43%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5396      +/-   ##
============================================
- Coverage     24.59%   24.43%   -0.16%     
  Complexity      388      388              
============================================
  Files           240      240              
  Lines         10575    10643      +68     
  Branches       1710     1739      +29     
============================================
  Hits           2601     2601              
- Misses         7974     8042      +68     
Flag Coverage Δ
javascript 15.67% <0.00%> (-0.13%) ⬇️
php 62.02% <ø> (ø)

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

Files Coverage Δ
src/models/attendee.js 100.00% <ø> (ø)
src/store/calendarObjectInstance.js 0.00% <0.00%> (ø)
src/components/Editor/Invitees/InviteesList.vue 0.00% <0.00%> (ø)
...rc/components/Editor/AvatarParticipationStatus.vue 0.00% <0.00%> (ø)
...rc/components/Editor/Invitees/InviteesListItem.vue 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@onny onny changed the title Add ability to invite circles to events feat: Ability to invite circles to events Aug 4, 2023
@onny onny changed the title feat: Ability to invite circles to events feat: Ability to render groups as attendees Aug 18, 2023
@onny onny force-pushed the circle-invite branch 9 times, most recently from 6eea65f to 9474ee0 Compare August 21, 2023 10:08
@onny onny marked this pull request as ready for review August 21, 2023 10:09
@onny
Copy link
Author

onny commented Aug 21, 2023

Before further polishing this PR I would like to know what you think of this approach. It already works quite good but I think it can be optimized in some aspects

@onny
Copy link
Author

onny commented Aug 24, 2023

@miaulalala Maybe you can take a look at it if this could be a feasible approach, thank you :)

@miaulalala
Copy link
Contributor

cc @jancborchardt @nimishavijay

I like it a lot, and the design to me looks really well thought through too.

@tcitworld
Copy link
Member

tcitworld commented Aug 28, 2023

I like it too. I'm not sure « invitation sent » (the attendee status) makes sense on the group itself though.

I also think we might need to tell the user some way or another that the member list might not be up-to-date with the upstream source (circles, NC groups, contact groups, …).

Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

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

Looks really nice and simple design-wise! The only suggestion I have is that instead of just "(2)" it could show "(2 members)" to be more clear, otherwise it looks like what is appended to a duplicate name or so. :)

Btw @onny will you come to the Nextcloud Conference which takes place in Berlin in September? https://nextcloud.com/conference-2023/

@onny
Copy link
Author

onny commented Aug 28, 2023

Thank you all for the feedback :) Looking forward to fix remaining issues mid September after my holidays.

@jancborchardt Really would have liked to join the conference but unfortunately I can't take part on that day :(

@onny onny force-pushed the circle-invite branch 3 times, most recently from 7a913bc to 9911167 Compare September 25, 2023 18:46
@onny
Copy link
Author

onny commented Sep 25, 2023

Looks really nice and simple design-wise! The only suggestion I have is that instead of just "(2)" it could show "(2 members)" to be more clear, otherwise it looks like what is appended to a duplicate name or so. :)

Thanks this makes sense, fixed it

image

I like it too. I'm not sure « invitation sent » (the attendee status) makes sense on the group itself though.

fixed :)

I also think we might need to tell the user some way or another that the member list might not be up-to-date with the upstream source (circles, NC groups, contact groups, …).

I thought about displaying a note after adding a group or circle to the attendee list (which would be done in a separate PR)

image

@onny onny force-pushed the circle-invite branch 3 times, most recently from f31e263 to 099fe36 Compare September 27, 2023 10:42
onny pushed a commit to onny/calendar that referenced this pull request Oct 31, 2023
This commit adds support for adding circles as attendees to a calendar event.
The relationship between the imported group and members will be compliant with
the iCal specification.

A circle with the title "testcircle" will be added as an attendee with iCal
attributes "CUTYPE=GROUP` and uri "mailto:circle+CIRCLEID@CIRCLE_INSTANCE".

Members of the circle will be imported as standard attendees. Each member gets
assigned to the circle group entry by assigning them to the group uri using the
iCal member property: "MEMBER='mailto:circle+CIRCLEID@CIRCLE_INSTANCE'".

Searching for circles is only enabled if the circles app is activated.

Circles added to the list of attendees get imported only once and are not
synced yet. While adding a circle, a notice about this is shown to the user.
Only members of local circles which are local users get imported.

Rendering groups in the frontend is done in a separate PR
nextcloud#5396

Signed-off-by: Jonas Heinrich <[email protected]>
onny pushed a commit to onny/calendar that referenced this pull request Nov 1, 2023
This commit adds support for adding circles as attendees to a calendar event.
The relationship between the imported group and members will be compliant with
the iCal specification.

A circle with the title "testcircle" will be added as an attendee with iCal
attributes "CUTYPE=GROUP` and uri "mailto:circle+CIRCLEID@CIRCLE_INSTANCE".

Members of the circle will be imported as standard attendees. Each member gets
assigned to the circle group entry by assigning them to the group uri using the
iCal member property: "MEMBER='mailto:circle+CIRCLEID@CIRCLE_INSTANCE'".

Searching for circles is only enabled if the circles app is activated.

Circles added to the list of attendees get imported only once and are not
synced yet. While adding a circle, a notice about this is shown to the user.
Only members of local circles which are local users get imported.

Rendering groups in the frontend is done in a separate PR
nextcloud#5396

Signed-off-by: Jonas Heinrich <[email protected]>
onny pushed a commit to onny/calendar that referenced this pull request Nov 1, 2023
This commit adds support for adding circles as attendees to a calendar event.
The relationship between the imported group and members will be compliant with
the iCal specification.

A circle with the title "testcircle" will be added as an attendee with iCal
attributes "CUTYPE=GROUP` and uri "mailto:circle+CIRCLEID@CIRCLE_INSTANCE".

Members of the circle will be imported as standard attendees. Each member gets
assigned to the circle group entry by assigning them to the group uri using the
iCal member property: "MEMBER='mailto:circle+CIRCLEID@CIRCLE_INSTANCE'".

Searching for circles is only enabled if the circles app is activated.

Circles added to the list of attendees get imported only once and are not
synced yet. While adding a circle, a notice about this is shown to the user.
Only members of local circles which are local users get imported.

Rendering groups in the frontend is done in a separate PR
nextcloud#5396

Signed-off-by: Jonas Heinrich <[email protected]>
onny pushed a commit to onny/calendar that referenced this pull request Nov 1, 2023
This commit adds support for adding circles as attendees to a calendar event.
The relationship between the imported group and members will be compliant with
the iCal specification.

A circle with the title "testcircle" will be added as an attendee with iCal
attributes "CUTYPE=GROUP` and uri "mailto:circle+CIRCLEID@CIRCLE_INSTANCE".

Members of the circle will be imported as standard attendees. Each member gets
assigned to the circle group entry by assigning them to the group uri using the
iCal member property: "MEMBER='mailto:circle+CIRCLEID@CIRCLE_INSTANCE'".

Searching for circles is only enabled if the circles app is activated.

Circles added to the list of attendees get imported only once and are not
synced yet. While adding a circle, a notice about this is shown to the user.
Only members of local circles which are local users get imported.

Rendering groups in the frontend is done in a separate PR
nextcloud#5396

Signed-off-by: Jonas Heinrich <[email protected]>
@miaulalala
Copy link
Contributor

Hi onny, this also needs a look over the tests and a run of the npm linter.

@onny
Copy link
Author

onny commented Nov 2, 2023

JS tests fail because I was using calendar-js master for support of the attendee.member attribute :)

@st3iny
Copy link
Member

st3iny commented Nov 6, 2023

@onny The calendar-js update is merged. Please rebase and we should be ready for the merge.

Ref #5562

Implement ability to render groups and group members as attendees of an
calendar event. This is implemented by reading and interpreting the
CUTYPE and MEMBER parameter of the iCal ATTENDEE attribute.

For example attendee "user1" belongs to a group identified with the uri
mygroup@localhost: "ATTENDEE;MEMBER="mailto:mygroup@localhost";CN=user1;[...]".
The group entity is also a ATTENDEE entry but with "CUTYPE=GROUP" and
with the corresponding uri mygroup@localhost:
"ATTENDEE;CN=MyGroup;CUTYPE=GROUP;[...]:mailto:mygroup@localhost".

In the frontend, groups will be displayed as a collapsible list whereas
members of the group will be displayed with the same functionality as
normal attendees.

In case the group entry gets deleted, all of its members will get
removed too.

Empty groups with no members might be present in the iCal file but won't
get rendered.

According to the iCal specifications, groups can have more than one uri and
attendees could have multiple membership addresses in one attribute.
This is neither covered yet in calendar-js nor in this PR.

Signed-off-by: Jonas Heinrich <[email protected]>
@onny
Copy link
Author

onny commented Nov 6, 2023

thank you @st3iny. Oh the tests "codecov/patch" and "codecov/project" seem to fail. Do I have to look into it?

@miaulalala
Copy link
Contributor

That's fine, it's just the coverage. Let's get this merged!

@miaulalala miaulalala merged commit 4d3196c into nextcloud:main Nov 6, 2023
39 of 41 checks passed
@miaulalala
Copy link
Contributor

TYSM onny!

onny pushed a commit to onny/calendar that referenced this pull request Nov 7, 2023
This commit adds support for adding circles as attendees to a calendar event.
The relationship between the imported group and members will be compliant with
the iCal specification.

A circle with the title "testcircle" will be added as an attendee with iCal
attributes "CUTYPE=GROUP` and uri "mailto:circle+CIRCLEID@CIRCLE_INSTANCE".

Members of the circle will be imported as standard attendees. Each member gets
assigned to the circle group entry by assigning them to the group uri using the
iCal member property: "MEMBER='mailto:circle+CIRCLEID@CIRCLE_INSTANCE'".

Searching for circles is only enabled if the circles app is activated.

Circles added to the list of attendees get imported only once and are not
synced yet. While adding a circle, a notice about this is shown to the user.
Only members of local circles which are local users get imported.

Rendering groups in the frontend is done in a separate PR
nextcloud#5396

Signed-off-by: Jonas Heinrich <[email protected]>
onny pushed a commit to onny/calendar that referenced this pull request Nov 7, 2023
This commit adds support for adding circles as attendees to a calendar event.
The relationship between the imported group and members will be compliant with
the iCal specification.

A circle with the title "testcircle" will be added as an attendee with iCal
attributes "CUTYPE=GROUP` and uri "mailto:circle+CIRCLEID@CIRCLE_INSTANCE".

Members of the circle will be imported as standard attendees. Each member gets
assigned to the circle group entry by assigning them to the group uri using the
iCal member property: "MEMBER='mailto:circle+CIRCLEID@CIRCLE_INSTANCE'".

Searching for circles is only enabled if the circles app is activated.

Circles added to the list of attendees get imported only once and are not
synced yet. While adding a circle, a notice about this is shown to the user.
Only members of local circles which are local users get imported.

Rendering groups in the frontend is done in a separate PR
nextcloud#5396

Signed-off-by: Jonas Heinrich <[email protected]>
onny pushed a commit to onny/calendar that referenced this pull request Nov 7, 2023
This commit adds support for adding circles as attendees to a calendar event.
The relationship between the imported group and members will be compliant with
the iCal specification.

A circle with the title "testcircle" will be added as an attendee with iCal
attributes "CUTYPE=GROUP` and uri "mailto:circle+CIRCLEID@CIRCLE_INSTANCE".

Members of the circle will be imported as standard attendees. Each member gets
assigned to the circle group entry by assigning them to the group uri using the
iCal member property: "MEMBER='mailto:circle+CIRCLEID@CIRCLE_INSTANCE'".

Searching for circles is only enabled if the circles app is activated.

Circles added to the list of attendees get imported only once and are not
synced yet. While adding a circle, a notice about this is shown to the user.
Only members of local circles which are local users get imported.

Rendering groups in the frontend is done in a separate PR
nextcloud#5396

Signed-off-by: Jonas Heinrich <[email protected]>
onny pushed a commit to onny/calendar that referenced this pull request Nov 17, 2023
This commit adds support for adding circles as attendees to a calendar event.
The relationship between the imported group and members will be compliant with
the iCal specification.

A circle with the title "testcircle" will be added as an attendee with iCal
attributes "CUTYPE=GROUP` and uri "mailto:circle+CIRCLEID@CIRCLE_INSTANCE".

Members of the circle will be imported as standard attendees. Each member gets
assigned to the circle group entry by assigning them to the group uri using the
iCal member property: "MEMBER='mailto:circle+CIRCLEID@CIRCLE_INSTANCE'".

Searching for circles is only enabled if the circles app is activated.

Circles added to the list of attendees get imported only once and are not
synced yet. While adding a circle, a notice about this is shown to the user.
Only members of local circles which are local users get imported.

Rendering groups in the frontend is done in a separate PR
nextcloud#5396

Signed-off-by: Jonas Heinrich <[email protected]>
onny pushed a commit to onny/calendar that referenced this pull request Nov 18, 2023
This commit adds support for adding circles as attendees to a calendar event.
The relationship between the imported group and members will be compliant with
the iCal specification.

A circle with the title "testcircle" will be added as an attendee with iCal
attributes "CUTYPE=GROUP` and uri "mailto:circle+CIRCLEID@CIRCLE_INSTANCE".

Members of the circle will be imported as standard attendees. Each member gets
assigned to the circle group entry by assigning them to the group uri using the
iCal member property: "MEMBER='mailto:circle+CIRCLEID@CIRCLE_INSTANCE'".

Searching for circles is only enabled if the circles app is activated.

Circles added to the list of attendees get imported only once and are not
synced yet. While adding a circle, a notice about this is shown to the user.
Only members of local circles which are local users get imported.

Rendering groups in the frontend is done in a separate PR
nextcloud#5396

Signed-off-by: Jonas Heinrich <[email protected]>
onny pushed a commit to onny/calendar that referenced this pull request Nov 27, 2023
This commit adds support for adding circles as attendees to a calendar event.
The relationship between the imported group and members will be compliant with
the iCal specification.

A circle with the title "testcircle" will be added as an attendee with iCal
attributes "CUTYPE=GROUP` and uri "mailto:circle+CIRCLEID@CIRCLE_INSTANCE".

Members of the circle will be imported as standard attendees. Each member gets
assigned to the circle group entry by assigning them to the group uri using the
iCal member property: "MEMBER='mailto:circle+CIRCLEID@CIRCLE_INSTANCE'".

Searching for circles is only enabled if the circles app is activated.

Circles added to the list of attendees get imported only once and are not
synced yet. While adding a circle, a notice about this is shown to the user.
Only members of local circles which are local users get imported.

Rendering groups in the frontend is done in a separate PR
nextcloud#5396

Signed-off-by: Jonas Heinrich <[email protected]>
onny pushed a commit to onny/calendar that referenced this pull request Dec 4, 2023
This commit adds support for adding circles as attendees to a calendar event.
The relationship between the imported group and members will be compliant with
the iCal specification.

A circle with the title "testcircle" will be added as an attendee with iCal
attributes "CUTYPE=GROUP` and uri "mailto:circle+CIRCLEID@CIRCLE_INSTANCE".

Members of the circle will be imported as standard attendees. Each member gets
assigned to the circle group entry by assigning them to the group uri using the
iCal member property: "MEMBER='mailto:circle+CIRCLEID@CIRCLE_INSTANCE'".

Searching for circles is only enabled if the circles app is activated.

Circles added to the list of attendees get imported only once and are not
synced yet. While adding a circle, a notice about this is shown to the user.
Only members of local circles which are local users get imported.

Rendering groups in the frontend is done in a separate PR
nextcloud#5396

Signed-off-by: Jonas Heinrich <[email protected]>
Copy link

github-actions bot commented May 1, 2024

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

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!

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 feedback-requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possibility to add a Nextcloud circle as attendees for an event [$250]
7 participants