Page MenuHomePhabricator

Clicking the search icon in empty search field should link to advanced search
Closed, ResolvedPublic

Description

We have two little usability problems that could be neutralized in one go:

  1. There is no direct link to https://secure.phabricator.com/search/query/advanced/ , and users must perform a search to know it exists.
  2. Users clicking the fa-search icon with an empty search field at the header end up at the beginning of the list of results of the first saved search, which is confusing until the day you understand why this happens (you were not asking for that specific query).

What about applying this simple behavior: clicking the fa-search icon with an empty search field takes you to https://phabricator.wikimedia.org/search/query/advanced/

Original reported at https://phabricator.wikimedia.org/T370

Event Timeline

qgil raised the priority of this task from to Needs Triage.
qgil updated the task description. (Show Details)
qgil added a project: Search.
qgil updated the task description. (Show Details)
qgil added a subscriber: qgil.
chad renamed this task from Clicking fa-search icon in empty search field at the header should link to the general advanced search to Clicking the search icon in empty search field should link to advanced search.Dec 1 2014, 2:36 AM
epriestley added a subscriber: epriestley.

I think the simplest fix is:

  • In PhabricatorSearchController, there's a special case if search:primary is present in the request, indicating that the form submission came from the main menu.
  • If that's set, and if (!strlen($request->getStr('query'))) { ... } (i.e., the user didn't type anything), return an AphrontRedirectResponse taking the user to /search/query/advanced/.
  • Clicking just the search icon should then take you to an empty search form, instead of performing a useless search for the empty string.