Recipient info next to mail composer
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)
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
@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
We can use CardDAV to search for a contact. Alternatively we could use the contacts menu endpoint.
We have an existing endpoint for contacts. @GretaD use findMatches of src/service/ContactIntegrationService.js
On a second look the API is insufficient. It does not expose all vcard properties.
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.