Page MenuHomePhabricator

Sort "closed" results (like disabled users) to the bottom of typeaheads, but don't hide them completely
ClosedPublic

Authored by epriestley on Apr 14 2017, 7:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 8:33 AM
Unknown Object (File)
Fri, Nov 15, 2:43 AM
Unknown Object (File)
Thu, Nov 14, 12:36 PM
Unknown Object (File)
Sun, Nov 10, 9:52 PM
Unknown Object (File)
Sat, Nov 9, 1:24 PM
Unknown Object (File)
Thu, Nov 7, 4:53 AM
Unknown Object (File)
Wed, Oct 30, 10:33 AM
Unknown Object (File)
Sat, Oct 26, 5:42 AM
Subscribers
None

Details

Summary

Fixes T12538. Instead of hiding "closed" results unless only closed results match, show closed results but sort them to the bottom.

This fixes the actual issue in T12538, and I think this is probably the correct/best behavior for the global search.

It also makes all other typeaheads use this behavior. They currently have a "bug" where enabled user abcd makes it impossible to select disabled user abc. This manifests in some real cases, where enabled function members(abc) makes it impossible to disabled user abc in some function tokenizers.

If ths feels worse, we could go back to filtering in the simpler cases and introduce a rule like "show closed results if only closed results would be shown OR if query is an exact match for the disabled result", but that gets dicier because "exact match" is a fuzzy concept.

(There are a lot of other minor bad behaviors that this doesn't try to fix.)

Test Plan

Enabled project "instabug" no longer prevents bot user "instabug" from being shown:

Screen Shot 2017-04-14 at 12.10.49 PM.png (218×394 px, 16 KB)

Disabled user "mmaven" is sorted below enabled user "mmclewis", in defiance of the otherwise alphabetical order. There's no visual cue that this user is disabled because of T6906.

Screen Shot 2017-04-14 at 12.11.39 PM.png (242×399 px, 22 KB)

Same as above, but this source renders "disabled" in a more obvious way:

Screen Shot 2017-04-14 at 12.12.00 PM.png (182×451 px, 20 KB)

Function selecting members of active project members(instabug) no longer prevents selection of bot user instabug:

Screen Shot 2017-04-14 at 12.17.01 PM.png (172×446 px, 23 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Apr 14 2017, 8:00 PM
This revision was automatically updated to reflect the committed changes.

I pushed this here, yell if normal typeaheads feel wonky or whatever.

I'd probably find a way to make these one line if possible. Like float "Archived" to the right of the result and grey out the icon as well.

I can poke at it later today.

Those are expected, since those projects have #? and #test as hashtags, unless you were pointing out something else.

Im just suggesting some UI tweaks to make them less prominent

Oh, sure. Agreed that getting them on one line would be nice.

If you want to tweak any of the design for the global one too, I can lay that in if there's some JS trickiness.