|
| 1 | +--- |
| 2 | +"@objectstack/spec": patch |
| 3 | +"@objectstack/platform-objects": patch |
| 4 | +--- |
| 5 | + |
| 6 | +fix(spec): the dashboard `gap` field no longer describes itself to app authors in Tailwind vocabulary |
| 7 | + |
| 8 | +`ui/dashboard`'s `gap` key told app authors its value in the vocabulary of a CSS |
| 9 | +library they never chose and cannot act on. **Two** independent producer strings |
| 10 | +carried that wording, and they feed two independent customer-facing surfaces: |
| 11 | + |
| 12 | +- `dashboardForm`'s `helpText` — `Grid gap (Tailwind units)` — rendered verbatim in |
| 13 | + the Studio property panel, which is spec-driven and feeds this form straight into |
| 14 | + the generic form renderer. |
| 15 | +- `DashboardSchema.gap`'s `.describe()` — `Grid gap in Tailwind spacing units` — |
| 16 | + rendered as this field's row in the published reference page |
| 17 | + `content/docs/references/ui/dashboard.mdx`. The reference corpus renders |
| 18 | + `.describe()`, never `helpText`. |
| 19 | + |
| 20 | +Both now read **Space between widgets, in steps of 0.25rem (4 = 1rem)**: what the |
| 21 | +author decides, plus the magnitude, stated in a CSS unit instead of a framework's |
| 22 | +scale. The magnitude had to survive the rewrite rather than be dropped with the |
| 23 | +framework name — the number is a spacing step, so `4` means `1rem` and not `4px`, |
| 24 | +and an author who lost that would come away knowing less than before. |
| 25 | + |
| 26 | +The step size is stated as measured rather than inferred: the dashboard renderer |
| 27 | +sets the grid gap as an inline style computed from this key, so every accepted |
| 28 | +value is linear and one step is exactly `0.25rem`. "Tailwind units" was doubly |
| 29 | +wrong — it named an implementation dependency, and it named one the consumer of |
| 30 | +this key does not have. |
| 31 | + |
| 32 | +**No schema change.** `gap` stays `z.number().int().min(0).optional()` and accepts |
| 33 | +exactly what it accepted before; nothing is added to or removed from any public |
| 34 | +surface. `columns` is deliberately untouched on both of its producer lines — |
| 35 | +`12` is an author-visible fact about the grid being laid out, not a framework |
| 36 | +detail — and this is one field's two strings, not a sweep for framework words. |
| 37 | + |
| 38 | +The `en` metadata-forms translation bundle is a mechanical copy of the form source, |
| 39 | +so it is regenerated to match. Translated locales are not touched: regeneration |
| 40 | +fills gaps only and never overwrites an existing leaf. |
0 commit comments