1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 11:30:55 +01:00
phorge-phorge/externals
epriestley 492d047a49 Improve tokenizer sorting rules
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
2012-03-07 13:17:44 -08:00
..
amazon-ses Use exceptions for S3 error messages 2011-08-04 14:17:13 -07:00
javelin@14e180d5d3 Improve tokenizer sorting rules 2012-03-07 13:17:44 -08:00
mimemailparser Skip attaching 'inline' text attachments 2011-06-12 22:38:57 -07:00
phpmailer Get rid of +x on a bunch of nonexecutable files because I failed to set 2011-04-02 16:47:20 -07:00
raphael Add gRaphael charting library 2012-02-21 15:10:24 -08:00
recaptcha PhabricatorEnv 2011-01-31 11:55:26 -08:00
s3 Add an Amazon S3 storage engine for Phabricator 2011-08-03 10:58:03 -07:00
vegas Aphlict, simple notification server 2011-05-17 10:32:41 -07:00
xhprof Fix some issues caught by HipHop, and work around some issues 2011-02-26 21:01:42 -08:00