Fix some issues with avatar services

Review Request #8257 — Created June 22, 2016 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
81b327e...

Reviewers

The avatar services code has been cleaned up. Docstrings have been
touched up so that they now document all parameters and do not document
unnecessary ones. The RB.ReviewReplyEditorView now renders the avatar
with a srcset= attribute instead of the data-at2x attribute, which
is no longer used. Finally, a new template tag, {% avatar_urls %}, has
been introduced to serialize all avatar URLs for a given user and
requsested size to a Javascript object. This prevents KeyErrors from
being raised when avatar services only provide 1x resolution avatars,
as well as provides all additional resolutions that they can provide.
(Previously, we were hardcoding 1x and 2x resolutions.)

  • Able to use an avatar service (the file upload avatar service, in this
    case) that only provides 1x resolution avatars.
  • Ran unit tests.
    Loading...