Add YUI Autocomplete to the the People selection field

Review Request #171 — Created Oct. 17, 2007 and submitted

Information

js
Review Board SVN (deprecated)

Reviewers

We've been running review board internally here and has slowly begun to replace email and bugzilla for tracking changes.  However, one usability problem we ran into is that users have to guess what a peer's login name is.  In both bugzilla and email you can either chose from a user list or from an address book.

To help ease adoption of reviewboard, we've added autocomplete on the people field against the user database.  After each keypress in the people field, we use the YUI toolkit to perform a JSON request to the server to fetch any usernames that begin with the keystrokes entered.  User entries are separated by commas.

(Updated to include autocomplete of groups as well as people)
Tested against a local instance of reviewboard using MySQL on the backend for the user table and LDAP for authentication.

Browsers tested: Safari 3.0, IE 6.0, and Firefox 2.0.
chipx86
  1. Wow, I wasn't expecting this. You've saved me a lot of trouble :)
    
    This is looking good. Some stylistic things mainly.
    
    While you're at it, would you mind adding support for groups as well? Also, if this could be extended to search either by username/full name and group ID/display name, that'd rock, but that could come later.
    1. I've added support for groups, and would love to extend the search, I just need to play with YUI a bit more.  It looks like you can do custom formatters, but I'm not quite sure how to search on full name and still to the in-field auto-complete.
    2. Okay. I'll try to look into this as well. It's not a blocker to get this change in. I'm looking forward to having this as part of the codebase :)
  2. /trunk/reviewboard/htdocs/css/reviews.css (Diff revision 3)
     
     
     
     
     
     
     
    Can you uncompress the lines a bit? Down the road we're going to do CSS "compressing" to reduce file size, so for now improved readability would be nice.
    1. In the latest diff, I've re-formatted all the css and unified it into a single css (reviews.css)
  3. You can use cls instead of "class" to refer to the "class" attribute here, and in the following createChild calls.
  4. Remove the space between the ( and the first parameter.
  5. Space after the comma separator.
  6. /trunk/reviewboard/htdocs/scripts/reviews.js (Diff revision 3)
     
     
     
     
    These lines can go away.
  7. /trunk/reviewboard/templates/reviews/review_detail.html (Diff revision 3)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    This should go in a CSS file.
  8. 
      
CU
  1. This looks cool!  I don't really like the sliding effect, but otherwise this is a much-needed improvement.
  2. 
      
CU
  1. This looks cool!  I don't really like the sliding effect, but otherwise this is a much-needed improvement.
    1. :(
      
      Sorry for the dupes.  It appears that I hit a bug, because as I hit the publish button, it didn't appear to be doing anything...
    2. I've been having the same problem. Trying to track it down (hopefully it's fixed as of this one?)
      
      It's a server glitch.
    3. It was the mail server. I've got it fixed now.
  2. 
      
CU
  1. This looks cool!  I don't really like the sliding effect, but otherwise this is a much-needed improvement.
  2. 
      
CU
  1. This looks cool!  I don't really like the sliding effect, but otherwise this is a much-needed improvement.
  2.