Repository navigation
Conversation
👋 Heads-up: dev close is in effectThanks for the contribution! This repository is currently in dev close ahead of release This PR appears to introduce public-API changes (detected by diffing the Custom Elements Manifest against the latest published version on npm):
Could you please hold off on merging into If this change must ship in the current release, please request a review from one or two members of @UI5/ui5-team-webc so the team can sign off explicitly.
Posted automatically by the Dev Close Notice workflow. |
1 similar comment
👋 Heads-up: dev close is in effectThanks for the contribution! This repository is currently in dev close ahead of release This PR appears to introduce public-API changes (detected by diffing the Custom Elements Manifest against the latest published version on npm):
Could you please hold off on merging into If this change must ship in the current release, please request a review from one or two members of @UI5/ui5-team-webc so the team can sign off explicitly.
Posted automatically by the Dev Close Notice workflow. |
|
🚀 Deployed on https://pr-14308--ui5-webcomponents-preview.netlify.app |
8ba2fcf to
9d4d16d
Compare
9d4d16d to
a9cd157
Compare
a9cd157 to
fffec23
Compare
fffec23 to
c84ef10
Compare
c84ef10 to
a5f64f5
Compare
a5f64f5 to
db61538
Compare
…scrolling
Replace fixed-height calculations with measured row heights so wrapped
text, expanded details and asynchronously loaded content can be
virtualized without losing the reader's position.
Keep height lookup and updates logarithmic with two Fenwick trees:
one sums stored heights, the other counts stored rows. Unseen rows use
a shared estimate updated only after the measured sample doubles and
changes meaningfully. Placeholder measurements do not affect it.
Absorb measurement corrections in a drift offset and move one rendered
block inside the shared table grid. Reconcile with native scrollend,
with boundary handling for the first and last rows. Cap the physical
scroll range at 16 million pixels for larger data sets. Keep native
scrolling rather than introducing custom scroll physics.
Track keyboard focus by logical row and column, including recycled
elements and delayed application rendering. Preserve shared column
alignment and base alternating colors on the logical row position.
Add experimental TableRow.loading placeholders with estimated heights,
hidden cell content, aria-busy and suppressed row activation. Actual
loading rows use a reduced-motion-aware CSS pulse; uncovered areas use
a separate static, viewport-sized fallback and do not set row.loading.
Keep applications responsible for creating and binding their rows.
Render the half-open range [first, last) in ascending position order.
For example:
<ui5-table-virtualizer slot="features" row-count="10000"
estimated-row-height="80" overscan="400">
</ui5-table-virtualizer>
On range-change, render rows first through last - 1 with position set.
Use loading=true only while their data is unavailable, and keep their
cells. Use scrollToIndex(5000, "Start") to navigate to a logical row.
Call reset() after inserting, removing or reordering the data.
Add local-data and variable-height demos, renderer comparisons and
long/short explanatory stories. Reuse connected positional pools on
mobile; use state-preserving Pool moves only where moveBefore exists.
Size demo reserves from measured estimates and retain their high-water
marks. Include Pause/Play and Replay on the long story's animations.
Update migration samples, editor API types and Cypress coverage for
variable heights, anchoring, loading, recycling and asynchronous focus.
Mark the newly introduced APIs as available since 2.30.0.
BREAKING CHANGE: remove the experimental rowHeight and extraRows
properties. Replace rowHeight/row-height with
estimatedRowHeight/estimated-row-height as a hint, not a fixed size.
Replace extraRows/extra-rows with overscan measured in pixels.
Expose estimatedRowHeight, overscan and TableRow.loading in the React playground types so the migrated virtualization sample no longer uses stale fixed-height API declarations.
Restore the generated Monaco declarations to their upstream state. Keep the variable-height virtualizer, samples and runtime behavior unchanged.
Initialize the demo pages through async functions so the production bundle supports the configured ES2020 and browser targets. Keep component readiness checks and synchronous range rendering intact. Report initialization failures explicitly.
Measure pop-in and positioned group rows in the internal scroll viewport. Reuse GridWalker navigation to preserve the cell column across group headers, including delayed rendering, while retaining focus recovery for recycled rows. Keep rowHeight and extraRows as deprecated migration aliases, with explicit new properties taking precedence. Add independent demo controls and stable, type-aware recycling without introducing a group-text slot API.
50c6572 to
9a41a13
Compare
Background
The existing virtualizer requires one fixed height for all rows.
This does not accommodate wrapped text, expanded details, resized columns or content arriving asynchronously.
This change supports content-based row heights while retaining native scrolling, shared table-column alignment and application-owned rendering.
What changed
@since2.30.0.Important implementation decisions
Efficient height calculations
Two Fenwick trees store height sums and stored-row counts. Position lookup and height updates take O(log n); changing the shared estimate does not require updating every unseen row.
Stable visible content
Measurement corrections are absorbed into a drift offset. The rendered block moves inside the existing table grid, preserving column alignment.
Drift reconciliation uses native scrollend, with boundary handling for the first and last rows. No custom scroll physics are introduced.
Large data sets
The physical scroll range is capped at 16 million pixels. Larger logical ranges are mapped into that physical range.
Application-owned rows
The application still handles range-change and renders a contiguous, ascending range. The virtualizer does not create or bind application rows.
The demos retain connected positional pools where state-preserving DOM moves are unavailable. Pool mode uses moveBefore where supported.
Loading versus uncovered areas
TableRow.loading means data is unavailable. The separate static empty-area fallback covers areas awaiting rendered content; it does not set loading=true. Local-data demos render directly without a server delay.
Usage example
Handle range-change by rendering first through last - 1, setting each row's position to its logical index. Rows may have different heights.
Set loading=true only when a row's data is unavailable, keeping its cells in place. Once data arrives, populate the cells and clear loading.
Use scrollToIndex(5000, "Start") to navigate to a logical row. Call reset() after inserting, removing or reordering the underlying data.
Validation
Physical-device and cross-browser CI validation remain important.
Extreme scrollbar jumps can still expose the empty-area fallback.
The changes do not guarantee a particular FPS on every device.
Breaking change
Rhe experimental rowHeight and extraRows properties are removed.
This is an initial hint, not an enforced fixed height.
Demo