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: add organizer selection #6251

Merged
merged 1 commit into from
Aug 28, 2024
Merged

Conversation

SebastianKrupinski
Copy link
Contributor

Resolves #6238

Copy link

codecov bot commented Aug 11, 2024

Codecov Report

Attention: Patch coverage is 0% with 52 lines in your changes missing coverage. Please review.

Project coverage is 23.76%. Comparing base (5d30e16) to head (cbfbda2).
Report is 8 commits behind head on main.

Files Patch % Lines
src/components/Editor/Invitees/InviteesList.vue 0.00% 33 Missing ⚠️
...c/components/Editor/Invitees/OrganizerListItem.vue 0.00% 11 Missing ⚠️
src/mixins/EditorMixin.js 0.00% 5 Missing and 2 partials ⚠️
src/views/EditSimple.vue 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6251      +/-   ##
============================================
- Coverage     23.88%   23.76%   -0.13%     
  Complexity      454      454              
============================================
  Files           246      246              
  Lines         11656    11715      +59     
  Branches       2189     2207      +18     
============================================
  Hits           2784     2784              
- Misses         8557     8614      +57     
- Partials        315      317       +2     
Flag Coverage Δ
javascript 15.35% <0.00%> (-0.10%) ⬇️
php 59.53% <ø> (ø)

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

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

src/components/Editor/Invitees/InviteesList.vue Outdated Show resolved Hide resolved
@SebastianKrupinski SebastianKrupinski force-pushed the feat/issue-6238-organizer-selector branch 2 times, most recently from b4c1bca to 8e83a72 Compare August 13, 2024 13:29
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

When switching calendars the selection is slightly lagging. E.g. when you go to a shared calendar, select the calendar owner as organizer and then go to an owned calendar the other person is still shown as organizer.

@SebastianKrupinski
Copy link
Contributor Author

Works

When switching calendars the selection is slightly lagging. E.g. when you go to a shared calendar, select the calendar owner as organizer and then go to an owned calendar the other person is still shown as organizer.

Interesting, looks like the change calendar event is not triggering a refresh. I will look in to this...

Also will need to re-test all this after the changes design asked me to make today.

Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

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

Works but the UX could be improved. Currently, the select is always shown even if there is no organizer. There is no placeholder because it is always pre-filled with the current user (principal) so a user might not get what the field is doing.

grafik


It's great to see you getting into frontend development. I left some feedback regarding common patterns and conventions in the vue world. Nothing big really.

src/views/EditSidebar.vue Outdated Show resolved Hide resolved
src/views/EditSimple.vue Outdated Show resolved Hide resolved
src/components/Editor/Invitees/InviteesList.vue Outdated Show resolved Hide resolved
src/components/Editor/Invitees/InviteesList.vue Outdated Show resolved Hide resolved
src/components/Editor/Invitees/InviteesList.vue Outdated Show resolved Hide resolved
src/components/Editor/Invitees/OrganizerList.vue Outdated Show resolved Hide resolved
src/components/Editor/Invitees/OrganizerList.vue Outdated Show resolved Hide resolved
src/components/Editor/Invitees/OrganizerList.vue Outdated Show resolved Hide resolved
src/components/Editor/Invitees/OrganizerList.vue Outdated Show resolved Hide resolved
src/components/Editor/Invitees/OrganizerList.vue Outdated Show resolved Hide resolved
@SebastianKrupinski
Copy link
Contributor Author

Updated, as per design's request

image

@SebastianKrupinski SebastianKrupinski added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Aug 20, 2024
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.

@SebastianKrupinski I didn’t mean for the organizer to have a menu with all the people, but for all the menus of the people to have another option called "Organizer". :) Same for Talk with the "Promote to moderator" action in the menu of every participant.

Calendar menu Talk menu
image image

@SebastianKrupinski
Copy link
Contributor Author

SebastianKrupinski commented Aug 21, 2024

@SebastianKrupinski I didn’t mean for the organizer to have a menu with all the people, but for all the menus of the people to have another option called "Organizer". :) Same for Talk with the "Promote to moderator" action in the menu of every participant.
Calendar menu Talk menu
image image

Morning @jancborchardt,

At the moment the only users that can be selected as an Organizer are the current logged in user (Sharee) and the calendar owner (Sharer). You cannot set just any person as an organizer, due to the internal mechanics of CalDav. That is why I went with a menu on the organizer object, that only lists the permitted organizers.

@jancborchardt
Copy link
Member

@SebastianKrupinski got it. Then we simply need a menu entry on the organizer with 1 action saying:

