mail icon indicating copy to clipboard operation
mail copied to clipboard

Recipient info next to mail composer

Open jancborchardt opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

When you write a mail to someone or reply, you only have the mail itself as context. You don’t see anything about the person itself except maybe if they have a signature.

Describe the solution you'd like

We could show their contact info next to the composer. Maybe you have some notes in their contact which are relevant for that, or their company name and position. I remember some mail app did this but can not recall which.

Here is a quick mockup for the contact info showing on the right side of the composer.

  • If there is only one person, just show their info right away
  • For multiple people, we could collapse it to just the avatar, main line with name and subline with title, and make it expandable
  • Data can come from Profile and/or Contacts (see below)

Mail composer contacts info

Describe alternatives you've considered

In Talk for example we will likely have to use the Profile info instead of the Contacts info. So to keep things consistent, maybe it’s better to use the same for both. Although for Mail we need to have Contacts as a fallback since otherwise this feature would not work for external people to your organization, nor for single-user instances.

@nickvergessen said we should have a unified endpoint as an OCS API for this, so it would probably best for you to coordinate there @ChristophWurst.

Additional context

Very similar issue in Talk as well for showing additional info of a person when starting a chat: https://github.com/nextcloud/spreed/issues/6293

jancborchardt avatar May 02 '24 14:05 jancborchardt

@nickvergessen said we should have a unified endpoint as an OCS API for this, so it would probably best for you to coordinate there @ChristophWurst.

we should start with that i assume, how should we handle this? @ChristophWurst @nickvergessen

GretaD avatar Jun 27 '24 14:06 GretaD

We can use CardDAV to search for a contact. Alternatively we could use the contacts menu endpoint.

ChristophWurst avatar Jul 08 '24 18:07 ChristophWurst

We have an existing endpoint for contacts. @GretaD use findMatches of src/service/ContactIntegrationService.js

ChristophWurst avatar Jul 18 '24 15:07 ChristophWurst

On a second look the API is insufficient. It does not expose all vcard properties.

ChristophWurst avatar Jul 19 '24 09:07 ChristophWurst

We can do it like https://github.com/nextcloud/mail/pull/9890. It's not a lot of code and avoids creating an API for an API that already exists. We get access to the full VCARD, so all properties that might be set for a contact.

ChristophWurst avatar Jul 19 '24 11:07 ChristophWurst