1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 10:18:48 +02:00
phorge-phorge/src/applications/differential/field/specification
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
..
applypatch Move Differential's simple fields to the extensible field schema 2011-08-15 08:39:48 -07:00
arcanistproject Move Differential's read-only fields to the extensible field schema 2011-08-15 08:39:58 -07:00
auditors Minor, ensure auditors is an array. 2012-03-06 19:46:26 -08:00
author Drive differential revision list with custom fields 2012-02-20 05:38:21 -08:00
base Add an "Auditors" field to commit messages which pushes audit requests when present 2012-03-06 15:10:35 -08:00
blamerev Validate all fields in differential.parsecommitmessage 2012-01-12 15:20:11 -08:00
branch Separate field for branch in revision 2012-02-06 17:28:46 -08:00
ccs Improve tokenizer sorting rules 2012-03-07 13:17:44 -08:00
commits Move Differential's read-only fields to the extensible field schema 2011-08-15 08:39:58 -07:00
datecreated Drive differential revision list with custom fields 2012-02-20 05:38:21 -08:00
datemodified Drive differential revision list with custom fields 2012-02-20 05:38:21 -08:00
dependencies Move Differential's read-only fields to the extensible field schema 2011-08-15 08:39:58 -07:00
exportpatch Move Differential's simple fields to the extensible field schema 2011-08-15 08:39:48 -07:00
gitsvnid Drive Differential commit message parsing through extensible fields 2011-08-18 19:49:39 -07:00
host Move Differential's simple fields to the extensible field schema 2011-08-15 08:39:48 -07:00
lines Drive differential revision list with custom fields 2012-02-20 05:38:21 -08:00
lint Show lint/unit failure explanation in Phabricator 2012-02-24 15:28:06 -08:00
maniphesttasks Share Revision/Task attaching code 2011-12-16 16:13:00 -08:00
path Separate field for branch in revision 2012-02-06 17:28:46 -08:00
revertplan Validate all fields in differential.parsecommitmessage 2012-01-12 15:20:11 -08:00
reviewedby Allow to resign from an accepted revision when you didn't accept the diff. 2011-10-19 15:27:36 -07:00
reviewers Improve tokenizer sorting rules 2012-03-07 13:17:44 -08:00
revisionid Drive differential revision list with custom fields 2012-02-20 05:38:21 -08:00
revisionstatus Drive differential revision list with custom fields 2012-02-20 05:38:21 -08:00
summary Drive Differential commit message parsing through extensible fields 2011-08-18 19:49:39 -07:00
testplan Drive Differential commit message parsing through extensible fields 2011-08-18 19:49:39 -07:00
title Drive differential revision list with custom fields 2012-02-20 05:38:21 -08:00
unit Show lint/unit failure explanation in Phabricator 2012-02-24 15:28:06 -08:00