Skip to content

feat(invite-email): make OCM invite email optional and improve UI#14

Open
MahdiBaghbani wants to merge 1 commit intosara-nl:invite-for-cloudid-exchangefrom
MahdiBaghbani:mahdi/fix/ui-optional-email
Open

feat(invite-email): make OCM invite email optional and improve UI#14
MahdiBaghbani wants to merge 1 commit intosara-nl:invite-for-cloudid-exchangefrom
MahdiBaghbani:mahdi/fix/ui-optional-email

Conversation

@MahdiBaghbani
Copy link
Copy Markdown

@MahdiBaghbani MahdiBaghbani commented Nov 29, 2025

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_name column, 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 remote

UI

  • Better spacing and layout
  • Added a checkbox for "Send invite via email", email fields only appear when you check it
  • Clear hint text about what happens if you skip email

The invite details page :

  • Just the essential info, no redundant input fields
  • Three handy copy buttons in a grid: invite link, token, and base64

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

Screenshot 2025-11-30 112601 Screenshot 2025-11-30 112637 Screenshot 2025-11-30 112618 Screenshot 2025-11-30 112649

Creating a test invite with no email

Screenshot 2025-11-30 112709 Screenshot 2025-11-30 112724

@MahdiBaghbani
Copy link
Copy Markdown
Author

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?

Copy link
Copy Markdown

@mickenordin mickenordin left a comment

Choose a reason for hiding this comment

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

I like it!

@redblom
Copy link
Copy Markdown
Collaborator

redblom commented Dec 1, 2025

This could be the opportunity to also add the 'Cc invite to sender' option/checkbox when sending an invite.

@redblom
Copy link
Copy Markdown
Collaborator

redblom commented Dec 1, 2025

There are now discrepancies in terminology regarding token, invite link, (base64) between the create invite and accept invite form. That must be fixed.

@redblom
Copy link
Copy Markdown
Collaborator

redblom commented Dec 1, 2025

Can the 'optional message' field become a multi-line text field again?

@MahdiBaghbani
Copy link
Copy Markdown
Author

MahdiBaghbani commented Dec 1, 2025

This could be the opportunity to also add the 'Cc invite to sender' option/checkbox when sending an invite.

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?

There are now discrepancies in terminology regarding token, invite link, (base64) between the create invite and accept invite form. That must be fixed.

