Bug 318591 - Implement "search when typing"
Summary: Implement "search when typing"
Status: REPORTED
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: contactlist (show other bugs)
Version: git-latest
Platform: Other Linux
: NOR wishlist
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords:
: 328754 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-19 13:18 UTC by Martin Klapetek
Modified: 2015-10-08 13:00 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
a enhancement proposal (4.40 KB, patch)
2014-04-28 21:55 UTC, Renato Atilio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Klapetek 2013-04-19 13:18:07 UTC
Whenever the contact list window has focus and user starts typing, it should start filtering the list. With this and keyboard shortcut we can loose the "Find contacts" button on the toolbar. Question is how to make it discoverable then.
Comment 1 David Edmundson 2013-05-15 21:59:55 UTC
I'm not sure. 

On one hand it makes sense, on the other hand it's not very consistent with any other list.
Comment 2 Martin Klapetek 2013-05-15 22:11:06 UTC
Who says we can't start new trend? ;)
Comment 3 Thomas Pfeiffer 2013-05-15 22:18:07 UTC
Hmm... A quick check on Pidgin and Kopete revealed: 
Pidgin: When I enter part of a nickname while the contact list has focus, it does not filter, but jumps to the first match (only if it's currently shown in the list). 
Kopete: When the contact list has focus, entering the first letters of a name jumps to the contact in the list if it's currently shown. Entering a string contained in the name but not at the beginning does nothing. Filtering is done using the always visible search field

I wonder whether an always visible search bar like in Kopete would be annoying. I was never annoyed by the one in Kopete, but maybe others are. It does offer the best combination of discoverability and qucik access, at the expense of adding a bit of UI chrome to the contact list.

Another consistency issue with Martin's approach is that it would not be possible in the contact list Plasmoid (at least I see no waqy to give it focus without opening a chat at the moment). I also consider with David that we should not go solo here: If we want list filtering by just typing, it should be done everywhere it makes sense, not just in KTp (it may make sense in many places, actually).
Comment 4 Thomas Pfeiffer 2013-05-15 22:20:14 UTC
@Martin: I'm not sure if KTp is big enough to start a new trend just by doing something. Dolphin can do that, but it's used by the vast majority of Plasma users, which I guess is not the case for KTp yet.

Therefore if we want that to become a trend, we'll have to talk to other KDE projects first.
Comment 5 Witold Sosnowski 2013-09-24 21:34:41 UTC
THIS is defenitely one of the most important features for IM. Maybe it's not consistent, but it's actually what i expect from such program - to be able start conversation with somebody as quick as possible.

Clicking small icon for search or search bar input is not convenient. I want to alt+tab to the window and just type fragment of username. Jumping to the first much is not an option either - sometimes usernames start with special characters and it's impossible to start conversation with them without using a mouse.
Comment 6 Daniele E. Domenichelli 2013-09-25 07:49:18 UTC
(In reply to comment #5)
> Clicking small icon for search or search bar input is not convenient. I want
> to alt+tab to the window and just type fragment of username. Jumping to the
> first much is not an option either - sometimes usernames start with special
> characters and it's impossible to start conversation with them without using
> a mouse.

You can use alt+tab ctrl+f and start typing, without using a mouse
Comment 7 4k1r4.rulez 2013-11-19 09:35:40 UTC
It is really great idea, ctrl+f or hittin a small icon is just one more thing to do. I'm usually start typing the name and after a few keystrokes i realize nothing happens. More native (at least for me) is to start searching as soon as I type, it could be implemented like this:

void TextUiClass::keyPressEvent(QKeyEvent* event)
{
    if(ui->rosterView.hasFocus() == 0) // roster page
    {
        if(event->matches(QKeySequence::Find) || # the ctrl+f key stays the same
              (event->key() <= Qt::Key_9 && event->key() >= Qt::Key_1) ||
              (event->key() <= Qt::Key_Z && event->key() >= Qt::Key_At) ||
              (event->key() == Qt::Key_Backspace))
        {
            ui->searchBarEdit->show();
            ui->searchBarEdit->setFocus();
            ui->searchBarEdit->event(event);
        }
        else if(event->key() == Qt::Key_Escape)
        {
            ui->searchBarEdit->clear();
            ui->searchBarEdit->hide();
            ui->rosterView_->setFocus();
        }
        else if(event->key() == Qt::Key_Up ||
                event->key() == Qt::Key_Down ||
                event->key() == Qt::Key_PageUp ||
                event->key() == Qt::Key_PageDown)
        {
            ui->rosterView_->setFocus();
        }
    if(event->key() == Qt::Key_Escape)
    {
        event->ignore();
        return;
    }
}
Comment 8 Martin Klapetek 2013-12-13 09:51:23 UTC
*** Bug 328754 has been marked as a duplicate of this bug. ***
Comment 9 Renato Atilio 2014-04-23 00:21:07 UTC
This is the first thing I noticed when I initially tried to migrate* from Pidgin to KTp.

Actually, Pidgin opens a little popup when you start typing and what you type on the popup is used to select the contact on the contacts list (not to filter the rows of the contacts list) and you can navigate between the results with the UP and DOWN keys.

You have mentioned Dolphin, but when you start typing on Dolphin it at least selects the files/directories beginning with the term typed. In KTp it is annoying that nothing happens at all when you start typing. So at least a Dolphin-like behavior will be great.

* Now I'm using KTp because I remapped KRunner from "Alt + F2" to "Meta + Space" and using the "telepathy-contact-runner" I just type "Meta + Space" and start searching for the contact.
Comment 10 Renato Atilio 2014-04-28 21:55:10 UTC
Created attachment 86321 [details]
a enhancement proposal

I understand you said that creating a new trend is not a KTp intention.

However, we would be exchanging a void action (typing does absolutely nothing currently) for a very useful feature.

I've taken some time and created a diff for some things I consider enhancements to the current behavior of the contacts list.

I know It's unlikely that anything I did will be accepted, but that was something I wanted to dedicate some time to as this is a feature I still miss on KTp.

What the diff does:
1. Focus the contacts list tree view instead of the status combo box on the window opening
2. When searching, focus the contacts list and select the first visible index - so the user can just type Enter after selecting the contact, if needed, to open the chat window
3. When typing on the contacts list, it captures the key events and send them to the filter bar so it can determine if the event is a text insertion, a backspace or a close request
4. Set the focus on the contacts list after a close request

The branch to apply this patch is kde-telepathy-0.8