1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-23 07:12:41 +01:00
phorge-phorge/webroot/rsrc/js/phuix
epriestley f0fbf7a7d3 Sort "closed" results (like disabled users) to the bottom of typeaheads, but don't hide them completely
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:

{F4903843}

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.

{F4903845}

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

{F4903848}

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

{F4903849}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12538

Differential Revision: https://secure.phabricator.com/D17695
2017-04-14 13:01:48 -07:00
..
PHUIXActionListView.js Begin rebuilding dropdown menus on ActionList 2014-05-05 10:56:14 -07:00
PHUIXActionView.js Attempt to make dropdown item actions more consistent 2017-01-18 13:14:54 -08:00
PHUIXAutocomplete.js Sort "closed" results (like disabled users) to the bottom of typeaheads, but don't hide them completely 2017-04-14 13:01:48 -07:00
PHUIXDropdownMenu.js Attempt to make dropdown item actions more consistent 2017-01-18 13:14:54 -08:00
PHUIXFormControl.js When accepting revisions, allow users to accept on behalf of a subset of reviewers 2017-03-22 14:25:04 -07:00
PHUIXIconView.js Basic stacked action support for EditEngine 2015-12-03 12:32:02 -08:00