Centralize the username column and use it in the Users page.

Review Request #8878 — Created April 5, 2017 and submitted

Information

Review Board
release-3.0.x
b7e2fba...

Reviewers

We had a Submitter column used for review requests and reviews, which
rendered the username and avatars. We didn't have an equivalent for the
Users page, which would have had to duplicate a lot of the logic.

Now there's a single UsernameColumn, which displays a consistent
representation of the username and avatar. It takes the label and a
relation between the object and the user, and uses that relation to look
up the user and to augment the queryset.

The datagrids no longer use subclasses. Instead, they simply pass the
desired label and relation to UsernameColumn.

If new datagrids involving users are introduced in the future, they
should be able to use this column directly without needing to construct
another class.

Tested each datagrid, checking that the labels, usernames, and avatars
are all correct. Also checked that there wasn't a regression in query
counts from this change.

Description From Last Updated

This blank line is weird.

daviddavid
david
  1. 
      
  2. reviewboard/datagrids/columns.py (Diff revision 1)
     
     

    This blank line is weird.

    1. Redoing some of this with comments.

  3. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (d433947)
Loading...