Page MenuHomePhabricator

Sort project typeahead tokens by display name, not hashtag
ClosedPublic

Authored by epriestley on May 26 2016, 5:06 PM.
Tags
None
Referenced Files
F15527938: D15981.id.diff
Tue, Apr 22, 7:43 AM
F15507558: D15981.id.diff
Tue, Apr 15, 9:12 PM
F15490915: D15981.id38474.diff
Fri, Apr 11, 9:41 PM
F15474151: D15981.diff
Sun, Apr 6, 5:42 AM
F15465027: D15981.id38474.diff
Wed, Apr 2, 1:51 PM
F15448580: D15981.id38474.diff
Fri, Mar 28, 5:45 AM
F15442998: D15981.id38473.diff
Thu, Mar 27, 1:41 AM
F15441117: D15981.id.diff
Wed, Mar 26, 4:29 PM
Subscribers
None

Details

Summary

Fixes T8510. Results are internally ordered by "name", which is the full list of strings a user can type to match a result. On the balance, it is probably good/correct to order by this (particularly, it allows function(x) to sort near x).

However, the way projects were built put the tags first, so a project like "Discovery" could end up last if it had originally been created with a different name like "Search Team", so that its first slug is "search-team".

Instead, put the display name first in the ordering.

Test Plan

Screen Shot 2016-05-26 at 10.01.30 AM.png (459×634 px, 55 KB)

To reproduce in particular:

  • Create a project named "Zebra".
  • Create a lot of projects named "Armadillo-blahblahblah".
  • Rename "Zebra" to "Armadillo".

Before the patch, the new "Armadillo" project would still sort as though it were named "Zebra". After the patch, it sorts as expected normally.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Sort project typeahead tokens by display name, not hashtag.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.May 26 2016, 5:46 PM
This revision was automatically updated to reflect the committed changes.