Add some polish to file attachment switching.

Review Request #8574 — Created Dec. 14, 2016 and submitted

Information

Review Board
release-3.0.x
8887b71...

Reviewers

This change does a few small things to polish up the next/previous file
attachments feature:

  • Instead of just relying on FileAttachment.__str__, we use the
    display_name property for the caption. This will fall back on the filename
    if no caption has been set.
  • The style for the next/previous switchers had a huge font size set, which
    looked kind of goofy and didn't match what we had in the review request box.
  • We have a "dummy" file review UI for file attachments that aren't reviewable.
    This had some code to set the caption in the review UI header in the case
    where we were looking at a diff, but didn't set the caption when there was
    only a single revision.

This dummy review UI is still pretty dumb, and should probably have some
indication that the file can't be displayed inline, along with a download
link, but that can come in some later change.

Switched around file attachments and saw that things looked better.

brennie
  1. This renders really weird:
    Image

    Also, D&D inline images is pretty sweet.

  2. 
      
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/templates/reviews/ui/base.html
        reviewboard/static/rb/js/views/dummyReviewableView.es6.js
        reviewboard/static/rb/css/pages/reviews.less
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/templates/reviews/ui/base.html
        reviewboard/static/rb/js/views/dummyReviewableView.es6.js
        reviewboard/static/rb/css/pages/reviews.less
    
    
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (3fa2ed9)