You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found while implementing #4440. Observation-class: nothing a user hits today, and no fix is proposed here.
What
#4440 made two surfaces agree that an off-spec rowHeight gets no density — @object-ui/core's rowHeightToDensityMode and @object-ui/react's mapDensity. A third surface answers the same question without consulting either.
packages/plugin-grid/src/ObjectGrid.tsx:371 takes the value straight into state:
So for the same garbage rowHeight, the system now says: ListView → compact (32px), the spec bridge → no density at all, a standalone ObjectGrid → medium (44px). Note the ?? on line 371 makes ABSENT resolve to compact while OFF-SPEC resolves to medium — the same absent-vs-off-spec split #4440 removed from ListView.
Only the standalone path is affected: when ListView owns the grid it overwrites the prop with a value derived from density.mode (ListView.tsx:1676-1698, one of compact/medium/tall), so nothing off-spec survives that hop.
Why it is observation-class and not a defect today
Unreachable by any metadata that exists. The three-repo sweep run for #4352 (PR #4439), re-run at newer HEADs for #4440, found zero authored off-spec rowHeight values across objectui, the objectstack example apps and one downstream app; every authored value is one of the five RowHeightSchema admits.
It is also a materially weaker case than #4440 was. This is not a mapping table with a catch-all branch — it is a rendering ternary whose default is a style, and a component's own last-resort styling default is a legitimate thing to have. What is odd is only that the default it picks (medium) differs from the default the same component picks when the key is absent (compact).
Leave it and write down why — a leaf renderer's terminal else is not a vocabulary bridge, and forcing every styling ternary to pre-validate its input has a cost. If that is the intended position, say so at line 371 and name the two surfaces that decided otherwise, so the next reader does not file this twice.
Found while implementing #4440. Observation-class: nothing a user hits today, and no fix is proposed here.
What
#4440 made two surfaces agree that an off-spec
rowHeightgets no density —@object-ui/core'srowHeightToDensityModeand@object-ui/react'smapDensity. A third surface answers the same question without consulting either.packages/plugin-grid/src/ObjectGrid.tsx:371takes the value straight into state:and renders it through a ternary chain whose final
elseis themediumstyling (ObjectGrid.tsx:1834-1841, and again forcellClassNameat2370-2377):So for the same garbage
rowHeight, the system now says:ListView→ compact (32px), the spec bridge → no density at all, a standaloneObjectGrid→ medium (44px). Note the??on line 371 makes ABSENT resolve tocompactwhile OFF-SPEC resolves tomedium— the same absent-vs-off-spec split #4440 removed fromListView.Only the standalone path is affected: when
ListViewowns the grid it overwrites the prop with a value derived fromdensity.mode(ListView.tsx:1676-1698, one ofcompact/medium/tall), so nothing off-spec survives that hop.Why it is observation-class and not a defect today
Unreachable by any metadata that exists. The three-repo sweep run for #4352 (PR #4439), re-run at newer HEADs for #4440, found zero authored off-spec
rowHeightvalues acrossobjectui, theobjectstackexample apps and one downstream app; every authored value is one of the fiveRowHeightSchemaadmits.It is also a materially weaker case than #4440 was. This is not a mapping table with a catch-all branch — it is a rendering ternary whose default is a style, and a component's own last-resort styling default is a legitimate thing to have. What is odd is only that the default it picks (
medium) differs from the default the same component picks when the key is absent (compact).The decision, when someone takes it
schema.rowHeightinto the state exactly asListViewnow does, so off-spec and absent both land oncompact. This is the finding(core): rowHeightToDensityMode coerces an off-spec rowHeight tocomfortable, the opposite of what the spec bridge now does with the same input #4440 answer applied to the third surface, and it makes the??on line 371 mean one thing.elseis not a vocabulary bridge, and forcing every styling ternary to pre-validate its input has a cost. If that is the intended position, say so at line 371 and name the two surfaces that decided otherwise, so the next reader does not file this twice.Generated by Claude Code