[WIP] Add Show/Hide .min button for minified source files
Review Request #7700 — Created Oct. 15, 2015 and discarded
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/19I 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/24The 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/31I 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/6The 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/19Test button to see where they are displayed. Test button functionality with alert()
Test button functionality with diffReviewable.js
-10/24Add 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/31Working on understanding python source code for whitespace, no code updated yet
-11/6Add 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: … |
|
|
HTML comments end with -->, not --!>. In this case, the browser is guessing what you meant to do, but … |
|
|
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 … |
|
|
mf is not descriptive enough a selector. |
|
-
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/
Summary: |
|
||||||
---|---|---|---|---|---|---|---|
Testing Done: |
|
Description: |
|
||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
||||||||||||||||||||||||||||||||||||
Added Files: |

-
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
-
Why did you attach screenshots of source code?
-
reviewboard/templates/diffviewer/diff_file_fragment.html (Diff revision 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.

-
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

-
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
Summary: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Testing Done: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 5 (+50 -3) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Removed Files: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added Files: |

-
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
-
-
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]."
-
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.
-
reviewboard/templates/diffviewer/view_diff.html (Diff revision 5) mf is not descriptive enough a selector.
-
Why the change in design? I thought we wanted to let people expand them individually from within the file boxes.
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
-
-
reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js (Diff revision 5) It looks like there is an extre newline here.
-
reviewboard/static/rb/js/pages/views/diffViewerPageView.js (Diff revision 5) 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.
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|

-
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

-
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
Testing Done: |
|
---|

-
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