Updated row and spacer handling for Escalator (#11438)
Updated row and spacer handling for Escalator.
Main changes:
- Spacers are only maintained and checked for rows that have DOM
representation, and not at all if there is no details generator. This
gives notable performance improvements to some particularly large Grids
- Escalator no longer tries to trim away any rows that don't fit within
the viewport just because a details row gets opened in Grid. This leads
to some increase in simultaneous DOM elements, but simplifies the logic
considerably. For example opening or closing details rows doesn't
require checking the overall content validity beyond the details row
itself anymore, but some repositioning at most. There are also no longer
any orphaned spacers without corresponding DOM rows.
- Spacers are better integrated into the overall position calculations.
- Some public methods that are no longer used by Escalator or have
changed functionality or order of operations. Any extending classes that
tap into row, spacer, or scroll position handling are likely to need
reworking after this update.
- Auto-detecting row height is delayed until Escalator is both attached
and displayed.
Always calculate Escalator max row count the same way (#8740)
* Rename getMaxEscalatorRowCapacity to describe what it does
* Always calculate Escalator max row count the same way
This changes Escalator to not take a horizontal scrollbar
into account when trying to determine "maximum visible rows". This will
add another row, compared to previous versions, when there is a horizontal
scrollbar. In reality, it would likely make sense to always add 10 more rows
to have some buffer above and below the visible area.
Fixes #8661
- Fixed regression caused by #17423 in IE8
- Fixed fragile tests for focusing spacer content in Grid
- Changed TestCategory for EscalatorBasicClientFeaturesTest from 'escalator' to 'grid'.
Change-Id: I644f85a68fee643e468342093ad537dcd7bf8626
Escalator spacers are sized and placed like "fixed" (#16644)
The width of a spacer is now 100% of the viewport (width of escalator
minus possible scrollbars), and and are always horizontally frozen
with the viewport.
Change-Id: I6616747784cdb61551e144d941526dee815a7ef9
Fixes two bugs when inserting escalator rows with spacers open (#16644)
If the viewport is not yet filled with escalator rows, it didn't account for
spacers. Also, the scrollbar was updated incorrectly after adding
new rows.
Change-Id: Id9cab71c2c4b82331771d1243143eb9db0883a6c
Note that this patch is only a first step of many. This patch only
moves displayed rows when spacer dimensions change. Doing
anything else afterwards (even scrolling) will probably not (and
is not intended to) look good at this stage.
Change-Id: I4de6abd932f587682840396df7a56a7df710af69
Escalator supports adding spacer elements into DOM. (#16644)
This is the first step towards Grid's details rows: Escalator puts spacer elements
in the DOM, and is able to scroll around with them. The spacers are put in their
correct locations, but they will not affect the normal row elements in any way at
this time.
Change-Id: Id20090c4de117e07e332dcc81e9964360f778258