Fix the display of diff fragments in the review dialog and collapsed entries.

Review Request #9196 — Created Sept. 19, 2017 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
568b734...

Reviewers

Diff fragments were appearing in a broken semi-collapsed state in both
the review dialog and in entries that started as collapsed but were then
expanded. Since they couldn't perform height calculations (due to not
being visible on-screen), they had a sort of squashed look, requiring a
mouse-over to fix. The review dialog itself shouldn't have even allowed
for a collapsed state to begin with.

The diff fragment views can now be given default options through the
queue, currently used to control a new option indicating whether
collapsing is allowed. This option is off by default, and enabled only
for the review request page's entries. That fixes the display in the
review dialog.

The entries now keep track of their rendered diff fragments, through a
series of new callbacks in the queue. When expanding an entry, the diffs
are forced into a collapsed state, so they'll appear correctly.

Tested that diff fragments behaved correctly for initially-expanded
entries, initially-collapsed entries, and when repeatedly collapsing and
expanding entries.

Tested diff fragment display in the review dialog.

Tested the above behavior with entry collapse states after expanding
context in a diff.