Add infinite scrolling to the diff viewer

Review Request #7047 - Created March 12, 2015 and updated

Mingyi CHEN
Review Board
master
7296819...
reviewboard, students

Add infinite scrolling to the diff viewer.

When working with long diffs, it's common for the diffs to be split up across
several pages. This can end up being a pain to review, as it means having to
deal with manual pagination.

This change replaces the pagination to scroll loading. When user scroll to the
bottom of the page, diffs will be loaded automatically without having to click
anything.

First bind a listening function to the window to check the position. And when
it detect scroll bar touch the bottom, it will active the loading function to
load next diffs. The loading function use ajax to load pagination's diffs, and
append to the current pagination. Similar to the set, when update the diffs,
properties should update one by one.

Remove the pagination and page selection, and modify the description of 'paginate
by' and 'paginate orphans'.

Passed all js-tests.

Manual tests with a 25 diff files review request.
Paginate by 2, and paginate orphans is 10.

When first load the pages, the page loads 2 diffs, and scroll to the bottom, it
loads 2 another difss. At last, the page loads 10 diffs.

  • 0
  • 37
  • 4
  • 41
Description From Last Updated
Review Bot
Mingyi CHEN
Review Bot
Mingyi CHEN
Review Bot
Mingyi CHEN
Review Bot
Mingyi CHEN
Review Bot
Mingyi CHEN
Review Bot
Mingyi CHEN
Wang Jun Sun
Mingyi CHEN
Review Bot
Mingyi CHEN
Vincent Le
Review Bot
Mingyi CHEN
Review Bot
Chris Arnold
Barret Rennie
Mingyi CHEN
Review Bot
Barret Rennie
Mingyi CHEN
Review Bot
Mingyi CHEN
Review Bot
Barret Rennie
Mingyi CHEN
Review Bot
Mingyi CHEN
Review Bot
Christian Hammond
Mingyi CHEN
Review Bot
Mingyi CHEN
Review Bot
Wang Jun Sun
Mingyi CHEN
Review request changed

Change Summary:

Fix revision 16 issues.

Commit:

-325a4599d82d8ba6106f0656ac3496a9b8621c5b
+72968191c6c7b9330a6786c635ea4be3e2fd26e6

Diff:

Revision 17 (+121 -48)

Show changes

Review Bot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/admin/forms.py
    
    Ignored Files:
        reviewboard/static/rb/js/pages/views/diffViewerPageView.js
        reviewboard/static/rb/js/diffviewer/views/diffFileIndexView.js
        reviewboard/static/rb/js/pages/models/diffViewerPageModel.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/admin/forms.py
    
    Ignored Files:
        reviewboard/static/rb/js/pages/views/diffViewerPageView.js
        reviewboard/static/rb/js/diffviewer/views/diffFileIndexView.js
        reviewboard/static/rb/js/pages/models/diffViewerPageModel.js
    
    
  2. 
      
Loading...