ADR-0046 — The density that was already the cell idiom
Status: Accepted · Date: 2026-08-22 · Project: 002-renaissance, close-out sweep (hand-rolled data tables, final slice)
Context
Thirty-one files hand-rolled <table class="data-table">. Seven slices took
twenty-nine of them to DataTable. The last two were held back together
because one grep matched both: class="data-table small" —
apps/web/src/pages/admin/AdminInvoicePage.tsx and
apps/web/src/pages/admin/AdminTaxImportPage.tsx. The standing note called
.small a density DataTable has no variant for, and made growing that
variant — or dispositioning both tables out — the sweep's last item.
Two facts decide it, and neither is about density.
.small is not a density. It is one declaration in patterns.css:
font-size: 13px. It sets no padding, no line-height, no row height.
.data-table declares font-size: 14px; patterns.css imports after
components.css, so on these two tables .small wins by order. The
whole delta between the two tables and the twenty-nine already converted is
one pixel of type.
That pixel is already in the converted idiom. Every table this sweep
converted writes its cells as <span className="small …"> — e.g.
AdminThemesPage.tsx:195. The class the two survivors carried once on the
<table> is the class the twenty-nine carry on every cell. There was never a
variant missing; there was a whole-table shorthand for something the
component's own contract already puts on the cell node (DataTableColumn:
"a consumer classes the node it returns from cell instead").
The two tables were bundled by a class, not by a kind. Once the size question dissolves, they stop resembling each other:
- AdminTaxImportPage is nine records describing the CSV contract the importer parses — three columns, no cell the component cannot draw.
- AdminInvoicePage is an invoice document: two columns, no sort, no
selection, no row click, no empty state, no loading state, and a
<tfoot>carrying the total.
Decision
Studio grows no table size or density variant. A table-level type class converts to the per-cell
smallthe idiom already writes. This is the general rule, not a one-off: a whole-table text intent is cell copy, and belongs on the nodecellreturns.AdminTaxImportPage converts on that idiom, with no new component API.
AdminInvoicePage is dispositioned out of the conversion — not deferred.
DataTableis a records grid; an invoice is a document, and its<tfoot>is the part no Studio table emits. Afooter?: ReactNodeprop would hand<td>authoring back to the consumer, which is the one thingDataTableColumnis documented not to do; afooterRow?: Trendered through the same columns keeps the contract but invents an API for a single call site, and a total row in<tbody>would take.lk-table tbody tr:hoverand read as a record.Therefore
.data-tableand.table-scrollstay instyles/components.css, permanently, as that one table's own rules..data-table .is-centeris deleted — 0 emitters.
Consequences
.data-table2 → 1 emitting.tsxfile;.table-scroll6 → 5;.is-center0 emitters, rule deleted. The hand-rolled-data-table sweep is closed; one survivor, with a written reason, is the end state.- Studio's table surface is unchanged — no new class, no new prop, no dist rebuild. Parity is unmoved at 120 React.
- A future table asking for "smaller text" gets
smallon its cells, and a future table asking for a footer row re-opens this ADR rather than adding a prop: one more<tfoot>call site is the evidence that would change decision 3, and one is not it.
Alternatives rejected
- Add
size="sm"toDataTable. Buys nothing the cell class does not already buy, and would make two ways to say one pixel. - Convert the invoice by dropping
.small. Rejected before this ADR and still rejected: it changes the document, and the<tfoot>is the real blocker regardless of size. - Retire the invoice table's
<tfoot>into<tbody>to force the conversion. Trades a correct document for a green grep.
Source: docs/decisions/0046-the-density-that-was-already-the-cell-idiom.md