Architecture decision record · ADR-0018

Grid row features

One list of rows. The grid shows table.getRowModel().rows.

Status
Accepted
Deciders
Joe Gaudet
Created
Updated
PRD
PRD
Related
None

Context

The parity matrix had these AG Grid row features as "planned" or "partial" in the Grid: client row groups, sticky group rows, tree data, row pinning, row numbers, full-width rows, master/detail, auto row height, row drag, cell and row spanning, the "no rows" and loading overlays, tooltips and touch. The engine has groups, expanding, aggregation, row pinning and cell spanning. LatticeGrid positions body rows with translateY in recycled slots (ADR 0002). The maintainer was not available, so this ADR records the decisions.

Decision drivers

Not recorded in the original ADR.

Options considered

Not recorded in the original ADR.

Decision

  1. One list of rows. The grid shows table.getRowModel().rows. With the grouping and expanding features, this list is the flat list of open groups and rows. Pinned rows are part of the list: the top rows first, then getCenterRows(), then the bottom rows. Detail rows are part of the list, after their master rows. So aria-rowindex, the keys, the harness and the active cell use one index for all rows. No second rowgroup and no copy of a row.
  2. A treegrid from the table features. A table with the expanding feature (toggleAllRowsExpanded) gives role="treegrid", also when no row has sub rows. The role does not change with the data. The level is row.depth + 1.
  3. Groups and tree rows. A group row (getIsGrouped()) has the same DOM as a server group: button.lt-group-toggle and span.lt-group-label (value (leaf count)) in the first cell. Its other cells show row.getValue(), which is the aggregate. A tree row with sub rows has the toggle, then its value. Enter on a group row or a tree row toggles it, and does not call @onCellActivate.
  4. Floating rows read CSS variables. A sticky group row and a pinned row are the real row element, with a translateY that is a CSS clamp(), max() or min() of its own position and var(--lt-view-top) or var(--lt-view-bottom). A scroll listener writes the two variables on the scroller. A scroll moves these rows with no render. The listener writes only when the grid has floating rows, so other grids do no extra work. The grid keeps the open parent rows of the rows in range, and the pinned rows, rendered, as it keeps held rows.
  5. Sticky groups are on by default. An open group row (and an open tree row) sticks under the header, one row lower for each level. The last row of its group pushes it up. There is no option to turn it off.
  6. Row numbers are a column. rowNumberColumn() returns a column def with meta.lattice.rowNumber. The grid moves it to the start-pinned columns and shows the 1-based display position. A sort changes the rows, not the numbers.
  7. Full-width and detail rows have one cell. @isFullWidthRow and @fullWidthRow give a row one gridcell with aria-colspan of all columns. @detailRow adds a disclosure button (button.lt-detail-toggle, with aria-expanded) to the first cell. An open master row has a detail row after it, with the same one-cell DOM. The grid keeps the open state by row ID. The arrow keys go into the one cell from any column.
  8. Measured heights only when needed. @rowHeight="auto", or an open detail row, turns on the measure modifier (the virtualizer measureElement, as LatticeList does). The item key is the row ID, so a size stays with its row. With no detail row and a fixed height, the modifier does nothing, so the fixed path does not change. Limit: sticky and pinned rows, and row spans, use the fixed row height.
  9. Nested grids. A cell is a cell of this grid only when its closest .lt-grid is this grid. cellElement looks only in the rows of this grid. A grid in a detail row keeps its own keys, focus and active cell.
  10. Row drag. meta.lattice.rowDrag puts span.lt-row-drag-handle (aria-hidden) in the cells of a column. A drag of the handle and Alt+ArrowUp or Alt+ArrowDown call @onRowMove({ row, fromIndex, toIndex }). The app moves the row in its data. The live region says "Moved row 3 to row 4", and the active cell follows the row. A drop on another LatticeGrid calls its @onRowDrop({ row, source, toIndex }), and the source grid does not move the row. The grids find each other in a module WeakMap of mounted grids. Alt+arrows, because Shift+arrows extend a range.
  11. Cell spanning. With the engine cell spanning feature, a spanning cell has aria-rowspan or aria-colspan, and the size of its rows or columns. A cell that a cell above covers leaves an aria-hidden spacer of its width. A cell that a cell before it covers leaves nothing. The row of a spanning cell has z-index: 1, so its cell paints over the rows under it. The first row of a span that covers the first row in range stays rendered.
  12. Overlays and tooltips are outside role=grid. div.lt-overlay-message role="status" says "Loading…" (with @loading, which also sets aria-busy) or "No rows". A column meta.lattice.tooltip(value, row) gives div.lt-tooltip role="tooltip" in the root. Only the cell of the open tooltip has aria-describedby. Hover and focus show it; leaving the cell, blur and Escape hide it. There is no delay.
  13. Touch. Scroll and tap use the browser. A touch press of 500 ms on a body cell opens the context menu, as a right click does, when the grid has a menu. A press that moves more than 10 px is a scroll. The contextmenu event that the browser can send after a long press is ignored.

Consequences

  • The matrix rows for these features are "done", each with its Grid test.
  • Server row models keep their own groups. Sticky group rows and detail rows work with client rows only.
  • An open detail row copies the row list (one pass over the rows). An open group with many rows scans to the end of the group for its sticky end. Each has a shortcut: comment.
  • A column span assumes that its columns are side by side. Column virtualization or pinning in a span is not handled.

Confirmation

Not recorded in the original ADR.

Interview record

Each question of the interview with its answer and its source. A fact from the code or a document, a question that the author did not ask, and an assumption are rows too.

QuestionAnswerSource
Where does the text of this page come from?From the Markdown file docs/adr/0018-grid-row-features.md at commit 4c77ac4. The text of each section is the text of the Markdown file. A section that the Markdown file does not have says so.Document: docs/adr/0018-grid-row-features.md

Changelog

DateAuthorChange
2026-12-02Joe GaudetStatus in the Markdown file: accepted, 2026-12-02.
2026-12-03Joe GaudetCommit 7ce4af2: Lattice 1.0 (#1)
2026-12-04Joe Gaudet (agent)Converted from docs/adr/0018-grid-row-features.md to this page. The text is the text of the Markdown file.

The adr skill of skillsaw wrote this page. The HTML in this file is the source of truth. The diagrams are the Mermaid sources in it.