GNOME Bugzilla – Bug 714160
Desktop contacts integration
Last modified: 2019-03-17 04:06:22 UTC
---- Reported by jim@yorba.org 2011-08-07 08:02:00 -0700 ---- Original Redmine bug id: 3952 Original URL: http://redmine.yorba.org/issues/3952 Searchable id: yorba-bug-3952 Original author: Jim Nelson Original description: Speaking with Robert Ancell at Desktop Summit 2011, he pointed out some of the features of EDS that are relevant to Geary, in particular its contact management. We should also investigate Folks and see how it might fit in with Geary. (Folks and GNOME Contacts use EDS as a backend.) ---- Additional Comments From geary-maint@gnome.bugs 2013-01-30 10:55:00 -0800 ---- ### History #### #1 Updated by Christian Dywan over 1 year ago * **Description** updated (diff) * **Assignee** set to _Christian Dywan_ #### #2 Updated by Adam Dingle over 1 year ago Christian, we haven't had time to look into Folks, GNOME Contacts and EDS at all. If you investigate this we'd be interested to hear your thoughts about how (or whether) we should integrate these technologies into Geary. #### #3 Updated by Christian Dywan over 1 year ago libfolks gives us all contacts from all possible sources, including EDS and Telepathy - GNOME contacts is a frontend based on that. That means we can do autocompletion in entries. In the conversation view we can lookup avatars and display names where there's only an email address. Lastly both cases could be augmented with names and addresses automatically collected from all messages, so you could complete names even without adding a contact. #### #4 Updated by Adam Dingle over 1 year ago That all sounds good to me. Looks like libfolks is installed by default in Ubuntu (at least in Precise), so I think the dependency should be OK. #### #5 Updated by Christian Dywan over 1 year ago * **File** _0001-Require-libfolks-libebook-and-folks-backends.diff_ added * **File** _0002-Gather-contacts-for-completion-in-EmailEntry.diff_ added I added contact lookup and build dependencies so we can have completion via libfolks. The patches are NOT done but you can have a look at where it's going. For now I added two hash tables to store names and addresses respectively. This partly crosses with issue #4284 and will need discussion. Next thing I'm going to add the actual completion by adding an EntryCompletion and manual key handling. #### #6 Updated by Adam Dingle over 1 year ago Great. Jim, can you review this work in progress? #### #7 Updated by Christian Dywan over 1 year ago * **File** _0004-Gather-contacts-for-completion-in-EmailEntry.diff_ added Implemented Gtk.EntryCompletion, triggers at > 2 characters, searches the hash tables, performs string canonicalization. Notably only works for the first address right now, so not finnished yet. #### #8 Updated by Christian Dywan over 1 year ago * **File** _0004-Gather-contacts-for-completion-in-EmailEntry.diff_ added I added heuristics in case full_name is not available. There's an open upstream bug about it, which I added for reference, to handle that in libfolks. Patch updated according to changes on issue #4313. #### #9 Updated by Adam Dingle over 1 year ago * **Subject** changed from _Investigate Folks and EDS_ to _autocomplete contacts from libfolks_ * **Priority** changed from _Normal_ to _High_ * **Target version** set to _0.1_ #### #10 Updated by Adam Dingle over 1 year ago * **Tracker** changed from _Task_ to _Feature_ #### #11 Updated by Eric Gregory over 1 year ago * **Tracker** changed from _Feature_ to _Task_ Christian, I know you're still hard at work on this but I have a couple of nitpicky things about the most recent diff: 1. Yorba style prohibits a space between method names and the opening paren. 2. To be consistent, we want to reserve the Geary namespace for the engine. (Names like GearyEmailEntry are fine, though.) #### #12 Updated by Christian Dywan over 1 year ago * **File** _0003-Gather-contacts-for-completion-in-EmailEntry.diff_ added Fixed spacing, added on_, removed namespace, moved ContactDatabase to a separate file, completion triggered through each comma - the remaining flaw is if you go back to the start of the string it won't be recognized. Even though I advocated for graphical buttons, I think it's better not to block on fleshing out the styling, and we might go for HTML UI later anyway as came up in the discussion, so this is almost-working text-only completion. #### #13 Updated by Jim Nelson over 1 year ago * **Status** changed from _Open_ to _Review_ That sounds good, Christian. Eric, please review. #### #14 Updated by Adam Dingle over 1 year ago Christian, I applied your latest patch, attempted to build and got this: /home/adam/geary/src/client/ui/contact-database.vala:10.5-10.9: error: The symbol `Folks' could not be found /home/adam/geary/src/client/ui/contact-database.vala:13.22-13.26: error: The symbol `Folks' could not be found ... Any idea about what could be wrong? #### #15 Updated by Eric Gregory over 1 year ago I couldn't get this to work either. I tried adding Folks to the wscript, but for some reason it wasn't able to locate the package. From the command line, pkg-config finds it with no problem and reports a version of 0.6.8. Christian, could you give this one another look? #### #16 Updated by Christian Dywan over 1 year ago Sorry guys, I posted the libfolks patch first and only updated the entry patch. Redmine doesn't really encourage updating multiple patches it seems. #### #17 Updated by Christian Dywan over 1 year ago * **File** deleted (<strike>_0002-Gather-contacts-for-completion-in-EmailEntry.diff_</strike>) #### #18 Updated by Christian Dywan over 1 year ago * **File** deleted (<strike>_0004-Gather-contacts-for-completion-in-EmailEntry.diff_</strike>) #### #19 Updated by Christian Dywan over 1 year ago * **File** deleted (<strike>_0004-Gather-contacts-for-completion-in-EmailEntry.diff_</strike>) #### #20 Updated by Christian Dywan over 1 year ago * **File** _0002-Gather-contacts-for-completion-in-EmailEntry.diff_ added #### #21 Updated by Christian Dywan over 1 year ago * **File** deleted (<strike>_0001-Require-libfolks-libebook-and-folks-backends.diff_</strike>) #### #22 Updated by Christian Dywan over 1 year ago * **File** deleted (<strike>_0003-Gather-contacts-for-completion-in-EmailEntry.diff_</strike>) #### #23 Updated by Eric Gregory over 1 year ago We haven't gotten too many patches via Redmine so far except for yours, so if you have any suggestions on how we could make it fix or improve it, let us know. We'll see what we can do. #### #24 Updated by Christian Dywan over 1 year ago For one, there's no way to update a patch and easily remove a previous one, Bugzilla allows you to mark patches as 'obsolete'. The other problem is, comments go **newest last** but there's no patch overview at the bottom, ergo easy to lose yourself especially with these distracting striken-out 'was deleted' lines. #### #25 Updated by Adam Dingle over 1 year ago * **Status** changed from _Review_ to _Open_ I tried out this patch - it looks promising. Christian, was your intention that this is ready to commit, or did you want a review of work in progress? The patch prints some information to standard output - we don't want that in any final patch. For me, the patch displays email addresses but not names. If I type 'jim ', I see this in the autocomplete box: <jim@yorba.org> <jimbonator@gmail.com> I would expect to see Jim Nelson <jim@yorba.org> Jim Nelson <jimbonator@gmail.com> Is this a bug or a missing feature? Here's another problem. If I type 'jim ', Geary displays the list above. Now if I type Ctrl+A (to select all text), then 'l' (to replace the selected text), Geary still displays the autocompletion list for 'jim '. This is wrong. Finally, if I type `jim@yorba.org` literally into the To: field, then with each successive character I type Geary adds a duplicate entry to the autocomplete box, so I see this: jim@yorba.org jim@yorba.org jim@yorba.org ... The box should never display duplicate entries. Please address these issues and send another patch. Thanks! #### #26 Updated by Adam Dingle over 1 year ago Christian: Also, as I run Geary with your patch I sometimes see this on the console: (geary:3918): folks-CRITICAL **: folks_alias_details_get_alias: assertion `self != NULL' failed (geary:3918): folks-CRITICAL **: folks_name_details_get_full_name: assertion `self != NULL' failed (geary:3918): folks-CRITICAL **: folks_name_details_get_nickname: assertion `self != NULL' failed (geary:3918): folks-CRITICAL **: folks_email_details_get_email_addresses: assertion `self != NULL' failed Oddly, these messages seem to appear not while autocompletion is occurring, but some time afterward. #### #27 Updated by Christian Dywan over 1 year ago The patch was meant to be almost done, apparently you found new bugs. I indeed see the name problem, looks like a "regression" in the patch, I haven't seen the assertions or the selection issues here, but I'll think of something. Thanks a lot for your feedback. #### #28 Updated by Christian Dywan over 1 year ago * **File** _0001-Gather-contacts-for-completion-in-EmailEntry.diff_ added * **% Done** changed from _0_ to _70_ Only using one hash table now, containing canonicalized keys and values ready for display, so duplicates shouldn't occur from matching both name and address. Aliases show up separately on purpose. There's still something off in the cursor position code, I need to have another look. #### #29 Updated by Adam Dingle over 1 year ago Christian, I just tried this latest diff. Looking a bit better - still some issues: * If I type 'jim@yor', then I see a completion box with 'Jim Nelson <jim@yorba.org>'. That's good. If I then press the down arrow and then Enter, the To: box now looks like this: 'jimyorJim Nelson <jim@yorba.org>'. * If I type just 'jim', I don't see any autocompletion at all. I think should trigger it after even one or two characters are typed (but limiting the length of the autocomplete list if there are many matches). * I still see the bug I mentioned before that happens if I select all and then type to replace the selection. * When we display an email address with no name, I think it would be nicer to omit the angle brackets - they look a bit techie and don't really convey anything useful. #### #30 Updated by Adam Dingle over 1 year ago * **Tracker** changed from _Task_ to _Feature_ #### #31 Updated by Adam Dingle over 1 year ago * **Target version** deleted (<strike>_0.1_</strike>) #### #32 Updated by Adam Dingle over 1 year ago * **Target version** set to _0.2_ #### #33 Updated by Christian Dywan over 1 year ago * **File** 0001-Gather-contacts-for-completion-in-EmailEntry.diff added Updated for cmake, added unit tests for validation, determining the "current" name and for inserting completion. Unfortunately I'm only slowly making progress here, closer but still not quite right. #### #34 Updated by Christian Dywan over 1 year ago * **File** deleted (<strike>_0002-Gather-contacts-for-completion-in-EmailEntry.diff_</strike>) #### #35 Updated by Christian Dywan over 1 year ago * **File** deleted (<strike>_0001-Gather-contacts-for-completion-in-EmailEntry.diff_</strike>) #### #36 Updated by Jim Nelson over 1 year ago I looked over your patch Christian. In case you're unaware, this patch against trunk crashes when I attempt to compose a message. One of your tests is failing: * ERROR **: match: input: 'Colin,Martin,kev' at 15 completes with 'Kevin' expected: 'Collin,Martin,Kevin' got: 'Colin,MartKevin' cursor text: MartKevin insert at: 10 new position: 15 Obviously I can't try out the patch with this problem. Looking over the code, everything else looks more or less fine, and I can tell you're making progress on this. #### #37 Updated by Christian Dywan over 1 year ago * **Assignee** deleted (<strike>_Christian Dywan_</strike>) #### #38 Updated by Jim Nelson over 1 year ago I've made a wiki page discussing our general integration plans for libfolks with Geary. #### #39 Updated by Adam Dingle over 1 year ago * **Target version** deleted (<strike>_0.2_</strike>) #### #40 Updated by Jim Nelson 10 months ago * **Category** set to _contacts_ --- Bug imported by chaz@yorba.org 2013-11-21 20:25 UTC --- This bug was previously known as _bug_ 3952 at http://redmine.yorba.org/show_bug.cgi?id=3952 Imported an attachment (id=260875) Unknown version " in product geary. Setting version to "!unspecified". Unknown milestone "unknown in product geary. Setting to default milestone for this product, "---". Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one. Resolution set on an open status. Dropping resolution
*** Bug 724185 has been marked as a duplicate of this bug. ***
Just adding a +1 for this in hopes it would bring LDAP integration. Mainly, I want this bug to show up in the search results for "ldap" since there were previously no mentions of it anywhere I could find.
I'd love to have this feature. Looking for contact information in a browser window and then having to paste it on composer seems to be a hassle. Plus, I think most users have their contact list "curated" in gmail/hotmail/yahoo etc. so it definitely be nicer to pull them from there through Folks. I'd like to help out to have this merged. Any starting points?
You should also be aware of bug #714696, which is about creating a contacts manager for editing the contacts Geary currently maintains. The questions before we begin is, do we use Folks or EDS? EDS seems the most logical choice, since its contacts manager is designed especially for email. There's also the question of which Geary account is tied to which contacts database in EDS (if it has the notion of such a thing, which I think it does). The current patch might be a place to start with, but so much has changed in Geary and with autocomplete, it's probably best to start coding from scratch.
This and the signature (#712895) thing are the only features for me to fully replace gmail with geary, everything else is looking great. I'm hoping I can get something done for the autocomplete soon as time and my experience with vala allows me, however I'm not very fond of either Folks or EDS in a technical perspective, AFAIK: * Folks can retrieve contact information from GOA, which is what I have set up. This is important to me (and I'm guessing to anybody else using gmail/yahoo/live etc.) since nowadays is pretty common to add contact information from many devices, I usually add contact information from my tablet or smartphone (android) and then that information is available automagically in any device I have synced with google account. So geary or any other software can pull the info from GOA easily and have it in sync. * EDS relies on Evolution (not the client per se, but the libraries/core) which I'm not sure if shares its database to any other software / components So I guess the starting point would be to choose wisely as what offers the best sync experience. Like I said, I think most people would want this "2-way sync" in these many-devices days and whatever brings that is the best option, at least for me. I don't see the need to add contact management functionality (right now) within geary since you can already do that in gnome contacts but then again, that is only if using whatever gnome contacts uses to manage such database which if I'm not mistaken is Folks underneath. Take for instance, a person who mailed me a couple of days ago, I replied to him within geary and then I updated his information (with name, address, phone, etc.) on gmail later, but a couple of days later, when composing a new message, the autocomplete that already exists on geary worked only by typing his email address, not his personal name, of course this is because the first email sent / received in geary was stored in SQLite with whatever it had at the moment which was just the email address. For me, it would be great to have at least a way to maintain such information sync in a way that the next time I type the name or last name, the autocomplete shows the related addresses. OTOH, the links to the folks VAPIs in valadoc.org are broken, any other place to have a look?
As I understand it, Folks uses EDS as its back-end (or one of its back-ends), and so I don't think talking to Folks for contact information will keep EDS off of our dependency list one way or another. EDS also supports GOA, so that's taken care of. What you're describing is one problem this ticket represents: merging Geary's harvested email contacts with those from an outside source. In your example above, you're correct, you want to see the "full" email address, but you don't want to see both email addresses. That'll be an important part of this work. The only other place I can think of to look for Folks stuff is in Folks' git repo.
Alright, so the least expected for this feature would be: * Pull from a source that syncs with the main source database (case for gmail, live, etc.) which in this case would be essentially GOA * Update first name and last name on geary SQLite db from this pulled information from GOA, using the email as key, so that autocomplete triggers and searches this database either by first name, last name or email * Anything else?
First, I'm unsure where in the database you think should be updated. I do not think EDS/GOA/Folks/whatever contacts should be merged or added to the existing contacts list. That introduces a synchronization nightmare. My vision was to pull in the contacts at runtime. Since pulling contacts across the wire might be expensive, we might need to load them all into memory. If that's excessive, we could consider a temporary database table to store them in, but keep that separate from Geary's cache. That's my general notion about how this would work. Does that make sense?
If I remember correctly, using the folks database was not possible since there was no easy way to search it. This is in the works now: https://bugzilla.gnome.org/show_bug.cgi?id=646808
Any news about autocompleting contacts from EDS/GOA/Folks/whatever ?
I really think Geary should use the contacts from Gnome Contacts application. When you have synched your Google account it's really useful to find all your contacts easily.
I agree with comment 11 - this seems like the natural thing and supports Geary as the default choice for a mature modern GNOME desktop.
(In reply to Jim Nelson from comment #8) > First, I'm unsure where in the database you think should be updated. I do > not think EDS/GOA/Folks/whatever contacts should be merged or added to the > existing contacts list. That introduces a synchronization nightmare. > > My vision was to pull in the contacts at runtime. Since pulling contacts > across the wire might be expensive, we might need to load them all into > memory. If that's excessive, we could consider a temporary database table > to store them in, but keep that separate from Geary's cache. > > That's my general notion about how this would work. Does that make sense? That's seems good. You keep Gnome contacts and Geary db separate. But you "import" or sipmly use if possible the Gnome contact too. I think it will be good to add an option to let the user choose if he prefer the Gnome contacts only or Geary db only or both.
I'd really like to get this in Geary. After having a read, the following seems like a somewhat easily achievable target: Geary should use whichever of libfolks/EDS will give us access to GOA contacts. For now treat it as a read-only source - i.e. don't try to update contacts there, and don't save addresses from this source specially in Geary - that will happen naturally over the course of a conversation. When the user is typing in an email address in the composer, we want to fire off an async search for contacts with a matching name or email address, and when hits start coming back from the source, they should be inserted into a separate section above any matching contacts from Geary's internal contact store: -------------------------... To: | Mi -------------------------... | Michael Gratton (home) <mike... | Mimi Adamson (work) <mimi.a@... | Mimi Adamson (home) <mimia@... |-------------------------... | Michalea Johnson <micha@... | Min Liu <minliu@... | Mitch Johnson <mitch@... `-------------------------... If a contact is matched by name, all of their email addresses should be included, otherwise just include their name and the matching address. Bonus points for displaying the label for each address (as shown in the mockup above) and user avatar (not shown in the mockup), if either is set. This can then be refined in the future. Unfortunately I won't have time to work on it for a while, so patches welcome!
Hello Michael, This is a so much needed feature and I was wondering if you now have the time to make it happen ? Thanks !
Hey Jeremy, (In reply to jeremy9856 from comment #15) > > This is a so much needed feature and I was wondering if you now have the > time to make it happen ? This isn't on my radar for the next major release (0.12). It is a high priority however so I will be looking into it for 0.13 or 0.14 if no one has already submitted any patches for it before then.
*** Bug 713347 has been marked as a duplicate of this bug. ***
Retitling to match https://gitlab.gnome.org/GNOME/geary/issues/133, which this will eventually become a duplicate of.
This is going down over in https://gitlab.gnome.org/GNOME/geary/issues/133 and will be released in 3.34. Please subscribe over there for testing an updates.