Commit 8976ea1
docs(spec): teach DatasetMeasureSchema.format what a date measure can say (#16515)
`format` was silent about date-valued measures while its JSDoc advertised
`e.g. "$0,0.00", "0.0%"` — exactly the numeral/date pattern grammar a date
measure cannot read. An author with a `min`/`max` over a date field read that
line, wrote `format: 'YYYY-MM-DD'`, parsed clean and got the locale default.
Carried by a `.describe()` where there was none, so the statement reaches the
published JSON Schema and the reference table in
`content/docs/references/ui/dataset.mdx`, whose Description cell for `format`
was rendering the silence as a blank. The docblock above carries the longer
measured record and its objectui read points.
Measured at the objectui pin this repo builds against rather than inherited:
a date-only value reads `format` as a display STYLE (`short`, `relative`),
a datetime value ignores `format` altogether, and no value reads a date
PATTERN. Nothing accepts or rejects differently — `format` stays
`z.string().optional()`.
Generated artifact regenerated with
`pnpm --filter @objectstack/spec gen:schema && pnpm --filter @objectstack/spec gen:docs`.
Claude-Session: https://claude.ai/code/session_01T6HeZvT9wdSJD1ZxJb5Eno
Co-authored-by: Claude <noreply@anthropic.com>1 parent 6538b68 commit 8976ea1
3 files changed
Lines changed: 48 additions & 4 deletions
File tree
- .changeset
- content/docs/references/ui
- packages/spec/src/ui
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
193 | 224 | | |
194 | 225 | | |
195 | 226 | | |
| |||
0 commit comments