mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-25 23:10:57 +01:00
492d047a49
Summary: Currently, we sort all results alphabetically. This isn't ideal. Instead, sort them like this: - If the viewing user appears in the list, always sort them first. This is common in a lot of contexts and some "Ben Evans" guy is sorting first on secure.phabricator.com and causing me no end of aggravation. - If the tokens match a "priority" component (e.g., username), sort that before results which do not have a "priority" match. - Within a group (self, priority, everything else) sort tokens alphabetically. NOTE: I need to go add setUser() to all the tokenizers to make the "self" rule work, but that's trivial so I figured I'd get this out first. Test Plan: https://secure.phabricator.com/file/data/4s2a72l5hhyyqqkq4bnd/PHID-FILE-x2r6ubk7s7dz54kxmtwx/Screen_Shot_2012-03-07_at_9.18.03_AM.png Previously, "aaaaaepriestley" (first alphabetic match) would sort before "epriestley" (the viewing user). Now, "epriestley" sorts first because that is the viewer. https://secure.phabricator.com/file/data/rmnxgnafz42f23fsjwui/PHID-FILE-yrnn55jl3ysbntldq3af/Screen_Shot_2012-03-07_at_9.18.09_AM.png Previously, "aaaagopher" (first alphabetic match) would sort before "banana" (the "priority" match). Now, "banana" sorts first because it priority matches on username. Reviewers: btrahan Reviewed By: btrahan CC: aran, epriestley Maniphest Tasks: T946 Differential Revision: https://secure.phabricator.com/D1807 |
||
---|---|---|
.. | ||
css | ||
image | ||
js | ||
swf |