Page MenuHomePhabricator

Auto-complete filters from search bar in Flow
Open, MediumPublic

Description

As we observed one way users try to filter topics where a user participated is just to try to write their name in the search bar. By allowing to add filters based on auto-completion we can provide users with a quick option to add common filters.

Advanced search details.png (161×580 px, 11 KB)

In this example, the user writes a user name, and we suggest whether the user wants to add a filter for that specific user (or just search for that text being present in the content.

Some considerations:

  • An icon will be shown to communicate which kind of filter is being added. That will help the user to connect the auto-completed option with the added filter, since they will look similar.
  • To keep suggestions useful, a proper threshold should be set (e.g., only showing user suggestions if more than 4 characters match the username or there is a given delay).

Event Timeline

Pginer-WMF raised the priority of this task from to Medium.
Pginer-WMF updated the task description. (Show Details)

We need to spec what group of users can possibly be suggested:

  • Only users who have participated in the board (probably users in already loaded topics, otherwise we likely need some kind of new index).
  • All users

Also, will this use prefix completion (that would allow among among all users on the site if desired, and is consistent with the mention auto-complete)?

@Mattflaschen those are good points. Thanks.

It is hard to find the balance between (a) the autocompletion triggering with user suggestions you are not interested in and (b) not showing a suggestion when the user explicitly wanted to search for a user.

I initially was thinking on autocompleting all users (based on prefix search) but making sure the auto-completion does not trigger too early, but we may have to experiment and tweak things to find the right balance. Flexible input can help: we can show suggestions as soon as you type "User:C" but suggest "Cronopio" only when the user writes "Crono" or any other restriction we think makes sense such as limiting to the current conversation.
However, I'd not recommend limiting the scope to the loaded topics since we are trying to make that transparent to the user which will lead to unexpected behaviour.