Repository navigation
Commit 21d34d5
docs(guide),console: write the react-tier ListView binding as data + type, not the retired objectName / viewType (#10600)
Fixes #8510
Clause-②: no
The react-tier ListView block's `objectName` / `viewType` aliases are
retired from the published contract (objectstack#14791, ruling B, no
deprecation window). This PR rewrites every in-repo author site of those
spellings to the contract's only spelling, `data={{ provider: 'object',
object: '…' }}` for the binding and `type` for the visualization, on the
ListView block only.
## Premise check (the director seat's first act on claim)
The retirement ships in what this repo installs. After `pnpm install` in
this worktree, `@objectstack/spec` and `@objectstack/lint` both resolve
to `17.4.0` (the lockfile's only resolution for each). Both packages'
`17.4.0` CHANGELOG sections name `react-prop-retired`. The installed
lint exports `REACT_PROP_RETIRED = "react-prop-retired"` and fires it
from `validateReactPageProps`. The installed `REACT_BLOCKS` ListView
entry declares neither alias: its `dataProps` and `interactions` carry
`data` and `type`, and the only `objectName` / `viewType` text left in
the entry is the summary sentence saying they are retired.
## Sites rewritten
`content/docs/guide/react-pages.md`, five sites (the card named four;
the fifth is a census hit):
1. `kind:'react'` section, the worked JSON page's `source` string:
ListView `objectName=\"showcase_project\"` becomes `data={{ provider:
'object', object: 'showcase_project' }}`.
2. **Census hit, not in the card:** the "Written out, that `source` is:"
JSX block right below it. It is the same source on several lines and
wrote `objectName="showcase_project"` on its own line, so leaving it
would contradict the rewritten JSON. It post-dates the card's census.
3. "Two tiers" prose: a kanban / calendar / gantt / timeline / map of an
object is now `ListView type="kanban" …` (was `viewType="kanban"`). The
sentence's meaning is unchanged.
4. The `RecordRelatedList` replacement row keeps the related-list shape:
`ListView data={{ provider: 'object', object: 'child_object' }}
filters={['lookup_field', '=', parentId]}`.
5. "Blocks take flat props" sample: `ListView data={{ provider:
'object', object: 'showcase_project' }} fields={['name', 'status']}
pagination={{ pageSize: 25 }}`.
`apps/console/src/sdui-workbench-preview.tsx`: the `crm_workbench` react
page source's ListView, `objectName="showcase_project"` becomes `data={{
provider: 'object', object: 'showcase_project' }}`.
Out of scope and untouched, per the card: ObjectForm's own `objectName`,
the `record:*` blocks' prose, `Block type="object-tree" objectName=…`,
the metadata-tier `objectName` the host stamps, and the component-schema
type `ListViewSchema['viewType']` in `packages/plugin-list/README.md`.
Census method: a `git grep` for the ListView JSX opening tag over `HEAD`
in `content/docs/**` and `apps/**`, every hit read by hand. Live
control: all five of the card's sites hit. Only the six sites above
write a retired prop on a react-tier ListView.
## Proof
**The installed validator, before and after.** A one-time probe runs
`validateReactPageProps` from the installed `@objectstack/lint@17.4.0`
over the preview's page source (cooked), the doc's JSON page, its
written-out copy, and the three inline doc snippets. The snippet's `…`
elision is filled with a data binding, so the only variable is the
retired prop.
- base `f5178a272`: 6 findings, all `react-prop-retired` (`objectName`
x5, `viewType` x1).
- head `1bc5466b5`: 0 findings of any rule.
**The preview still renders `showcase_project`.** A new pin,
`apps/console/src/__tests__/sdui-workbench-preview-listview-binding-8510.test.tsx`,
pulls the `crm_workbench` source out through the shared preview
extractor (`helpers/preview-page-sources.ts`). It mounts that source
through the real `kind:'react'` tier and the real `list-view`.
- ListView hands its view `schema.objectName === 'showcase_project'`. It
calls `getObjectSchema('showcase_project')`, and it queries
`showcase_project` selecting the preview's columns. That query is
distinct from the page's own `{ $top: 200 }` stats query.
- Control: the same source with the `data` binding stripped. Once
ListView reports `data-state="idle"`, neither `getObjectSchema` nor any
non-stats `find` has happened.
- `validateReactPageProps` finds no `react-prop-retired` on any preview
page. Control: with the retired spelling put back, it yields exactly
`[react-prop-retired]`.
**Ablation (one-time, not kept).** Predicted before running: disabling
the `data.provider === 'object'` leg in `normalizeListViewSchema` turns
only the positive render case red. Observed: `Tests 1 failed | 4 passed
(5)`. The failing case is "renders the ListView bound to
showcase_project through the data-source fold", because the view is
never handed a bound object. The strip control and both lint cases stay
green.
- The mutation landed by anchor: anchor count 1, marker count 1, 2 diff
lines.
- It was restored with `git checkout HEAD --`, and the restore is proven
by a blob hash equal to HEAD's.
- `@object-ui/core` and `@object-ui/plugin-list` resolve to `src` in the
console project, so no rebuild was involved.
## Gates (local, at `1bc5466b5`)
- `pnpm exec vitest run apps/console/`: Test Files 117 passed (117),
Tests 1277 passed (1277). 117 is the count of tracked console test
files, the pin included.
- `pnpm --filter @object-ui/console type-check`: exit 0, after `turbo
run build --filter='@object-ui/console^...'`. Its first run flagged the
new test file (an unused import, since removed), so it covers that file.
- eslint over the two touched `.tsx` files: 0 errors. The pin has 0
warnings. The preview's 7 `no-explicit-any` warnings are on untouched
lines (7 at base too).
- `pnpm check:control-bytes` OK. `pnpm check:new-line-citations`: 0 new.
`node scripts/check-changeset-presence.mjs` OK (empty-frontmatter
declaration). `pnpm check:changeset-claims`: exit 0. It lists 5 pending
changesets that name a touched file; each was read and none is
falsified.
- Docs gates, all exit 0: `check:doc-types`, `check:doc-snippets`
(674/674 judged, 0 failed, after its own `--build-filter` build),
`check:doc-examples`, `check:doc-fences`, `check:doc-example-ids`,
`check:doc-example-readers`, `docs:check-links`, `check:spec-symbols`,
`check:docs-route-closure`.
- NOT MEASURED: a grep of a built console `dist` for the preview.
Reason: no built console exists here, and a full console build is out of
proportion for this check. The reading is static instead: the console's
Vite `rollupOptions` declares no `input` (single entry `index.html`),
and the preview module's only importer is
`apps/console/sdui-workbench-preview.html`.
## Changeset
`.changeset/8510-react-listview-spelling.md`, with an empty frontmatter
(releases nothing). The gate counts `apps/console/src/**`, but the
preview is a dev-server-only harness, and the rest of the change is a
test and docs.
## Acceptance notes
- The card's second half is untouched because it is "Not decided here".
`packages/plugin-list/src/index.tsx` still declares `objectName`
(required) and `viewType` as `inputs` of `list-view` and of its `list`
alias, plus `defaultProps` `objectName: ''` / `viewType: 'grid'`. This
is reported to the dispatch seat.
- Three test fixtures in `packages/components` still mount a react page
whose ListView writes `objectName="showcase_project"`:
`react-page-adapter.test.tsx`, and `react-page-scope.test.tsx` twice.
They exercise scope and adapter plumbing, which renders either spelling.
They sit outside the census the card set (`content/docs/**`, `apps/**`).
Noted, not filed.
- The claim's file surface named the four doc sites "only". The fifth
(the written-out copy) was added under the dispatch's census
instruction, because leaving it would contradict the rewritten JSON just
above it.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 58b7b3d commit 21d34d5
4 files changed
Lines changed: 211 additions & 6 deletions
File tree
- .changeset
- apps/console/src
- __tests__
- content/docs/guide
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 196 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 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
0 commit comments