Page MenuHomePhabricator

Implement a scope selector for the global search
ClosedPublic

Authored by epriestley on Apr 22 2015, 7:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 23, 2:25 AM
Unknown Object (File)
Fri, Mar 15, 11:29 AM
Unknown Object (File)
Fri, Mar 15, 11:29 AM
Unknown Object (File)
Fri, Mar 15, 11:29 AM
Unknown Object (File)
Fri, Mar 15, 11:29 AM
Unknown Object (File)
Wed, Mar 13, 3:30 PM
Unknown Object (File)
Wed, Mar 13, 3:30 PM
Unknown Object (File)
Wed, Mar 6, 5:06 PM

Details

Summary

See M1433. Fixes T7266. Fixes T4475. Ref T7314.

Future work/notes/etc:

  • Write the User Guide (see TODO).
  • This might needs some design tweaks -- I think it's functionally almost-equivalent to the mock, but the UI isn't quite the same.
  • (Mobile design is a touch off-looking I think?)
  • When you use a custom query, the duplicate "magnifying glass" icons are a little weird. Maybe change one or the other.
  • Maybe worth adding an "Open Documents in Current Application" option? Planning to wait for feedback on that.
  • Need a Quicksand integration to change the current application at some point.
  • Searching in "Current Application" from, e.g., the 404 page just searches all documents. Current plan is to just document this behavior, since the icon is a pretty good callout and it seems plausible that this is intuitive enough that users won't have a hard time with it.
Test Plan

New dropdown:

Screen_Shot_2015-04-22_at_12.09.28_PM.png (347×440 px, 43 KB)

Device-ish:

Screen_Shot_2015-04-22_at_12.10.14_PM.png (1×616 px, 178 KB)

Normal search (current application, from maniphest, selects tasks):

Screen_Shot_2015-04-22_at_12.09.49_PM.png (1×1 px, 186 KB)

Application search from non-application:

Screen_Shot_2015-04-22_at_12.09.42_PM.png (1×1 px, 169 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Contextually, this is vaguely adjacent to T4100, since I plan to write search user guides next and this saves me from rewriting this stuff after we implement this.

dat puzzle piece tho. ?

(patching locally to play with)

Yeah the puzzle piece is a bit sketch ("globe" seemed best for "all documents", but maybe something like "fa-files-o" would work better), and the double-magnifying-glass is even worse, but nothing jumped out at me as clearly the right pick in 10 seconds of looking.

Oh, I see, in the mock I had it dynamic to the application, but really we're just setting a preference.

Yeah, it's just a secret preference.

I could make the menu item say "Current Application (Maniphest)" or whatever, but I worry that will be kind of confusing since you're really setting a preference for "always search the current application, whatever that application might be".

Actually a dynamic icon I don't think would be too confusing. At least, when I'm in Maniphest, I'll see and be reminded its a local search before any dropdown.

Oh, yeah, that's a great idea.

I still need a default icon for when you aren't in an application (e.g., 404 page) or the application isn't searchable (e.g., Auth), do you see a better option than this to get rid of the puzzle piece?

  • All Documents
  • Curent Application

I still like Globe for Global

Maybe move the notice to be after the list of results?

When you get a full page of results it's really easy to miss the notice since it's so far below the fold.

We could try just removing it and see if it's actually confusing. It's possible that it won't be, but I'm worried that's might be too optimistic.

epriestley edited edge metadata.
  • Change "current application" icon dynamically.

The fa-file-o default icon actually stands out pretty well, so maybe that's enough of a hint. We can try no notice + document behavior and see if users run into trouble?

  • Try with no janky notice, at least until users complain.
  • Implement hooks for all the other applications.
chad edited edge metadata.

let's do this.

This revision is now accepted and ready to land.Apr 22 2015, 9:05 PM
This revision was automatically updated to reflect the committed changes.

It's already in production here... wow, looks nothing short of amazing :)

Short thoughts:

  • probably do want the "Current Application (Open) option
  • Not sure saved searches are useful?
  • On non application pages, since we're doing a global search, show globe instead?

probably do want the "Current Application (Open) option

Or maybe "Current Application" should always imply "Open"?

Not sure saved searches are useful?

I use "Open Tasks" as my default; this is the most common (non-typeahead) thing I use global search for by a reasonable margin.

On non application pages, since we're doing a global search, show globe instead?

Maybe -- I worry showing two globes that do different things (although the same thing on the current page) might be confusing rather than helpful.

If we add "Current Application (Open)" as distinct from "Current Application" we'll also have two copies of the same icon that do different things, I suppose.

This still looks weird to me, too (double magnifying glass icons):

Screen_Shot_2015-04-22_at_4.19.37_PM.png (46×220 px, 6 KB)

Yeah I think custom searches should use the custom icon like in policies.