Split per-fragment handling out of DiffFragmentQueueView.

Review Request #9117 — Created Aug. 3, 2017 and submitted

Information

Review Board
release-3.0.x
d651403...

Reviewers

Originally, DiffFragmentQueueView's sole responsibility was to handle
the queueing and loading of fragments from the server and to inject
those fragments into the DOM. Over time, it's been expanded to handle
interaction on each fragment. This added to the complexity a bit,
requiring additional bookkeeping and expensive selectors that worked
across the whole page.

This change splits the per-fragment handling out of
DiffFragmentQueueView and into its own DiffFragmentView class. This
handles the hover controls and expansion/collapsing logic. The
mouse/click events and centered collapse button tracking are all handled
per-view now, allowing the event selectors and button bookkeeping to be
more efficient. The view now only keeps the CenteredElementManager
around when needed, and doesn't require a page-wide selector every time
there's an expansion/collapse.

Unit tests have been updated for DiffFragmentQueueView for some of the
new tracking, and new tests were added for DiffFragmentView.

Unit tests pass.

Manually tested that all hover, expansion, and collapsing logic all
worked correctly.

Description From Last Updated

Args?

daviddavid

Args?

daviddavid
david
  1. 
      
  2. Show all issues

    Args?

  3. Show all issues

    Args?

  4. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (c0b046d)