Add a link for viewing deleted file content.
Review Request #7796 — Created Dec. 3, 2015 and submitted — Latest diff uploaded
In the diff viewer, it's often useful to evaluate whether or not it was
right to remove a file. Currently, we instead see the message:This file was deleted. The content cannot be displayed.
This change will make it possible to view deleted file content by
providing a clickable link that is labelled "Show content.". An event
listener will requeue the corresponding diff file, where eventually a
GET request ending in the following will be made:fragment/<FileDiffID>/?<OtherQueryStringPairs>&show-deleted=1
To accomplish this without running into any potential caching issues, we
added theshow_deleted
flag to the ETag of the corresponding diff file.
- Ran and passed all relevant reviewboard unit tests.
- Manually verified that deleted files could be correctly displayed on
Chrome and Firefox without triggering a full page reload, and that
diff files were cached correctly.
Diff Revision 10
This is not the most recent revision of the diff. The latest diff is revision 11. See what's changed.
orig
1
2
3
4
5
6
7
8
9
10
11
reviewboard/diffviewer/renderers.py |
---|
reviewboard/diffviewer/views.py |
---|
reviewboard/static/rb/css/pages/diffviewer.less |
---|
reviewboard/static/rb/js/diffviewer/models/diffReviewableModel.js |
---|
reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js |
---|
reviewboard/static/rb/js/pages/views/diffViewerPageView.js |
---|
reviewboard/templates/diffviewer/diff_file_fragment.html |
---|