Fish Trophy

brennie got a fish trophy!

Fix issues with the new review request actions

Review Request #8228 — Created June 9, 2016 and submitted

Information

Review Board
release-3.0.x
eb3b797...

Reviewers

The "Download Diff" action was hardcoding the URL for the revision of
the review request on first load. However, it was not updating the link
when the revision changed. Therefore, this action has been updated to
be a relative link to raw/ in the diffviewer, which was what the
previous code did. This way, it will always link to the correct diff
revision. We still use an absolute URL on the review request page
itself to generate a correct link.

In addition, that action would be visible on review requests without
diffs due to a logic error (comparing the empty list to None). We now
just check if the review request has a repository instead.

There have also been some edits made to the action template to generate
HTML that looks a bit better when rendered.

Unit tests have been updated to address these issues. Unit tests for the
download diff action's URL have been removed becuase they are no longer
necessary.

  • Ran unit tests.
  • Verified the "Download Diff" action links to the currently selected
    diff revision.
Description From Last Updated

Add bug 4423

gmyersgmyers

Comma should stay, since it's just an entry in a dictionary.

chipx86chipx86

Seems that this removes "Download Diff" from non-diff viewer pages, which regresses that ability.

chipx86chipx86

Why the changes to this file?

daviddavid
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/tests.py
        reviewboard/reviews/default_actions.py
    
    Ignored Files:
        reviewboard/templates/reviews/action.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/tests.py
        reviewboard/reviews/default_actions.py
    
    Ignored Files:
        reviewboard/templates/reviews/action.html
    
    
  2. 
      
chipx86
  1. 
      
  2. reviewboard/reviews/default_actions.py (Diff revision 1)
     
     

    Comma should stay, since it's just an entry in a dictionary.

    1. I read that wrong.

    2. Gah, wrong comment. My brain is not alive today.

  3. reviewboard/reviews/default_actions.py (Diff revision 1)
     
     
     
     
     
     

    Seems that this removes "Download Diff" from non-diff viewer pages, which regresses that ability.

  4. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/tests.py
        reviewboard/reviews/default_actions.py
    
    Ignored Files:
        reviewboard/templates/reviews/action.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/tests.py
        reviewboard/reviews/default_actions.py
    
    Ignored Files:
        reviewboard/templates/reviews/action.html
    
    
  2. 
      
gmyers
  1. Tested and it looks good to me!
  2. Add bug 4423
  3. 
      
brennie
david
  1. 
      
  2. reviewboard/templates/reviews/action.html (Diff revision 2)
     
     
     

    Why the changes to this file?

    1. It generated ugly HTML, e.g.

      <a id="foo" href="foo"
         >Foo</a>
      
  3. 
      
brennie
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

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