Migrate to using avatar services everywhere

Review Request #7810 — Created Dec. 15, 2015 and submitted

Information

Review Board
release-2.6.x

Reviewers

Review Board now uses avatar services everywhere that gravatars were
previously used.

The admin panel has been updated to reflect this chnage. There is no
longer a setting for gravatars, specfically. Instead, there is now an
entire page of avatar service configuration.

Ran unit tests.

Performed the following manual testing:
- Verified enabling/disabling avatars entirely worked correctly.
- Verified the avatar services admin form saves correctly.
- Viewd the search page and datagrids to verify that avatars render
correctly.


Description From Last Updated

So my major complaint about this change is this UI. I think it's kind of confusing that there are a …

daviddavid

'six' imported but unused

reviewbotreviewbot

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

Hmmm. We'll have to figure out how this interacts with $.retinaGravatar, which expects the .gravatar class. Perhaps we can add …

daviddavid

break?

daviddavid

typo: resoltuion

miserymisery

typo: emptyu

miserymisery

It would be nicer if we did the fallback for urls in the assignment: var urls = this.get('avatarURLs') || {}; …

daviddavid
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/admin/forms.py
        reviewboard/datagrids/columns.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/admin/urls.py
        reviewboard/search/views.py
        reviewboard/webapi/resources/user.py
    
    Ignored Files:
        reviewboard/templates/search/_user.html
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/reviews/review_reply.html
        reviewboard/templates/accounts/user_infobox.html
        reviewboard/templates/base/_nav_support_menu.html
        reviewboard/templates/reviews/boxes/change.html
        reviewboard/templates/datagrids/sidebar_user_info.html
        reviewboard/templates/admin/avatar_settings.html
        reviewboard/templates/reviews/review_issue_summary_table.html
        reviewboard/templates/base/_mobile_navbar.html
        reviewboard/templates/admin/widgets/w-actions.html
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/static/rb/css/pages/reviews.less
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/admin/forms.py
        reviewboard/datagrids/columns.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/admin/urls.py
        reviewboard/search/views.py
        reviewboard/webapi/resources/user.py
    
    Ignored Files:
        reviewboard/templates/search/_user.html
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/reviews/review_reply.html
        reviewboard/templates/accounts/user_infobox.html
        reviewboard/templates/base/_nav_support_menu.html
        reviewboard/templates/reviews/boxes/change.html
        reviewboard/templates/datagrids/sidebar_user_info.html
        reviewboard/templates/admin/avatar_settings.html
        reviewboard/templates/reviews/review_issue_summary_table.html
        reviewboard/templates/base/_mobile_navbar.html
        reviewboard/templates/admin/widgets/w-actions.html
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/static/rb/css/pages/reviews.less
    
    
  2. reviewboard/search/views.py (Diff revision 1)
     
     
    Show all issues
     'six' imported but unused
    
  3. reviewboard/search/views.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (80 > 79 characters)
    
  4. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/admin/forms.py
        reviewboard/datagrids/columns.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/admin/urls.py
        reviewboard/search/views.py
        reviewboard/webapi/resources/user.py
    
    Ignored Files:
        reviewboard/templates/search/_user.html
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/reviews/review_reply.html
        reviewboard/templates/accounts/user_infobox.html
        reviewboard/templates/base/_nav_support_menu.html
        reviewboard/templates/reviews/boxes/change.html
        reviewboard/templates/datagrids/sidebar_user_info.html
        reviewboard/templates/admin/avatar_settings.html
        reviewboard/templates/reviews/review_issue_summary_table.html
        reviewboard/templates/base/_mobile_navbar.html
        reviewboard/templates/admin/widgets/w-actions.html
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/static/rb/css/pages/reviews.less
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/admin/forms.py
        reviewboard/datagrids/columns.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/admin/urls.py
        reviewboard/search/views.py
        reviewboard/webapi/resources/user.py
    
    Ignored Files:
        reviewboard/templates/search/_user.html
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/reviews/review_reply.html
        reviewboard/templates/accounts/user_infobox.html
        reviewboard/templates/base/_nav_support_menu.html
        reviewboard/templates/reviews/boxes/change.html
        reviewboard/templates/datagrids/sidebar_user_info.html
        reviewboard/templates/admin/avatar_settings.html
        reviewboard/templates/reviews/review_issue_summary_table.html
        reviewboard/templates/base/_mobile_navbar.html
        reviewboard/templates/admin/widgets/w-actions.html
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/static/rb/css/pages/reviews.less
    
    
  2. 
      