Yes, I feel this too, we can discuss about this

  1. plain invite token is the opaque@fqdn
  2. base64 invite token base64(opaque@fqdn) (imo, I don't like it, but this was added to oCIS, OpenCloud)
  3. WAYF link, which is a bit too technical, so Micke mentioned to change it, so I named it invite link.

Can the 'optional message' field become a multi-line text field again?

Yes, I can make it multi line again

@redblom
Copy link
Copy Markdown
Collaborator

redblom commented Dec 2, 2025

This could be the opportunity to also add the 'Cc invite to sender' option/checkbox when sending an invite.

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, send the invite also to myself (ie. the inviter). So just a checkbox something like this:

  • Also send copy of the invite to myself

@MahdiBaghbani
Copy link
Copy Markdown
Author

MahdiBaghbani commented Dec 6, 2025

Simple Mode

Screenshot 2025-12-06 141052

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

Screenshot 2025-12-06 141130

Advanced Mode

Screenshot 2025-12-06 130908 Screenshot 2025-12-06 130938

Trying to add a share while the email checkbox is on and the email filed is empty
Screenshot 2025-12-06 134815

Re designed the copy section and add a bit of explanation for "non-technical" people, I think this part needs some polishing anyway

Screenshot 2025-12-06 135828

Manual accept form

Screenshot 2025-12-06 135846
  1. Fixed the text here a little bit, and tried to keep it understandable by anyone
  2. Also make sure that this filed can accept anything even the WAYF link itself!
    So when the user accidentally pastes WAYF URL into this box, it will try to find token and provider in that URL string and do the acceptance, if all measures fail, give a proper error message
  3. even on basic mode (no encoded token copy mechanism), this box is able to accept and decode the base64 ones (same as before) so I've clarified that in the text as well

I've decided to make it more configurable like this:

occ config:app:set contacts ocm_invites_optional_mail --value=0|1
occ config:app:set contacts ocm_invites_cc_sender --value=0|1
occ config:app:set contacts ocm_invites_encoded_copy_button --value=0|1

@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?

@redblom redblom force-pushed the invite-for-cloudid-exchange branch from 280c35f to 7a8cc14 Compare January 13, 2026 08:41
@redblom redblom force-pushed the invite-for-cloudid-exchange branch 2 times, most recently from d6a02e3 to 9b66ad3 Compare January 26, 2026 07:52
@redblom redblom force-pushed the invite-for-cloudid-exchange branch from a5432b0 to aed6433 Compare February 3, 2026 14:41
@redblom redblom force-pushed the invite-for-cloudid-exchange branch from aed6433 to 299aea5 Compare February 18, 2026 11:24
@redblom
Copy link
Copy Markdown
Collaborator

redblom commented Apr 7, 2026

@MahdiBaghbani - can you rebase and squash maybe ?

@redblom redblom force-pushed the invite-for-cloudid-exchange branch 2 times, most recently from 3984fd6 to a4ce368 Compare April 8, 2026 14:56
@MahdiBaghbani MahdiBaghbani force-pushed the mahdi/fix/ui-optional-email branch 5 times, most recently from 952e001 to 84ae6e9 Compare April 9, 2026 11:56
@redblom
Copy link
Copy Markdown
Collaborator

redblom commented Apr 10, 2026

@MahdiBaghbani - tested locally and came up with the recommendations below.
Looks great btw. 👍
ps. I'm pushing for merges of this and the required server code. Hopefully soon now.

New Invite:

The email_optional flag:

  • if set to false the email_optional checkbox is not visible. But if we don't specify an email in the invite form the current message still reads: Please enter an email address or uncheck "Send invite via email".
    It should just read: Please enter an email address.

The email:

  • Optional personal message is missing in the email sent (apparently it's not set anymore in the frontend).

Accept invite forms (popup & manual):

  • Explanatory messages on these two forms should be aligned. They have diverged.
    Proposal for both forms:
    • Header: Accept invite to exchange contact info.
    • Explanatory message:
      Accepting will add the inviter to your contacts list and in return, your contact info will be sent to the inviter.
      From there on you can start sharing data with each other.

Accept invite form (manual):

  • the helper and label texts of the input field should match.

All invites list:

  • An invite that has been send by email, and can be resend ('Resend mail' button visible), also shows the 'Copy invite link&code' buttons. I'm not sure this is useful here.
  • For invites that have not been sent by email the 'Sent to' field reads: No email (link-only)
    I think we can remove (link-only). Or indeed, the whole 'Sent to' row.

Settings:

  • maybe create commands for the new config settings

@MahdiBaghbani
Copy link
Copy Markdown
Author

MahdiBaghbani commented Apr 10, 2026

OK! glad you liked it.
I have a bit of a problem over here; I'll try to sort things out early next week and ask for review again.
BTW, you mean pushing to merge this nextcloud#4417 ? It would be cool!

@redblom
Copy link
Copy Markdown
Collaborator

redblom commented Apr 10, 2026

OK! glad you liked it. I have bit of problems over here, I'll try to sort things out early next week and ask for review again.

If you can manage, great, else just give a shout and I can try to do it.

BTW, you mean pushing to merge this nextcloud#4417 ? It would be cool!

Yes! It belongs in there :)

@MahdiBaghbani MahdiBaghbani force-pushed the mahdi/fix/ui-optional-email branch 4 times, most recently from d27eef7 to bdc4766 Compare April 18, 2026 13:59
@MahdiBaghbani MahdiBaghbani force-pushed the mahdi/fix/ui-optional-email branch 12 times, most recently from 1018ef3 to ab8337b Compare April 18, 2026 23:02
Signed-off-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
@MahdiBaghbani MahdiBaghbani force-pushed the mahdi/fix/ui-optional-email branch from ab8337b to 6c6e79f Compare April 18, 2026 23:12
@MahdiBaghbani
Copy link
Copy Markdown
Author

MahdiBaghbani commented Apr 19, 2026

@redblom I know I'm taking more than a week to wrap things up 😃 sorry to keep you waiting!

I tried implementing some of @artonge reviews as well.

This is almost ready but needs a bit more edits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants