Repository navigation
feat(rune-kit): Table::virtual_columns and Table::frozen_columns for wide tables (part of #997) - #2238
Merged
Conversation
…wide tables (part of #997)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #997
Adds opt-in horizontal column windowing and pinned leading columns to
rune_kit::Table, ARIA grid coordinates on AccessKit and the web DOM mirror, and zero-view-run verticalvirtual_rowsremounts insidescroll_xywrappers.API
What changed
crates/rune-kit/src/containers/table/{window,render,view,order}.rsandtable.rs:Table::virtual_columns(bool)(defaultfalse) andTable::frozen_columns(usize)(default0), strictly additive with zero behaviour or accessibility tree changes when left off.scroll_wide(true)overflows the viewport,ColumnPlancomputes exact column prefix offsets, mounts0..frozenwithEl::sticky_left(col_x)and opaque row/header fills (composing with the header'ssticky_top(0.0)and drawing a stuck right divider), windows non-frozen columns to[scroll_x - overscan, scroll_x + view_w + overscan], and emitsa11y_hiddenfixed-width spacers so total scroll width and every mounted column's x-position match a non-virtualised table.content'son_layout_txwith an edge hysteresis band (Tx::live_only()while inside the band, so vertical scrolls and small sideways scrolls trigger zeroviewruns; crossing the band commits oneviewpass to shift the column window).El::caret_browsing(true)stay pinned at their exact x-offset when scrolled out of view and unmount cleanly on blur/release.El::row_count,El::column_count,El::row_index, andEl::column_indexongrid,row,columnheader, andgridcellnodes.crates/rune/src/runtime/commit/remount.rs: relaxedCommitState::virtual_onlyfrom!n.scroll_axes.x()ton.scroll_axes.y() && (!n.scroll_axes.x() || tree.nodes[list_idx].parent != Some(scroll_idx))so verticalvirtual_rowsnested inside a fixed-width wrapper underscroll_xytakesCommitKind::Remountwith zeroviewruns.crates/rune/src/runtime/web/a11y.rs,patch.rs,crates/rune/src/platform/web/bridge.js: mirroredaria-rowcount,aria-colcount,aria-rowindex, andaria-colindexinto the web DOM mirror and focus proxy.examples/kit-gallery/src/stories/table.rs&stories.rs: addedrune-table--virtual-columns(10,000 × 200 sheet with toggles for virtual and frozen columns), plus docs incrates/rune-kit/README.mdandchangelog/unreleased/2026-11-25-table-virtual-columns.md.Outside answers followed
aria-rowcount,aria-colcount,aria-rowindex,aria-colindexfor partially mounted grids (leaving non-windowed defaults unchanged).position: sticky(El::sticky_left+El::sticky_top).Benchmark (
--profile perf, 5 paired alternating runs, headless)10,000 rows × 200 columns (100 pt each), 1,000 × 1,150 pt viewport (~40 visible rows; 42 mounted rows with
virtual_overscan(0.0, 0.0)). Headless CPU measurements exclude GPU upload and presentation.virtual_columns(false), frozen_columns(0)virtual_columns(true), frozen_columns(2)gridcell)viewruns)viewruns)viewruns)viewruns (all 200 mounted)viewrun per ~360 pt; 0viewruns within hysteresis band)What remains on #997
crates/runescroll-driven 2D grid / horizontal-axis virtualization primitive (with zeroviewruns when crossing horizontal column boundaries for custom sheets outsiderune-kit::Table) remains open on 2D virtual windows: canvases and wide tables mount only what's in view, without re-runningview#997 alongside Virtual rows are vertical only: a wrapped grid mounts every tile,.virtualizein a horizontal scroll stacks diagonally, and wide rows are cut #1384.Not seen on a real device