RFC: Additional application integration points in Contacts, elsewhere
With Geary aiming to use Contacts as its contact management UI (GNOME/geary#133 (closed)), we're looking at making it possible for people to invoke Contacts from Geary to display existing contacts and add new ones. People can make changes in Contacts, and these will be reflected in Geary, which is great. One thing (partially) missing from this however is the connection back in the other direction: Being able to invoke Geary to show conversations (not just send a new email) for a contact from Contacts. Of course, this should be generalised, and so could apply to other email apps (not just Geary) and possibly opening other apps in (Calls/Messages), but also doing this in those in those other apps, too.
This is something that I would expect to see if Geary had its own built-in address book. Being able to show all mail to/from a contact while looking at them in the address book means we don't need to copy the email address, close the address book, open the search and paste the email address, just to get the same result. Geary already exposes an action to search for all mail from a particular email address, but that only works if you are already looking at an email from the person you are looking for. Also, we can just search for mail from the contact by starting to type their name or email address, but that assumes we can remember their email address, or hope that their name isn't too common, like "Bob". Searching for a person in a collection of email is coarse-grained and wrong-headed.
So the primary use case for this in my mind is finding email from a contact you have just had to search for. Maybe in Contacts, maybe in GNOME shell: Alice is thinking about something Bob had said the other day, so she searches for Bob in Activities, and Bob's contact comes up in the list. Selecting it, Contacts is opened, so she then clicks "Show email". Geary opens and shows all email from all of Bob's many email addresses. The recent one is up the top, so Alice selects it. If there are many Bobs and the wrong one is selected, this is easy to repair since Contacts is already open.
Technically, this should be straight-forward to do with an application action name and parameter convention. The app in question could query the default application for say, email, then invoke the "show-contact" action with the Folks id of the contact as a parameter. This is how I've implemented Geary's WIP integration with Contacts, over at GNOME/geary!173 (merged) and GNOME/gnome-contacts!66. So this RFC is like a generalisation of that second merge request. Whether this is actually useful to implement and if so, what would it look like in core GNOME apps, are open questions.