Split per-fragment handling out of DiffFragmentQueueView.
Review Request #9117 — Created Aug. 3, 2017 and submitted
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
DiffFragmentQueueViewand into its own
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
around when needed, and doesn't require a page-wide selector every time
there's an expansion/collapse.
Unit tests have been updated for
DiffFragmentQueueViewfor some of the
new tracking, and new tests were added for
Unit tests pass.
Manually tested that all hover, expansion, and collapsing logic all
Fleshed out docs.
Revision 2 (+535 -246)
Checks run (2 succeeded)