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

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

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.

Description From Last Updated

this._diffFragmentViews.forEach(view => view.hideControls(false)); ?

daviddavid

Maybe put the ( on the preceding line?

daviddavid
david
  1. 
      
  2. this._diffFragmentViews.forEach(view => view.hideControls(false)); ?

    1. Was going for efficiency, saving on the function calls, since reviews can have a lot of these. Should be fine though.

  3. Maybe put the ( on the preceding line?

  4. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (c2ed8ac)
Loading...