Improve our support for inline review UIs.

Review Request #4462 — Created Aug. 18, 2013 and submitted

Information

Review Board
master

Reviewers

Improve our support for inline review UIs.

The original codebase for review UIs prepared the groundwork for
displaying a review UI inline into part of a page, without needing its
own full Review Board page. It was never used in practice, and its
design assumed it would still sit alone on its own page, but a simple
one embedded in an iframe.

The new design allows it to be embedded into any container on a page.
That makes it easier to include in popups, the diff viewer, etc.

The defaut template now places all scripts inside of a new
review_ui_scripts block, which is placed in the correct place in
base.html. base_inline.html is stripped down to just include the page
content and scripts.

The ReviewUI class now provides a render_to_string function, which
render_to_response wraps. This does all the rendering of the template,
based on the parameters and ReviewUI configuration.

There's a template tag to render the ReviewUI into a template. It's
unused in this change, but will be used in an upcoming change.
Tested that image reviews still worked.

Tested with some pending changes for review UIs in the diff viewer.
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/reviews/ui/base.py
        reviewboard/reviews/templatetags/reviewtags.py
      Ignored Files:
        reviewboard/templates/reviews/ui/base_inline.html
        reviewboard/templates/reviews/ui/default.html
        reviewboard/templates/reviews/ui/base.html
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/reviews/ui/base.py
        reviewboard/reviews/templatetags/reviewtags.py
      Ignored Files:
        reviewboard/templates/reviews/ui/base_inline.html
        reviewboard/templates/reviews/ui/default.html
        reviewboard/templates/reviews/ui/base.html
    
    
  2. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Loading...