Refactor review request header into a common template.

Review Request #8307 — Created July 22, 2016 and submitted

Information

Review Board
release-3.0.x
b06c867...

Reviewers

Every review request (and review-request like box such as the file review UI)
has a header that includes some icon-based actions, a bunch of text-based
actions, and some tabs. The code for these was spread out over every view and
template that wanted to include them, and the functionality was slightly
different for every implementation.

This change centralizes all of that into a single template which renders all of
the actions (including the "archive" menu, which was previously only available
on the main review request page). The tabs are handled somewhat specially by
passing in a list of tab data into the template context. The logic for the
"current tab" is done by comparing the request path to the tab's URL.

Checked the header display and functionality on the main review request page,
the diff viewer page (with different diff revisions), and the image review UI.

Description From Last Updated

'DiffSet' imported but unused

reviewbotreviewbot

This could be one conditional.

chipx86chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/ui/base.py
        reviewboard/reviews/models/review_request.py
        reviewboard/reviews/context.py
    
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/templates/reviews/review_detail.html
        reviewboard/templates/reviews/ui/base.html
        reviewboard/templates/reviews/review_request_header.html
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/ui/base.py
        reviewboard/reviews/models/review_request.py
        reviewboard/reviews/context.py
    
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/templates/reviews/review_detail.html
        reviewboard/templates/reviews/ui/base.html
        reviewboard/templates/reviews/review_request_header.html
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
    
    
  2. reviewboard/reviews/ui/base.py (Diff revision 1)
     
     
    Show all issues
     'DiffSet' imported but unused
    
  3. 
      
david
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/ui/base.py
        reviewboard/reviews/models/review_request.py
        reviewboard/reviews/context.py
    
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/templates/reviews/review_detail.html
        reviewboard/templates/reviews/ui/base.html
        reviewboard/templates/reviews/review_request_header.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/ui/base.py
        reviewboard/reviews/models/review_request.py
        reviewboard/reviews/context.py
    
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/templates/reviews/review_detail.html
        reviewboard/templates/reviews/ui/base.html
        reviewboard/templates/reviews/review_request_header.html
    
    
  2. 
      
david
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/ui/base.py
        reviewboard/reviews/models/review_request.py
        reviewboard/reviews/context.py
    
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/templates/reviews/review_detail.html
        reviewboard/templates/reviews/ui/base.html
        reviewboard/templates/reviews/review_request_header.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/ui/base.py
        reviewboard/reviews/models/review_request.py
        reviewboard/reviews/context.py
    
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/templates/reviews/review_detail.html
        reviewboard/templates/reviews/ui/base.html
        reviewboard/templates/reviews/review_request_header.html
    
    
  2. 
      
chipx86
  1. This is fantastic.

    Would this be something we could safely ship with 2.5.x? Wondering because of the archive fix.

    1. Hmm. It's not trivial to crossport because we don't have the actions work on release-2.5.x.

    2. No prob.

  2. reviewboard/reviews/context.py (Diff revision 3)
     
     
     
     
     
     
    Show all issues

    This could be one conditional.

  3. 
      
david
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/ui/base.py
        reviewboard/reviews/models/review_request.py
        reviewboard/reviews/context.py
    
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/templates/reviews/review_detail.html
        reviewboard/templates/reviews/ui/base.html
        reviewboard/templates/reviews/review_request_header.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/ui/base.py
        reviewboard/reviews/models/review_request.py
        reviewboard/reviews/context.py
    
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/templates/reviews/review_detail.html
        reviewboard/templates/reviews/ui/base.html
        reviewboard/templates/reviews/review_request_header.html
    
    
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (62b53c7)