Fix duplicating the "whitespace changes only" banner when expanding lines.

Review Request #8799 — Created March 6, 2017 and submitted

Information

Review Board
release-2.0.x
0ea4887...

Reviewers

Files that just have whitespace-only changes have a yellow banner saying
"This file contains only whitespace changes." This was being
unconditionally generated in the template for the first chunk in a file,
which meant that if you expanded the lines for the first chunk, you'd
get another copy of the banner, and same with collapsing.

This change adds a check in the template to prevent this banner from
appearing in "standalone" mode (where chunks of a diff are being
returned without the rest of the file).

It also adds a bottom border to this, so that when the chunk is
expanded, it has a nice clean separation from any equals lines.

Tested with a file containing only whitespace changes. Expanding and
collapsing the first chunk didn't result in duplicate banners.

reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/templates/diffviewer/diff_file_fragment.html
        reviewboard/static/rb/css/pages/diffviewer.less
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/templates/diffviewer/diff_file_fragment.html
        reviewboard/static/rb/css/pages/diffviewer.less
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (4f5e2f5)