Add a dummy review UI.

Review Request #6762 — Created Jan. 12, 2015 and submitted

Information

Review Board
master
cd36184...

Reviewers

This change adds a new dummy review UI for file types that otherwise don't have
one. The purpose here is that if there's an attachment with multiple revisions,
and one of those revisions doesn't have a review UI, it would be possible to
get a 404 when sliding around through the revision slider.

The dummy UI just shows the revision header, selector, and caption/revision
label. It doesn't have anything else, or any commenting functionality. It's
highly unlikely that this will ever actually be encountered, but it's here just
in case.

While doing this, I fixed a bug that slipped into the image review UI captions,
and started combining some of the common parts of the Review UI headers.

  • Verified that the dummy UI looked correct for both single and diff views.
  • Checked that the thumbnail did not link to the dummy review UI.
  • Ran python unit tests.
  • Ran js-tests.
Description From Last Updated

How about having FileAttachment.review_ui default to FileAttachmentReviewUI if it would otherwise return None?

chipx86chipx86

How about just GenericReviewable instead of dummy? Dummy sounds more like something that wouldn't be used in production.

chipx86chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/ui/base.py
        reviewboard/staticbundles.py
    
    Ignored Files:
        reviewboard/static/rb/js/views/dummyReviewableView.js
        reviewboard/static/rb/css/pages/text-review-ui.less
        reviewboard/templates/reviews/ui/text.html
        reviewboard/static/rb/css/pages/image-review-ui.less
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/static/rb/js/views/textBasedReviewableView.js
        reviewboard/static/rb/js/views/imageReviewableView.js
        reviewboard/static/rb/js/models/dummyReviewableModel.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/ui/base.py
        reviewboard/staticbundles.py
    
    Ignored Files:
        reviewboard/static/rb/js/views/dummyReviewableView.js
        reviewboard/static/rb/css/pages/text-review-ui.less
        reviewboard/templates/reviews/ui/text.html
        reviewboard/static/rb/css/pages/image-review-ui.less
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/static/rb/js/views/textBasedReviewableView.js
        reviewboard/static/rb/js/views/imageReviewableView.js
        reviewboard/static/rb/js/models/dummyReviewableModel.js
    
    
  2. 
      
chipx86
  1. I know it's pretty basic, but can you put up a screenshot? Just want to check out what it looks like.

  2. reviewboard/reviews/views.py (Diff revision 1)
     
     
     
     
    Show all issues

    How about having FileAttachment.review_ui default to FileAttachmentReviewUI if it would otherwise return None?

    1. I don't want thumbnails to link here, at least not unless we add commenting functionality.

    2. Ohh okay. I misunderstood.

  3. Show all issues

    How about just GenericReviewable instead of dummy? Dummy sounds more like something that wouldn't be used in production.

    1. Maybe I'd consider renaming it when this has some real functionality, but right now it is pretty dumb...

    2. Yeah, I get it now. The name seems fine to me.

  4. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (9a1466f)