david
  1. Screenshot(s)?

    1. The UI hasn't changed, but I will upload some.

    2. That doesn't jive with your change description: "Instead, there is now an entire page of avatar service configuration."

    3. Ah of that :P I thought you meant of where avatars appeared. I derped.

  2. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/admin/forms.py
        reviewboard/datagrids/columns.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/admin/urls.py
        reviewboard/search/views.py
        reviewboard/webapi/resources/user.py
    
    Ignored Files:
        reviewboard/templates/search/_user.html
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/reviews/review_reply.html
        reviewboard/templates/accounts/user_infobox.html
        reviewboard/templates/base/_nav_support_menu.html
        reviewboard/templates/reviews/boxes/change.html
        reviewboard/templates/datagrids/sidebar_user_info.html
        reviewboard/templates/admin/avatar_settings.html
        reviewboard/templates/reviews/review_issue_summary_table.html
        reviewboard/templates/base/_mobile_navbar.html
        reviewboard/templates/admin/widgets/w-actions.html
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/static/rb/css/pages/reviews.less
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/admin/forms.py
        reviewboard/datagrids/columns.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/admin/urls.py
        reviewboard/search/views.py
        reviewboard/webapi/resources/user.py
    
    Ignored Files:
        reviewboard/templates/search/_user.html
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/reviews/review_reply.html
        reviewboard/templates/accounts/user_infobox.html
        reviewboard/templates/base/_nav_support_menu.html
        reviewboard/templates/reviews/boxes/change.html
        reviewboard/templates/datagrids/sidebar_user_info.html
        reviewboard/templates/admin/avatar_settings.html
        reviewboard/templates/reviews/review_issue_summary_table.html
        reviewboard/templates/base/_mobile_navbar.html
        reviewboard/templates/admin/widgets/w-actions.html
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/static/rb/css/pages/reviews.less
    
    
  2. 
      
