Page MenuHomePhabricator

Input text should be kept when switching to another project
Closed, DuplicatePublicFeature

Description

Use case 1:

  1. I type some input in the "Search by Regexp" field.
  2. I noticed I forgot to choose the project, so in click for example on "MediaWiki code".
  3. Input is lost, I have to type it again.

Use case 2:

  1. To get exhaustive results, I stay on "Everything", type some input in the "Search by Regexp" field, and run the search.
  2. I notice there are too many search results, so I click on a project to refine the search.
  3. Input is lost, I have to type it again.

Actual:
When switching to another project, input is lost and we have to type it again.

Expected:
It would be very great if the search input was kept when switching between projects :)

Event Timeline

You should use the beta https://codesearch-beta.wmcloud.org/ which has that feature and a lot more.

The beta version keeps the input in "use case 2", but not in "use case 1".

  • After a search has been made, the input is kept if the user switches to another project. ("use case 2")
  • But, if the user switches to another project before running the search, the input is lost. ("use case 1")

I found a quite major defect in the beta:

  1. Run a search (e.g. "foo").
  2. Change the text in the input (e.g. replace with "bar"). Do NOT click on "Search".
  3. Click on another project. The new search is automatically launched.

Expected: The search should be run with the current input. ("bar")
Actual result: The search is run with the previous input! ("foo")

Also, I found quite surprising that clicking on another project automatically launch the search.
I think it should rather blank the results (of course keeping the input), and launch the search only when the user clicks on "Search".
Yes, that would mean an additional click, but I think it would be less confusing.


Alternatively, and maybe better, you could move the project buttons below the search inputs,
so they are not considered as "tabs" anymore, but as "run search" buttons.

It would require a few adjustments:

  • remove the "Search" button, now redundant
  • maybe add some label "Search on:" before the project buttons
  • find some place to put the "Searching..." throbber (which currently takes place of the "Search" button)