feat(invite-email): make OCM invite email optional and improve UI#14
Conversation
|
Hi @redblom and @mickenordin, I've been tinkering with the app a bit, could you take a look at my changes when you have a moment? |
|
This could be the opportunity to also add the 'Cc invite to sender' option/checkbox when sending an invite. |
|
There are now discrepancies in terminology regarding token, invite link, (base64) between the create invite and accept invite form. That must be fixed. |
|
Can the 'optional message' field become a multi-line text field again? |
I'm not sure what this is, Cc to who? like I, as an invite creator send an email to the recipient of invite and also myself?
Yes, I feel this too, we can discuss about this
Yes, I can make it multi line again |
Yes, send the invite also to myself (ie. the inviter). So just a checkbox something like this:
|
Simple Mode
I didn't have SMTP so I cannot see the next page :-) If you can test it on SUNET test and see how it looks would be great @mickenordin
Advanced Mode
Trying to add a share while the email checkbox is on and the email filed is empty Re designed the copy section and add a bit of explanation for "non-technical" people, I think this part needs some polishing anyway
Manual accept form
I've decided to make it more configurable like this: @redblom I have implemented the changes we discussed (including the updated wording for the invite details). When you have a moment, could you please take another look and let me know what you think? |
280c35f to
7a8cc14
Compare
d6a02e3 to
9b66ad3
Compare
a5432b0 to
aed6433
Compare
aed6433 to
299aea5
Compare
|
@MahdiBaghbani - can you rebase and squash maybe ? |
3984fd6 to
a4ce368
Compare
952e001 to
84ae6e9
Compare
|
@MahdiBaghbani - tested locally and came up with the recommendations below. New Invite:The email_optional flag:
The email:
Accept invite forms (popup & manual):
Accept invite form (manual):
All invites list:
Settings:
|
|
OK! glad you liked it. |
If you can manage, great, else just give a shout and I can try to do it.
Yes! It belongs in there :) |
d27eef7 to
bdc4766
Compare
ab8337b to
6c6e79f
Compare
|
@MahdiBaghbani - I managed to merge your work but had to revert some things because it did not seem to work properly. Nothing feature wise though, that's all in there ! ps. Can you make sense of https://github.com/nextcloud/contacts/pull/4417/changes#r3087711741 ? |
e78bd65 to
55dafdf
Compare
|
@redblom Hi Antoon, sorry for delay :-( I'm back home and want to work on this in the weekend till morning, I have lots of uncommitted changes in local, is there anything I should know about the force push you did? anything I should adapt myself into? |
…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. 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>
55dafdf to
e05f396
Compare
Hi @MahdiBaghbani, First of all, I just pushed again because I realized I pushed from the wrong branch (ahum). Anyway, I wasn't sure about your circumstances so I did the best I could and pushed that. |
Thanks!
Yes, I'll do it, getting through my unfinished work right now, is there anything significant to the OCM contacts have changed or just some small stuff?
Yes, on Monday we can talk (I hope it connects; Internet isn't exactly connected here), although the video probably doesn't work for me so you would only have my voice :-) |
|
while the (my) local branch avoids that import now but still uses the core/ocm_invite_accept_dialog app-config key because server-side OCM discovery expects that key If we want to fully satisfy the review literally, we need either a contacts app owned setting mirrored into the core key, or a server public mechanism so contacts app can provide the invite-accept dialog without changing Correct me if you feel I get his intention wrong |
6c6e79f to
753d568
Compare
|
I restarted from what you pushed and squashed my side back into one cleaned commit I also looked again at the So, the updated branch keeps the key, removes the private Core class dependency, and aligns the discovery/accept flow with the current server contract. |
| * Listens to the federated invite accepted event. | ||
| * Catching the event should lead to the creation of the new remote contact | ||
| * from the invite, in the inviter's address book. | ||
| * |
There was a problem hiding this comment.
This does not work anymore. The event dispatched is OCMEndpointRequestEvent. See https://github.com/sara-nl/nextcloud-contacts/blob/invite-for-cloudid-exchange/lib/Listener/FederatedInviteAcceptedListener.php.
I delegated acceptance and contact creation to FederatedInvitesService.
There was a problem hiding this comment.
I have been working on this
Also as per OCM spec the email in payload is required not optional so that has to be fixed too
There was a problem hiding this comment.
A suggestion from NC was to remove these commands that set only one parameter and people can simply use occ config:app:set {appid} {param} --value {value} --type {type} (nextcloud#4417 (comment)).
I think it makes sense.
Maybe we can put everything into OcmInvitesConfig ?
753d568 to
bd03178
Compare
|
@MahdiBaghbani - the unit tests are fine now ! |
Signed-off-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
bd03178 to
ae52203
Compare
|
I re checked the Contacts still advertise the invite accept dialog in OCM discovery, but it no longer writes the old Instead, the Contacts discovery listener adds the invite-accepted capability and sets I also folded the old one-off occ commands into I believe that setting the accept dialog in the OCM discovery should be synced with the enable disable of the invites mechanism since if you disable it and then keep advertising it then the discovery would be lying to the remote EFSS systems I hope you can verify my changes against the server branch of yours since I couldn't really do the live test |
| #[\Override] | ||
| protected function configure(): void { | ||
| $supportedOptions = implode(', ', $this->getSupportedOptions()); | ||
| $help = <<<HELP |
There was a problem hiding this comment.
Decide to keep this or remove this, I figured maybe a help would be helpful 😄
There was a problem hiding this comment.
Yes. What would be nice is to have an explanation for each setting, what it's for.
Either in this text or per setting.
I'm trying to figure out if that's possible.
So, I assume that I should remove the core ocm |
|
Yes, I think that is the correct thing to do. I checked both sides again. With nextcloud/server#57853, the server no longer owns the invite-accepted implementation and no longer reads The Contacts app now registers the invite-accepted capability and sets So the OCM discovery field is still needed, but the core app-config key is no longer needed in this design. It was only a bridge for the old server-owned discovery behavior. The only thing to keep in mind is that Contacts now depends on the server-side |
Yes |
9b4f002 to
5b70cba
Compare







OCM Invites: Optional Email and UI Improvements
Email is Now Optional
The backend was already set up to handle NULL emails (thanks, database schema!), but the code was still checking for it. Now you can create invites without email, perfect for when you just want to share a link manually. (in my case test suite)
Invite Labels
Now there's an optional label field so you can tag invites with something like "Giuseppe from CERN" or "Test invite for demo". Makes searching way easier, especially for link-only invites.
I just reused the existing
recipient_namecolumn, so no database migrations needed. until the invite accepted by remote the label lives there, after it would be replaced by the actual name returned by remoteUI
The invite details page :
Everything is backward compatible, existing invites with email work exactly like before. No breaking changes here as far as I've tested, if you test it on the SUNET test drive it would be great!
Gallery
Pop up changes, email toggle, invalid or not configured smtp error, etc
Creating a test invite with no email