Sort the results in the user autocomplete better.
Review Request #5394 — Created Feb. 3, 2014 and submitted — Latest diff uploaded
Sort the results in the user autocomplete better.
The results in the user autocomplete are basically in the order that they come
from the database. This is kind of crummy when there are multiple matches.This change adds a sort comparison mechanism which will sort all username
matches ahead of real name matches. Within those categories, the names are
sorted in alphabetical order.
Added a bunch of users with usernames that started with a common substring, and
a bunch of users with first and last names that started with the same
substring. Saw that when I put that substring in the "People" field, the
autocomplete results put all the username matches first, and all the realname
matches after.