Fixes the blank space visible in the infobox when avatars are disabled.

Review Request #10160 — Created Sept. 21, 2018 and submitted

Sudolicious
Review Board
release-4.0.x
4738
7130f52...
reviewboard, students

When avatars are disabled a blank space was visible on the infobox
where the avatar should be.

The code before checked if the avatar service was enabled and would
then make a request to gravatar. Now the code will check if avatar
services are enabled and if there is an avatar set.
If the services are disabled you will there will be no space
for an avatar. Otherwise, you will see a default avatar.

Python and JavaScript tests were passed.

Tested inside of Firefox and Chrome in 2 scenarios
1. Enabling avatars
2. Disabling avatars

Loading file attachments...

  • 0
  • 0
  • 7
  • 0
  • 7
Description From Last Updated
Sudolicious
Sudolicious
mike_conley
  1. Thanks! This looks like a solid solution, John. I just have a few suggestions - see below.

  2. Please see screenshot number 3 below

    Thanks for supplying screenshots! That really clears up what the end user experience will be like.

    However, we use the Description and Testing Done sections to construct the final commit messages, and the commit will not include those screenshots. Can you please remove the reference to screenshots (since it won't be available in the commit message)?

  3. reviewboard/templates/accounts/user_infobox.html (Diff revision 1)
     
     
     
     

    I think we have a convention of keeping the template tags that open on a newline unindented, but indenting the internal bits. So I think we prefer:

    {% if foo %}
    {%   if bar %}
    {%   endif %}
    {% endif %}
    

    instead of:

    {% if foo %}
      {% if bar %}
      {% endif %}
    {% endif %}
    

    So can you please reformat this file to the original indentation style?

  4. 
      
david
  1. 
      
  2. Can you update the summary to use proper capitalization? ("the infobox" -> "The infobox").

  3. Please put the associated bug number into the "Bugs" field.

  4. Please wrap your description to 72 columns (this gets turned into the commit message)

    1. Is it wrapped to 72 columns or 72 characters?

    2. 72 according to https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html

  5. 
      
Sudolicious
Sudolicious
brennie
  1. 
      
  2. Can you write your commit summary in the imperitive mood, i.e., as if it were a command.

    The following sentence should make sense if you substitute your summary in:

    "This patch will <summary>"

  3. reviewboard/templates/accounts/user_infobox.html (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Please undo all the indentation changes your editor auto-"fixed".

  4. 
      
Sudolicious
Sudolicious
brennie
  1. Ship It!
  2. 
      
Sudolicious
  1. Ship It!

  2. 
      
david
  1. Ship It!
  2. 
      
Sudolicious
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (812d949f)

Loading...