Skip to content

Commit d341967

Browse files
committed
docs(spec): scope the span tier claim to one cell, not identity with omitting the key
The clause "at intermediate widths the field rendered identically to omitting the key" is false at the `.objectui-sha` pin `53ded82bf7` in a reachable configuration. With a form grid of 3 and a section `columns: 2` (ObjectForm passes the per-section count), a plain field with `span` omitted resolves to an effective 2 and emits `@md:col-span-2` — two of two cells at the 720px modal width — while `span: 'full'` at the pin emits `@2xl:col-span-3` only, which is one of two cells at that width. Not identical, and 'full' is the narrower of the two. The identity holds only where 'auto' resolves to a single cell, which is the one 3-column section the original measurement covered; the parenthetical scoped the measurement widths, not the form configuration. Both carriers now state what is true at every reachable configuration — the field takes a single cell, not the row — and the changeset keeps the pixel-identity reading where it was actually measured. The prose ships inside the published package and generates the public reference table, so a rendering claim that is false anywhere reachable is the defect class this card removes. Claude-Session: https://claude.ai/code/session_01KB5PFtxuy1x3dcR5gxudx6 Co-authored-by: Claude <noreply@anthropic.com>
1 parent a3dd4bb commit d341967

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎.changeset/17670-colspan-span-measured-behaviour.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ docs(spec): `FormField.colSpan` and `FormField.span` describe their measured beh
77
Both `.describe()` strings ship inside the published package (`src/**/*.zod.ts`, `dist`, `json-schema`) and they generate the public `content/docs/references/ui/view.mdx` tables, so what they assert is what every reader of the API reference — human or AI — is told the renderer does. Two of those assertions were measured false in Chromium at all three surface widths (#17328, `absolute-colspan-discouraged` withdrawn on the same evidence):
88

99
- `colSpan` was described as "fragile … a fixed span only lines up at the width the author imagined". It is not. The renderer clamps the span to the form grid's column count, so the cell starts at a real column boundary at every width; rendered overflow was 0px in every configuration measured, including `colSpan: 4` in a 3-column section — the case that would overflow if the clamp did not work. The old text contradicted its own next sentence, which already stated the clamp.
10-
- `span: 'full'` was described as "whole row at any column count". It is not. It resolves to the form grid's full column count, and at the `.objectui-sha` pin `53ded82bf7` the renderer emitted only the widest tier's class (`@2xl:col-span-3` for a 3-column grid — the identical class `colSpan: 4` emits), so at the 2-column modal width it rendered pixel-identical to authoring nothing at all.
10+
- `span: 'full'` was described as "whole row at any column count". It is not. It resolves to the form grid's full column count, and at the `.objectui-sha` pin `53ded82bf7` the renderer emitted only the widest tier's class (`@2xl:col-span-3` for a 3-column grid — the identical class `colSpan: 4` emits), so at the 2-column modal width it took one cell of two, not the row — in the single 3-column section #17328 measured, pixel-identical to authoring nothing at all.
1111

1212
Each key now states what it actually does. **The preference between the two keys is removed, not reversed** — `[legacy — prefer `span`]`, `Prefer `span`.` and `Prefer this over the absolute `colSpan`.` are gone, and nothing replaces them. Both spellings rest on the falsified claim, and the measurement puts the recommended one on the wrong side of it; the renderer question behind it — `span: 'full'` not spanning the row at intermediate container widths — was answered on the objectui side by objectui#9253 (commit `bd09957380`, 2026-09-12, part of objectui#9244), which emits one clamped col-span class per multi-column tier. That fix is unreleased at this repo's pin (`@object-ui/components` 17.6.0 at both, 0 tags contain the commit), so the text above anchors the pin state and this PR does not move `.objectui-sha`.
1313

‎packages/spec/src/ui/view.zod.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2613,13 +2613,13 @@ const FormFieldBaseSchema = lazySchema(() => {
26132613
* column count (`plugin-form` `resolveColSpan`); which container-query tiers
26142614
* receive the span class is the form renderer's, not this key's.
26152615
* At the `.objectui-sha` pin `53ded82bf7` the renderer emits the widest
2616-
* tier's class only, so at intermediate widths the field renders identically
2617-
* to omitting the key (objectstack#17328). objectui#9253 (objectui
2616+
* tier's class only, so at intermediate widths the field takes a single
2617+
* cell, not the row (objectstack#17328: one cell of two at 720px). objectui#9253 (objectui
26182618
* `bd09957380`, 2026-09-12, ahead of that pin) emits one clamped class per
26192619
* multi-column tier, making 'full' the whole row at every multi-column tier
26202620
* — re-read this block at the pin bump that absorbs it.
26212621
*/
2622-
span: z.enum(['auto', 'full']).default('auto').describe("Relative field width. 'auto' (default — omit it): the renderer sizes the field from its widget type × the current column count (wide widgets like textarea/richtext/json/file/subform take the whole row). 'full': resolves to the form grid's full column count. How far down the container-query tiers that span is emitted is the renderer's, not this key's: at the `.objectui-sha` pin `53ded82bf7` only the widest tier's class is emitted (`@2xl:col-span-3` for a 3-column grid), so at intermediate widths the field rendered identically to omitting the key (measured in Chromium at viewport widths 390, 720 and 1700)."),
2622+
span: z.enum(['auto', 'full']).default('auto').describe("Relative field width. 'auto' (default — omit it): the renderer sizes the field from its widget type × the current column count (wide widgets like textarea/richtext/json/file/subform take the whole row). 'full': resolves to the form grid's full column count. How far down the container-query tiers that span is emitted is the renderer's, not this key's: at the `.objectui-sha` pin `53ded82bf7` only the widest tier's class is emitted (`@2xl:col-span-3` for a 3-column grid), so at intermediate widths the field took a single cell, not the row (one of two at the 720px modal width; measured in Chromium at viewport widths 390, 720 and 1700)."),
26232623

26242624
/** Custom widget override — only needed when auto-inference is insufficient */
26252625
widget: z.string().optional().describe('Custom widget/component name (overrides type-based inference)'),

0 commit comments

Comments
 (0)