david
  1. 
      
  2. reviewboard/datagrids/columns.py (Diff revision 3)
     
     
    Show all issues

    Hmmm. We'll have to figure out how this interacts with $.retinaGravatar, which expects the .gravatar class. Perhaps we can add a data-at2x attribute?

    1. A data-at2x would be ideal. In fact... Maybe we should rethink some of the API so that instead of getting a single avatar URL, you get a sort of dictionary of data consisting of the @1x size, @2x size, fallback, etc. Gives us room for expansion for things like @3x down the road (which is already becoming a thing for images on smartphones).

      As for this class, I'm fine with us moving to .avatar, but we probably will need .gravatar as a fallback for that very reason, for $.retinaGravatar and such.

      Also, I've been bit multiple times by the fact that .gravatar turns into .gravatar-retina. While rethinking avatar support, we should change things to add but not replace the classes, so maybe class="avatar avatar-2x", class="avatar avatar-fallback", etc.

    2. If this change migrates into Djblets, we could replace $.retinaGravatar with $.retinaAvatar which uses this new behaviour with data- attributes. How does that sound?

  3. reviewboard/search/views.py (Diff revision 3)
     
     
    Show all issues

    break?

  4. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/admin/forms.py
        reviewboard/datagrids/columns.py
        reviewboard/admin/urls.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/avatars/registry.py
        reviewboard/search/views.py
        reviewboard/avatars/templatetags/avatars.py
        reviewboard/webapi/resources/user.py
    
    Ignored Files:
        reviewboard/templates/search/_user.html
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/base.html
        reviewboard/templates/accounts/user_infobox.html
        reviewboard/templates/base/_nav_support_menu.html
        reviewboard/templates/reviews/boxes/change.html
        reviewboard/templates/reviews/review_reply.html
        reviewboard/templates/admin/avatar_settings.html
        reviewboard/templates/reviews/review_issue_summary_table.html
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/datagrids/sidebar_user_info.html
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/templates/admin/widgets/w-actions.html
        reviewboard/templates/base/_mobile_navbar.html
        reviewboard/static/rb/js/common.js
        reviewboard/static/rb/js/models/userSessionModel.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/admin/forms.py
        reviewboard/datagrids/columns.py
        reviewboard/admin/urls.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/avatars/registry.py
        reviewboard/search/views.py
        reviewboard/avatars/templatetags/avatars.py
        reviewboard/webapi/resources/user.py
    
    Ignored Files:
        reviewboard/templates/search/_user.html
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/base.html
        reviewboard/templates/accounts/user_infobox.html
        reviewboard/templates/base/_nav_support_menu.html
        reviewboard/templates/reviews/boxes/change.html
        reviewboard/templates/reviews/review_reply.html
        reviewboard/templates/admin/avatar_settings.html
        reviewboard/templates/reviews/review_issue_summary_table.html
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/datagrids/sidebar_user_info.html
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/templates/admin/widgets/w-actions.html
        reviewboard/templates/base/_mobile_navbar.html
        reviewboard/static/rb/js/common.js
        reviewboard/static/rb/js/models/userSessionModel.js
    
    
  2. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/admin/forms.py
        reviewboard/datagrids/columns.py
        reviewboard/admin/urls.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/avatars/registry.py
        reviewboard/search/views.py
        reviewboard/avatars/templatetags/avatars.py
        reviewboard/webapi/resources/user.py
    
    Ignored Files:
        reviewboard/templates/search/_user.html
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/base.html
        reviewboard/templates/accounts/user_infobox.html
        reviewboard/templates/base/_nav_support_menu.html
        reviewboard/templates/reviews/boxes/change.html
        reviewboard/templates/reviews/review_reply.html
        reviewboard/templates/admin/avatar_settings.html
        reviewboard/templates/reviews/review_issue_summary_table.html
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/datagrids/sidebar_user_info.html
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/templates/admin/widgets/w-actions.html
        reviewboard/templates/base/_mobile_navbar.html
        reviewboard/static/rb/js/common.js
        reviewboard/static/rb/js/models/userSessionModel.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/admin/forms.py
        reviewboard/datagrids/columns.py
        reviewboard/admin/urls.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/avatars/registry.py
        reviewboard/search/views.py
        reviewboard/avatars/templatetags/avatars.py
        reviewboard/webapi/resources/user.py
    
    Ignored Files:
        reviewboard/templates/search/_user.html
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/base.html
        reviewboard/templates/accounts/user_infobox.html
        reviewboard/templates/base/_nav_support_menu.html
        reviewboard/templates/reviews/boxes/change.html
        reviewboard/templates/reviews/review_reply.html
        reviewboard/templates/admin/avatar_settings.html
        reviewboard/templates/reviews/review_issue_summary_table.html
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/datagrids/sidebar_user_info.html
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/templates/admin/widgets/w-actions.html
        reviewboard/templates/base/_mobile_navbar.html
        reviewboard/static/rb/js/common.js
        reviewboard/static/rb/js/models/userSessionModel.js
    
    
  2. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/admin/forms.py
        reviewboard/datagrids/columns.py
        reviewboard/admin/urls.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/avatars/registry.py
        reviewboard/search/views.py
        reviewboard/avatars/templatetags/avatars.py
        reviewboard/webapi/resources/user.py
    
    Ignored Files:
        reviewboard/templates/js/tests.html
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/base.html
        reviewboard/templates/accounts/user_infobox.html
        reviewboard/templates/base/_nav_support_menu.html
        reviewboard/templates/reviews/boxes/change.html
        reviewboard/templates/search/_user.html
        reviewboard/templates/reviews/review_reply.html
        reviewboard/templates/admin/avatar_settings.html
        reviewboard/templates/reviews/review_issue_summary_table.html
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/datagrids/sidebar_user_info.html
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/templates/admin/widgets/w-actions.html
        reviewboard/templates/base/_mobile_navbar.html
        reviewboard/static/rb/js/common.js
        reviewboard/static/rb/js/models/userSessionModel.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/admin/forms.py
        reviewboard/datagrids/columns.py
        reviewboard/admin/urls.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/avatars/registry.py
        reviewboard/search/views.py
        reviewboard/avatars/templatetags/avatars.py
        reviewboard/webapi/resources/user.py
    
    Ignored Files:
        reviewboard/templates/js/tests.html
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/base.html
        reviewboard/templates/accounts/user_infobox.html
        reviewboard/templates/base/_nav_support_menu.html
        reviewboard/templates/reviews/boxes/change.html
        reviewboard/templates/search/_user.html
        reviewboard/templates/reviews/review_reply.html
        reviewboard/templates/admin/avatar_settings.html
        reviewboard/templates/reviews/review_issue_summary_table.html
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/datagrids/sidebar_user_info.html
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/templates/admin/widgets/w-actions.html
        reviewboard/templates/base/_mobile_navbar.html
        reviewboard/static/rb/js/common.js
        reviewboard/static/rb/js/models/userSessionModel.js
    
    
  2. 
      
