Grid UI (milestone M7, part 1)
Each filter value is a FilterNode. The text, number, date, set and multi filters write a protocol tree as the column filter value, with the column ID in each leaf.
Context
Decision 27 of the plan puts all of the AG Grid chrome in 1.0: menus, tool panels, all filters,
the status bar, the toolbar and find (research section 4.1). Another track edits the Grid at the
same time, so this part does not change LatticeGrid. The engine is the table-core port: column
filters with registered filter functions, faceting, a global filter, visibility, order, pin and
grouping. The protocol has one filter tree, FilterNode, that a server can read.
Decision drivers
Not recorded in the original ADR.
Options considered
Not recorded in the original ADR.
Decision
- Each filter value is a
FilterNode. The text, number, date, set and multi filters write a protocol tree as the column filter value, with the column ID in each leaf. One filter function,filterFn_node(registered asnode), applies all of them. The app can send the AND of the column filters to a server with no change. - The client uses the protocol row test.
@ember-lattice/protocolexportsmatchesFilter(node, row, allowList), andevaluatecalls it. Thenodefilter function makes a plain row of the columns in the tree, and an allow-list frommeta.latticeUi.filter. It changes aDateto an ISO string. A test puts the same rows throughevaluateand through the table filter, and gets the same rows. - The quick filter and the advanced filter share the global filter. The filtered row model
has no table-level predicate, and a column filter needs a real column. The global filter value
is
{ quick, advanced }, andglobalFilterFnreturns "the column holds the quick text, and the tree keeps the row". The engine ORs this over the columns, so the result is "one column holds the text, and the tree keeps the row". Limit: at least one column must allow the global filter. - An empty set filter stays.
in []keeps no row. Thenodefunction removes a filter only when the value isundefined. "Select all" writesundefined. - The UI uses structural types.
UiTable,UiColumnandUiRowname only the methods that the UI calls, asLatticeListdoes withListTable. The UI works with a table of any features. - Joinery primitives for each widget. The column menu is a
DropdownMenu(APG menu button, not modal). Its filter opens in aPopoverwhen the menu has closed (onCloseAutoFocus), so the focus that goes back to the button does not close it. The side bar isTabs. The density switch is aRadioGroup. The set filter is aLatticeListlistbox. Its options havearia-selectedand no checkbox, because a checkbox in an option is a nested control. The columns panel is an APG tree witharia-checkedon each item. - No state that the engine does not have. The engine has no auto-size and no pivot, and aggregation is a column def option. So the column menu has no auto-size item, and the columns panel has a row group zone only.
Grid extension points
Done in contract section 9 (2026-12-02): the header slot (meta.lattice.header, with
GridColumnMenu), the floating filter row (@floatingFilter, with GridFloatingFilter),
data-find-match (@find), GridStateHandle.scrollToCell (FindBar @grid), @density, the
context menu hook (@onCellContextMenu and the contextMenu block, with GridContextMenu) and
the side bar region (the sideBar block).
The Grid gives a GridColumn to a slot. asUiColumn checks that it is an engine column, so the
UI parts need no cast.
Consequences
Remaining work
- The toolbar still writes
data-lt-densityitself when it gets@grid. An app with@densitygives@onDensityChangeto the toolbar and the value to the grid. GridContextMenuuses the async Clipboard API. A page without clipboard permission does not copy or paste from the menu; Ctrl+C and Ctrl+V still work.- The floating filter row has no cell for a column that is not in the column range, as in the other rows.
- A sort change is announced only when the user sorts from the Grid header, not from the column menu.
Consequences
- A server row model gets the same filter tree that the client filters with.
- A test waiter holds the quick filter debounce, so
settled()waits for the write. - The UI has no styles of its own yet. The theme track styles the
.lt-*UI classes.
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.
| Question | Answer | Source |
|---|---|---|
| Where does the text of this page come from? | From the Markdown file docs/adr/0013-grid-ui.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/0013-grid-ui.md |
Changelog
| Date | Author | Change |
|---|---|---|
| 2026-12-01 | Joe Gaudet | Status in the Markdown file: accepted, 2026-12-01. |
| 2026-12-03 | Joe Gaudet | Commit 7ce4af2: Lattice 1.0 (#1) |
| 2026-12-04 | Joe Gaudet (agent) | Converted from docs/adr/0013-grid-ui.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.