feat: exchange cloud ID#4417
Conversation
|
General layout plan:
Status:
|
ea81812 to
7c0eaa0
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.) |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
Thanks for the contribution, @redblom!
Is there any way this could work without introducing an app dependency? |
Short answer: No, that is to say, the actual cloud ID exchange is not a responsibility of the contacts app but the contacts app (the cloud ID field) is a logical place where to have this option (as per earlier discussion with the Design Team). |
0112a78 to
e7c2604
Compare
|
Thanks for the clarification |
76d6df3 to
ca42433
Compare
ca42433 to
62ce0c2
Compare
4e4bdca to
e78bd65
Compare
Pfff 😳 |
|
@redblom - can you check on artonge's review comments please? |
👍 working on it. |
55dafdf to
e05f396
Compare
@miaulalala We've now covered them all we think. |
|
Rebased and some cleanup. |
|
Hi @redblom! CI is currently failing on two fronts: 1. Missing 2. NPM lint error in |
|
|
||
| class UpdateOcmProviders extends TimedJob { | ||
| // Run every five minutes | ||
| private int $expire_time = 5 * 60; |
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
|
@redblom there are still some unresolved conversations from the last time I reviewed, can you address them? |
Yes, it can be slow-ish, so definitely for a responsive wayf page.
Will have a look at that. |
| if (!($code >= 200 && $code < 400)) { | ||
| continue; | ||
| } | ||
| $data = json_decode($res->getBody(), true); |
There was a problem hiding this comment.
Where is the format of the answer defined?
| public function inviteAcceptDialog(string $token = '', string $providerDomain = ''): TemplateResponse { | ||
| $this->initialState->provideInitialState('inviteToken', $token); | ||
| $this->initialState->provideInitialState('inviteProvider', $providerDomain); | ||
| $this->initialState->provideInitialState('acceptInviteDialogUrl', FederatedInvitesService::OCM_INVITE_ACCEPT_DIALOG_ROUTE); | ||
|
|
||
| return $this->index(); | ||
| } |
There was a problem hiding this comment.
Yes, and looking at the variable that you provide:
inviteTokenseems to be accessible from the frontend already- same for
inviteProvider
So maybe you only need to provide acceptInviteDialogUrl?
|
This seems very comprehensive, nice! :) From what I understand this is a way to exchange contacts with people from other organizations directly from the contacts app. Design wise I have a few questions and some feedback: Thinking about the design and flow itself, some questions come to mind:
Visual design feedback to be more consistent with Nextcloud design:
But either way this is really cool. Interested to know what you think of the design feedback! :) |
@nimishavijay - Thank you for this valuable feedback! We're on it. |
|
@artonge - addressed all your reviews. |
…ion workflow see https://github.com/cs3org/OCM-API/blob/v1.2.1/IETF-RFC.md Features: - Button to invite remote users to exchange cloudIDs. - Button to manually accept invite to exchange cloudIDs. - WAYF page allowing the receiver of the invite to open and accept the invitation. - Listing of open invitations. - Option to resend, revoke open invitations. - Administer invitation settings Signed-off-by: Antoon P. <antoon.prins@surf.nl> Co-authored-by: Micke Nordin <kano@sunet.se> Co-authored-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
|
Feedback by @jancborchardt: Must haves
Nice to have - will not block merge
Future enhancement and ideas
|
|
FYI for reference @nimishavijay this is design feedback I gave in the call. I’ll also take over to do a last review pass over it after the changes are done. :) |
[X] Make "All invitations" a list item below the address book list instead of a separate menu section: [X] Make adding a new invitation or accepting an invitation as a separate button next to the "new contact" button - example from Talk: [X] Make "email address" the first input field in the Invitation modal and remove the label [X] Replace "Provider" with "Select your server" as a heading. Remove subtext from heading. [X] Put accept buttons on the rightmost side, and be a primary button (if not fixed yet) [X] Add "create invitation" and "accept invitation" on empty content page when no invitations are open [X] Add title to Invitation and Accept modal [X] Remove icon from cancel button in Invitation and Accept Modal [X] No full stop in headings [X] Give good user feedback for errors - such as an invite not being able to be accepted [X] Also hide the button to accept an invite if the capability is not there (may already be done) **Nice to have** - will not block merge [X] Remove extra container around recipient email and personal message so all form element are on one level Signed-off-by: Antoon P. <antoon.prins@surf.nl>
|
Screenshots belonging to 66bca00
OCM invitations menu moved to top.
New invitation form: label field removed, title fixed, removed extra container
Accept invite form: title fixed
All invitations moved
Options to create/accept invites on empty invitations page
Correct message when trying to accept an invite you've created yourself
WAYF page: new title, removed sub text
|
Signed-off-by: Antoon P. <info@redblom.com>
jancborchardt
left a comment
There was a problem hiding this comment.
Nice @redblom! Looks very good and basically good to go!
Only have 3 tiny pieces of feedback based on those changes, but they are also not a blocker:
- The nav entry should be called "External invitations" instead of "All invitations" as that is clearer, no?
- In the modal for "Create invitation", the button says "Send invite", but everywhere else we use the language "invitation". So better to use "Send invitation" here too.
- On the emptycontent page "There are no invites", there are 2 primary buttons. There should only ever be 1 primary button, in this case it makes most sense to be "Create invitation". (And they can be next to each other rather than below each other.)

















This is a work in progressThis PR implements #4416
About
The goal of this feature is to allow for easy remote contact information exchange (cloud ID, email, name) between 2 users from different instances/organizations based on an invitation request.
The feature is an implementation of the invitation workflow from the OCM specification (https://datatracker.ietf.org/doc/draft-ietf-ocm-open-cloud-mesh/)
A user (sender) creates the invitation. This invitation consists of an invite link and (encoded) invite code. The invitation is sent to another user (receiver) via email or through another channel, eg. chat.
After receiving the invitation, the receiver can accept the invitation by following the invite link or by pasting the (encoded) invite code into a manual accept form.
After accepting, the exchange of user information will take place (OCM
/invite-acceptedendpoint) resulting in the creation of both users in each other's contacts list.Following the invite link in the email is the most convenient way to accept. It will redirect the receiver via a WAYF (Where Are You From) page immediately to an accept dialog.
Note: Manual acceptance of the invitation works with both the invite link and (encoded) invite code.
Screenshots
Here you choose your institute. You can also fill in your institute's provider address if you are not on the list. A discovery process will run to check whether your provider supports OCM.
And this will lead to the exchange of contact information via the OCM /invite-accepted endpoint.
OCM invites admin settings