Add support for incremental diff expansion.

Review Request #3327 — Created Sept. 14, 2012 and submitted — Latest diff uploaded

Information

Review Board
release-1.6.x

Reviewers

Add support for incremental diff expansion.

Review Board has always had the ability to let users expand collapsed
chunks of diffs, but this can produce a lot of content when dealing with
large sections of collapsed code.

This feature introduces incremental expansion. Users can expand the
diffs by 20 lines at a time, before or after the collapsed header. They
can also expand up to the nearest function listed, and of course, can
expand te entire header.

When a diff is expanded, even partially, little floating collapse
buttons will appear near the center column. They'll stay in view,
centered amongst the visible portion of the expanded region. Clicking
them will re-collapse that segment.

This feature was sponsored by NetApp, Inc.
Tested the incremental expansion (pre/post) for chunk headers at the top,
middle, and bottom of diffs.

Tested that expanding chunks kept the chunk header in place, regardless of
which side. When fully expanding, the collapse button started where the chunk
header was.

Tested that fully expanding a chunk continues to work.

Tested that expanding to a class/function works.

Tested that collapsing works in all cases.

Tested that function/class headers update as the chunk is incrementally expanded.

Tested all this with Chrome, Firefox, and IE.