Commit 50dc214
docs(spec): globalFilters[].field describes where the name resolves — the dataset object, not its dimensions (#16968)
* docs(spec): say where a dashboard global filter's field resolves
`globalFilters[].field` described itself only as "Field name to filter on",
which left the generated reference page silent on the one thing authors get
wrong: the name resolves against the object behind each bound widget's
dataset (`dataset.object`), not against that dataset's declared `dimensions`.
The rewritten `.describe()` states the resolution target, scopes the claim to
the authoring layer, and names the rule that already enforces it
(`dashboard-filter-field-unknown`, severity error). The mirrored TSDoc carries
the second half the one-line form cannot: the separation is a statement about
the authorable surface only, NOT a claim that an object field can never serve
as a dimension — the analytics query API does accept one ad hoc without the
dataset declaring it.
Wording aligned with the hand-written page's `## Global Filters` section.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016N6xmWt5hYm94ffVEwGH8x
* docs(spec): regenerate the dashboard reference page, add the changeset
`content/docs/references/ui/dashboard.mdx` is a build product of the spec's
docs build — its line 6 says so — so the new `globalFilters[].field`
description reaches it by regeneration, never by hand. Two rows carry the
sentence because two sections render the same `GlobalFilterSchema`:
`### Nested Shape: Dashboard.globalFilters[number]` and the top-level
`## GlobalFilter` → `### Properties`. No other reference page moved: the
identically-spelled `field` describe on the list-view schema is a different
surface and was deliberately left alone.
Changeset is `patch` on `@objectstack/spec`: the string is a published datum,
not a comment — it is the `description` of the property in the shipped JSON
Schema and the runtime `.description` on the Zod schema in `dist`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016N6xmWt5hYm94ffVEwGH8x
* docs(spec): disarm the `object` adjacency in the `field` docblock
Two adjacent docblocks in `GlobalFilterSchema` each say "the object the field
lives on" about a different resolution: `field` resolves a COLUMN against the
bound widget's `dataset.object`, while the sibling `object` key resolves a
translation-bundle KEY. They do not collide, but a reader who meets both may
infer that setting `object` re-points the filter — the same reader-facing
shape this docblock was just rewritten to fix.
One clause in the `field` TSDoc closes it at the point of confusion. The
`object` docblock is untouched, and the `.describe()` string is byte-unchanged,
so the generated reference page and the changeset need no edit.
The citation is anchored by SYMBOL, not by line: the exported rule-id constant
`DASHBOARD_FILTER_FIELD_UNKNOWN`, the enclosing `validateWidgetBindings`, and a
verbatim snippet measured to grep to exactly one hit in that file. A `path:NNN`
prose anchor would have started rotting on the next edit to the file it names.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016N6xmWt5hYm94ffVEwGH8x
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 8c1515e commit 50dc214
3 files changed
Lines changed: 40 additions & 4 deletions
File tree
- .changeset
- content/docs/references/ui
- packages/spec/src/ui
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
800 | 800 | | |
801 | 801 | | |
802 | 802 | | |
803 | | - | |
804 | | - | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
805 | 826 | | |
806 | 827 | | |
807 | 828 | | |
| |||
0 commit comments