Page MenuHomePhabricator

Sort project typeahead tokens by display name, not hashtag

Authored by epriestley on May 26 2016, 5:06 PM.
Referenced Files
F11050177: D15981.id38473.diff
Fri, Aug 19, 7:52 PM
Unknown Object (File)
Tue, Aug 16, 3:36 PM
Unknown Object (File)
Fri, Aug 12, 1:38 AM
Unknown Object (File)
Tue, Aug 9, 4:30 PM
Unknown Object (File)
Wed, Aug 3, 3:10 PM
Unknown Object (File)
Tue, Aug 2, 2:05 PM
Unknown Object (File)
Mon, Aug 1, 3:41 AM
Unknown Object (File)
Sun, Jul 31, 8:49 AM



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

rP Phabricator
Lint Not Applicable
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.