Promote [accountname] to organizer

And since only 2 people can be organizer, it will always be the other person in the action. Makes sense?

@SebastianKrupinski
Copy link
Contributor Author

@jancborchardt no problem I can do that.

@SebastianKrupinski
Copy link
Contributor Author

SebastianKrupinski commented Aug 21, 2024

@jancborchardt

How is this? Personally I think the wording should say 'Make (Persons Name) the Organizer'

image

@ChristophWurst
Copy link
Member

Promote sounds like user 2 will become organizer too but it will take the organizer role from user 1, right?

@SebastianKrupinski
Copy link
Contributor Author

Promote sounds like user 2 will become organizer too but it will take the organizer role from user 1, right?

Correct. Only one person can be the organizer. So User 1 loses the organizer role.

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.

Right, then to fix the issue @ChristophWurst mentions, @SebastianKrupinski your wording suggestion sounds good:

Make (Persons Name) the organizer

Note "organizer" lowercase because we use "Sentence case" as per design guidelines: https://docs.nextcloud.com/server/latest/developer_manual/design/foundations.html#wording

@SebastianKrupinski
Copy link
Contributor Author

Right, then to fix the issue @ChristophWurst mentions, @SebastianKrupinski your wording suggestion sounds good:

Make (Persons Name) the organizer

Note "organizer" lowercase because we use "Sentence case" as per design guidelines: docs.nextcloud.com/server/latest/developer_manual/design/foundations.html#wording

Done.

image

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.

Nice, seems good to me! :)

@ChristophWurst
Copy link
Member

It feels strange to have the Make X organizer in the actions menu of Y. Shouldn't Make X organizer in the action menu of attendee X?

image

Moreover, I think there is a small bug.

  1. Open the calendar as a calendar share recipient
  2. Create a new event in that calendar (you will be set as organizer by default)
  3. Click Make organizer

-> share owner becomes organizer, but I'm fully removed and am not listed as attendee.

I would expect demoted organizers become attendees

@SebastianKrupinski
Copy link
Contributor Author

SebastianKrupinski commented Aug 23, 2024

It feels strange to have the Make X organizer in the actions menu of Y. Shouldn't Make X organizer in the action menu of attendee X?

That can be done, but would be very cumbersome in a manager assistant role, you would need to search for the manager then add the manager as an attendee every time then convert the attendee to an organizer.

Create a new event in that calendar (you will be set as organizer by default)

The default selected organizer could have been disabled on shared calendars, if we used drop downs or an action menu in a different location, but with the design asking for the selection to be on the organizer, that's not really possible.

share owner becomes organizer, but I'm fully removed and am not listed as attendee.

The most plausible scenarios for someone else making an appointment for the calendar owner are a assistant role, therefor

    1. Assistant makes an event for her manager/etc but does NOT need to attend. In this case the assistant would need to constantly remove themselves form attendees, if they where automatically converted to an attendee.
    1. Assistant makes an event for her manager/etc but DOES need to attend. In this case they would constantly need to add themselves to attendees if they are NOT automatically converted.

Which one of those scenarios is most used? I have no clue. But maybe we could add two options to the menu, one for each scenario. "Make (person) the organizer" and "Make (person) the organizer and attend"

Copy link
Member

@st3iny st3iny 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 better now and works.

I think the two button idea from our latest call is missing.

@SebastianKrupinski
Copy link
Contributor Author

I think the two button idea from our latest call is missing.

It is going to work on that now.

@SebastianKrupinski
Copy link
Contributor Author

image

Revision 44 lol

@ChristophWurst
Copy link
Member

@st3iny please give this one final test, then let's get this in

Signed-off-by: SebastianKrupinski <[email protected]>
Signed-off-by: Richard Steinmetz <[email protected]>
@st3iny st3iny force-pushed the feat/issue-6238-organizer-selector branch from e8048dd to cbfbda2 Compare August 28, 2024 07:04
Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

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

I'm gonna fix the remaining things myself.

Works otherwise.

src/components/Editor/Invitees/InviteesList.vue Outdated Show resolved Hide resolved
@st3iny st3iny enabled auto-merge August 28, 2024 07:08
@st3iny st3iny merged commit fb8ff72 into main Aug 28, 2024
33 of 35 checks passed
@st3iny st3iny deleted the feat/issue-6238-organizer-selector branch August 28, 2024 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ☑️ Done
Archived in project
Development

Successfully merging this pull request may close these issues.

Add Organizer Selection for Shared Calendars
5 participants