Adium

Opened 14 years ago

Closed 13 years ago

Last modified 10 years ago

#6444 closed enhancement (fixed)

Search functionality for finding contacts in the contact list

Reported by: KhAoTiK TaChYoN Owned by: nobody
Milestone: Adium 1.3 Component: Adium UI
Version: Severity: normal
Keywords: find contact Cc:
Patch Status: Accepted

Description

Maybe there should be a way to find a contact. I've got several groups, but some are always crowded with ppl... sometimes I find myself looking for a contact, wasting lot's of time. It would be a good feature.

Attachments (4)

contactListFiltering.diff (114.9 KB) - added by dogtown08 13 years ago.
Early implementation of contact list filtering via a filter bar 3
listfilter.diff (112.5 KB) - added by David Smith 13 years ago.
Some improvements
listfilterRevised.diff (211.5 KB) - added by dogtown08 13 years ago.
New version of contact list filtering- This one should patch cleanly
listfilterRevised2.diff (211.5 KB) - added by dogtown08 13 years ago.
final(?) patch- Fixes: The first actual contact on the contact list is now determined correctly; The first result contact is now automatically selected, return opens a chat with that contact; The filter bar can now be hidden by clicking the "x" in the search field or by hitting escape; And only key events on the contact list with characters not in [NSCharacterSet controlCharacterSet] are forwarded to the search field (showing it if necessary)

Download all attachments as: .zip

Change History (26)

comment:1 Changed 13 years ago by Jordan

Milestone: Good idea for "later"
Patch Status: None
priority: normallow
Summary: Find a contactSearch functionality for finding contacts in the contact list
Type: defectenhancement
Version: 1.0.2

You can start typing while having the contact list in focus and it will highlight the contact with the name you just typed in, however this only works if the contact's name starts with what you started typing. If they use funky characters in their name, it won't work (like * or %).

Perhaps a search bar just below the user info bar at the top and directly above where the contact list starts would be a good idea - it would filter the list with the contacts with the entered text in either their friendly name, display name, user name or email address.

You would of course have the option to disable or enable the search bar from a checkbox within the contact list display preferences.

comment:2 Changed 13 years ago by Berkz

Please gief this feature. It's like the only thing missing from Adium.

comment:3 Changed 13 years ago by Ilan Rabinovitch

Looks like this feature has appeared in svn. A bit buggy at the moment, but looking great.

comment:4 Changed 13 years ago by Zachary West

Milestone: Good idea for "later"
pending: 0
Resolution: fixed
Status: newclosed

Indeed. And there's other tickets for it in that milestone.

comment:5 Changed 13 years ago by dogtown08

I uploaded what I have done so far with contact list filtering. Here is a quick video of it in action: http://caffeinatedcocoa.com/contactListFiltering.swf

The only bug I know of is that it does not play nice with offline contact hiding because it independently decides whether to hide or show a contact whenever the list changes. I'm not sure of the best way to fix that. I think we might need to move all contact visibility changes into one class.

comment:6 Changed 13 years ago by Zachary West

Patch Status: NoneNeeds Dev Review

comment:7 Changed 13 years ago by Zachary West

Resolution: fixed
Status: closedreopened

Changed 13 years ago by dogtown08

Attachment: contactListFiltering.diff added

Early implementation of contact list filtering via a filter bar 3

Changed 13 years ago by David Smith

Attachment: listfilter.diff added

Some improvements

comment:8 Changed 13 years ago by David Smith

I was excited about this, so I hacked up some improvements we discussed on irc. Relative to the previous version, this:

  • Disables list horizontal autosize while searching
  • Disables list animation while searching
  • Stores the predicate template in a static (is this worthwhile at all? might not be) rather than re-creating each time
  • Fixes a crash on contact list close

comment:9 Changed 13 years ago by David Smith

