Add the ability to toggle display of entire files.

Review Request #11210 — Created Oct. 5, 2020 and updated — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

The current diff viewer shows the changes for all files and it can be
tedious to scroll through, especially with large changes. Adding the
ability to hide/unhide files will better allow users to look at only
a subset of the changes at once.

We added a toggle to the header for each file that collapses the file
to a single line filename. Toggling a collapsed file header will expand
the entire file. This feature is referenced from the toggling of
Reviews in a Review Request. When the toggle button is clicked,
jQuery toggle() is called on the revision-row class and tbody
attribute. The toggle() function works toggling the CSS display
property between display: none.

Wrote onToggleCollapseClicked in diffReviewableViewTests.es6.js.

Diff Revision 4

This is not the most recent revision of the diff. The latest diff is revision 7. See what's changed.

orig
1
2
3
4
5
6
7

Commits

First Last Summary ID Author
The current diff viewer shows the changes for all files and it can be
tedious to scroll through, especially with large changes. Adding the ability to hide/unhide files will better allow users to look at only a subset of the changes at once. We added a toggle to the header for each file that collapses the file to a single line filename. Toggling a collapsed file header will expand the entire file. This feature is referenced from the toggling of `Reviews` in a `Review Request`. When the toggle button is clicked, jQuery `toggle()` is called on the `revision-row` class and `tbody` attribute. The `toggle()` function works toggling the CSS `display` property between `display: none`. Testing done: Wrote `onToggleCollapseClicked` in `diffReviewableViewTests.es6.js`.
6ae899ab5c45852c6c2fb3bc577a5a0aeb765ec0 Kean Weng Yap
reviewboard/static/rb/js/diffviewer/views/diffReviewableView.es6.js
reviewboard/static/rb/js/diffviewer/views/tests/diffReviewableViewTests.es6.js
reviewboard/templates/diffviewer/diff_file_fragment.html
Loading...