[WIP] Add Show/Hide .min button for minified source files

Review Request #7700 — Created Oct. 15, 2015 and discarded

Information

Review Board
master

Reviewers

In order to determine if the file is a minified file, I have to change the file in the database so that the will end with .min.css, .min.js, or .min.less.

First, I went to localhost:8080. Then I went to the top right bar, under my username I clicked into admin. Then, I went to database near the top left navigation bar, under DIFFVIEWER, I clicked into file diff and changed various file names to file.min.js and file.min.css and file.min.less on both source and destination file to test.

Now there are some files with keywords ending with ".min.", I can test to modify files with those substring.
-10/19

I am trying to figure out how the diffReviewableView.js is connected with diff_file_fragment.html to link the onclick events with the button.

I also need to know what class the contents are being wrapped around so that I can show/hide those contents when I click the button.
-10/24

The new Show/Hide .min button can now show and hide the diff-box. The location of the button is now updated. I added the button to where the other expand/collapse buttons were for managing data within the diff-box. I still need to only show the new button for .min.css, .min.js, and .min.less files.
-10/31

I have to add a function in the python code so that it will recognize that the file name is a minified file. I'm still working on understanding the Python source code for whitespace so that I can have a similar message for the minified file. I need to hide the contents of the minified files by default, and have a link that when pressed, will show those contents.
-11/6

The diff review page now shows the message to detect that the file is a minified file. I still have to change the css for the message (currently uses whitespace class). I also need to make hide the contents of the minified file by default and create a link that will show the contents of the file when pressed.
-11/14

Test string inputs to see where they are being displayed
-10/19

Test button to see where they are displayed. Test button functionality with alert()
Test button functionality with diffReviewable.js
-10/24

Add button location with view_diff.html
Test button functionality with diffViewerPageView.js
Remove diff-highlight when .min file is hidden
Change font-weight of Show/Hide .min button to normal weight
-10/31

Working on understanding python source code for whitespace, no code updated yet
-11/6

Add new member of the dictionary in diff_utils.py
Add .min. file message in diff_file_fragment.html
Test min-link class in diffReviewable.js
Remove old button and it's functions
-11/14


Description From Last Updated

This is the header I mean. When "hidden", this should still appear and the table body should say something like: …

brenniebrennie

HTML comments end with -->, not --!>. In this case, the browser is guessing what you meant to do, but …

daviddavid

It looks like there is an extre newline here.

SH sherman

I think these change comments are not very helpful. All changes are already highlighted in the diff viewer and git …

SH sherman

We do not want to set the block to be invisible. We still want to see the header describing the …

brenniebrennie

mf is not descriptive enough a selector.

brenniebrennie
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
    
    
  2. 
      
CH
  1. The summary here "WIP" could do with the project name as well even if it's a WIP. At the moment, it forces someone to do some digging to find out what the project is.
    This might be helpful: https://www.reviewboard.org/docs/codebase/dev/writing-good-descriptions/

    1. Indeed, we'll want a detailed description even for WIP review requests.

  2. 
      
EK
david
  1. Edward, can you add "WIP" to the summary of this, so we know it's work in progress? Thanks!

  2. 
      
EK
EK
EK
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/templates/diffviewer/diff_file_fragment.html
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/templates/diffviewer/diff_file_fragment.html
    
    
  2. 
      
david
  1. Why did you attach screenshots of source code?

  2. HTML comments end with -->, not --!>. In this case, the browser is guessing what you meant to do, but the way you have it is messing up syntax highlighting.

  3. 
      
EK
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/templates/diffviewer/diff_file_fragment.html
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/templates/diffviewer/diff_file_fragment.html
    
    
  2. 
      
EK
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/templates/diffviewer/diff_file_fragment.html
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/templates/diffviewer/diff_file_fragment.html
    
    
  2. 
      
EK
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/templates/diffviewer/diff_file_fragment.html
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/static/rb/js/pages/views/diffViewerPageView.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/templates/diffviewer/diff_file_fragment.html
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/static/rb/js/pages/views/diffViewerPageView.js
    
    
  2. 
      
brennie
  1. 
      
  2. This is the header I mean. When "hidden", this should still appear and the table body should say something like:

    "This file has been hidden due to it being a minified file. [Show diff]."

  3. reviewboard/static/rb/js/pages/views/diffViewerPageView.js (Diff revision 5)
     
     
     
     
     
     
     
     
     
     
     
     
     

    We do not want to set the block to be invisible. We still want to see the header describing the file.

  4. mf is not descriptive enough a selector.

  5. 
      
david
  1. Why the change in design? I thought we wanted to let people expand them individually from within the file boxes.

  2. 
      
EK
SH
  1. 
      
  2. It looks like there is an extre newline here.

  3. I think these change comments are not very helpful. All changes are already highlighted in the diff viewer and git can be used to display when a specific portion of code was added.

  4. 
      
EK
EK
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/diffviewer/diffutils.py
    
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/templates/diffviewer/diff_file_fragment.html
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/static/rb/js/pages/views/diffViewerPageView.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/diffviewer/diffutils.py
    
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/templates/diffviewer/diff_file_fragment.html
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/static/rb/js/pages/views/diffViewerPageView.js
    
    
  2. 
      
EK
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/diffviewer/diffutils.py
    
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/templates/diffviewer/diff_file_fragment.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/diffviewer/diffutils.py
    
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/templates/diffviewer/diff_file_fragment.html
    
    
  2. 
      
EK
EK
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/diffviewer/diffutils.py
    
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/templates/diffviewer/diff_file_fragment.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/diffviewer/diffutils.py
    
    Ignored Files:
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/templates/diffviewer/diff_file_fragment.html
    
    
  2. 
      
EK
Review request changed

Status: Discarded

Loading...