Use the new avatar rendering for the User Selector widget.
Review Request #10517 — Created April 4, 2019 and submitted — Latest diff uploaded
The User Selector widget wasn't updated for the new avatar rendering
support recently added to Djblets. This change updates the widget to
supply initial rendered avatars, and for the user API queries to request
avatars as well.The one annoying bit is that form field widgets have no access to the
current HTTP request, so Djblets's avatars support had to be updated to
make this optional. This got us most of the way, but we access the
request in one of the avatar templates to determine if we can provide
the user's full name in the tag. Our template tag for this has been
updated to make the request optional in this case.
Tested with the User Selector with users having different avatars.
Verified that the right avatars were all shown for any initially-loaded
users in the list, for any auto-completed entries when looking up users,
and for any users added into the list.