Apologies for the ticket spam. Just wanted to note (so that I don't forget) that hitting return in the searchfield should probably open the first contact on the list, hitting escape or clicking away from it should probably close it, and the offline hiding interactions still need to be worked out.

comment:10 Changed 13 years ago by Eric Richie

Milestone: Contact List Live Searching

comment:11 Changed 13 years ago by David Smith

dogtown08: planning on finishing this up? It's so close!

comment:12 Changed 13 years ago by Christopher J. Bottaro

I would like to have a "Find contact as you type" dialog that works almost exactly like TextMate's "Go To File..." (command+t) feature.

I like TextMate's search algorithm also. All it cares about is the order of the characters typed. For instance, I could search for the contact "clockworks" by typing "lkr".

Also, we should able to assign opening this dialog to a global shortcut (or an easy way to access it via Quicksilver).

comment:13 Changed 13 years ago by Jordan

I'm fairly sure both of those are how the existing code works, it's got find as you type and there's a menu option for it which will likely have a keyboard shortcut associated with it.

I'm not so sure I agree that typing any letters, as long as they are in order, thing. That can be very confusing for the average user - remember that Quicksilver is only really used by power users, and even then only a select few. As a result of that they put in features that make sense only to power users. Many people would be confused as to why some contacts are appearing in the search results when their name doesn't contain the searched word.

comment:14 in reply to:  13 Changed 13 years ago by Christopher J. Bottaro

Replying to jas8522:

I'm fairly sure both of those are how the existing code works, it's got find as you type and there's a menu option for it which will likely have a keyboard shortcut associated with it.

Existing code as in 1.2.3? In that version, neither "New Chat..." (command+n) nor typing while the contact list has focus does what I'm talking about, which is shrink the list of available choices as you type into a text field, allowing you choose the contact you want with the arrow buttons from the shrunken list.

I'm not so sure I agree that typing any letters, as long as they are in order, thing. That can be very confusing for the average user

That's a good point. Algorithm proposal number two: space separate words (as long as they are in order). Example: searching for "John Stinky Smith", you type "john smith" or simply "jo sm" or "stinky smith" or "st sm".

comment:15 Changed 13 years ago by Jordan

Not 1.2.3, there is a branch in the repository that contains mostly working code to do exactly this. It's got a few flaws that need to be fixed (a couple of which were rather serious problems) before it can be included in a release.

I'm not sure if space separated words were done or not - certainly individual partial words were working great. When this finally gets included in a release, if it does not have this method of search then you can always open a new ticket to request it. Until then we wait for the feature to be completed! If you happen to write Cocoa apps yourself, feel free to checkout the contact list live searching branch and write some patches!

comment:16 Changed 13 years ago by dogtown08

Hey, Sorry it has been so long... I've been busy with other projects and general school evilness.

I will try to finish it up this weekend.

comment:17 Changed 13 years ago by David Smith

No worries :)

comment:18 Changed 13 years ago by dogtown08

This new patch fixes a few issues:

  • No longer conflicts with offline contact hiding. All hiding is now done through one class: AIContactHidingController. It keeps track of state changes for contacts and applies the predicate for a search. It then determines if the visibility should actually change based on a set of rules. It is not the cleanest solution, but i hope it is ok.
  • Fixed display bugs by disabling vertical autoresizing during the filter bar animation
  • The contact list window shrinks automatically when vertical autoresizing is enabled and the filter bar is hidden
  • Hitting return when the search field is the first responder will do one of two things:

(a) if there is only one result, it opens a new chat with that result (b) If there are multiple results, it makes the contact list the first responder and selects the first contact

  • Hitting the down arrow key when the search field is the first responder will select the first contact

Changed 13 years ago by dogtown08

Attachment: listfilterRevised.diff added

New version of contact list filtering- This one should patch cleanly

Changed 13 years ago by dogtown08

Attachment: listfilterRevised2.diff added

final(?) patch- Fixes: The first actual contact on the contact list is now determined correctly; The first result contact is now automatically selected, return opens a chat with that contact; The filter bar can now be hidden by clicking the "x" in the search field or by hitting escape; And only key events on the contact list with characters not in [NSCharacterSet controlCharacterSet] are forwarded to the search field (showing it if necessary)

comment:19 Changed 13 years ago by David Smith

Resolution: fixed
Status: reopenedclosed

(In [22859]) Live contact list searching, hooray! Many thanks to Adam Leonard for both the large amount of work that went into this, and for putting up with my constant nitpicking reviews ;)

Fixes #6444. Please file followup bugs if anyone encounters issues with this.

comment:20 Changed 13 years ago by (none)

Milestone: Contact List Live Searching

Milestone Contact List Live Searching deleted

comment:21 Changed 12 years ago by Robert

Patch Status: Needs Dev ReviewAccepted

comment:22 Changed 12 years ago by Robert

Milestone: Adium X 1.3
Note: See TracTickets for help on using tickets.