david
  1. 
      
  2. Show all issues

    So my major complaint about this change is this UI.

    I think it's kind of confusing that there are a bunch of "enabled avatar services" and then a separate drop-down for the "default avatar service". It's not at all clear what the two different pieces of UI will do.

    AFAICT, only the default avatar service will actually be used? In that case, why do we expose the enabled list at all?

    1. Currently only the default avatar service is used, but I have a patch in the works to allow users to choose avatar services.

      This would allow e.g., all users to use gravatars except users like Review Bot who could have a custom uploaded avatar.

    2. I've added more help text to the controls.

  3. Show all issues

    It would be nicer if we did the fallback for urls in the assignment:

    var urls = this.get('avatarURLs') || {};
    return urls.size || {};
    
  4. 
      
misery
  1. 
      
  2. Show all issues

    typo: resoltuion

  3. Show all issues

    typo: emptyu

  4. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/admin/forms.py
        reviewboard/datagrids/columns.py
        reviewboard/admin/urls.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/avatars/registry.py
        reviewboard/search/views.py
        reviewboard/avatars/templatetags/avatars.py
        reviewboard/webapi/resources/user.py
    
    Ignored Files:
        reviewboard/templates/js/tests.html
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/base.html
        reviewboard/templates/accounts/user_infobox.html
        reviewboard/templates/base/_nav_support_menu.html
        reviewboard/templates/reviews/boxes/change.html
        reviewboard/templates/search/_user.html
        reviewboard/templates/reviews/review_reply.html
        reviewboard/templates/admin/avatar_settings.html
        reviewboard/templates/reviews/review_issue_summary_table.html
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/datagrids/sidebar_user_info.html
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/templates/admin/widgets/w-actions.html
        reviewboard/templates/base/_mobile_navbar.html
        reviewboard/static/rb/js/common.js
        reviewboard/static/rb/js/models/userSessionModel.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/admin/forms.py
        reviewboard/datagrids/columns.py
        reviewboard/admin/urls.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/avatars/registry.py
        reviewboard/search/views.py
        reviewboard/avatars/templatetags/avatars.py
        reviewboard/webapi/resources/user.py
    
    Ignored Files:
        reviewboard/templates/js/tests.html
        reviewboard/templates/reviews/boxes/review.html
        reviewboard/templates/base.html
        reviewboard/templates/accounts/user_infobox.html
        reviewboard/templates/base/_nav_support_menu.html
        reviewboard/templates/reviews/boxes/change.html
        reviewboard/templates/search/_user.html
        reviewboard/templates/reviews/review_reply.html
        reviewboard/templates/admin/avatar_settings.html
        reviewboard/templates/reviews/review_issue_summary_table.html
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/datagrids/sidebar_user_info.html
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/templates/admin/widgets/w-actions.html
        reviewboard/templates/base/_mobile_navbar.html
        reviewboard/static/rb/js/common.js
        reviewboard/static/rb/js/models/userSessionModel.js
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
brennie
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.6.x (ee27598)