Repository navigation
feat(app-shell): the page designer can set a list block's object, view and row cap - #26793
Conversation
…w and row cap A list-view block had no BLOCK_CONFIG entry, so its inspector showed no typed fields and its row cap (dataSource.limit) could be set only in JSON. Add Object, View and Row limit controls that write the node-level dataSource binding, with en and zh labels. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTqu1ZbUqjnAJufZ8m
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTqu1ZbUqjnAJufZ8m
|
Test UI (14/16) is red on
Generated by Claude Code |
|
Heads-up from seat The Generated by Claude Code |
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTqu1ZbUqjnAJufZ8m
…n namespace Main moved the engine.inspector.pageBlock rows into @object-ui/i18n's lazy studio namespace. Move the three list-view rows there, and load the zh catalogue before the inspector test reads a zh label. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTqu1ZbUqjnAJufZ8m
|
Thanks for the heads-up: done in Generated by Claude Code |
席位核对ACCEPT · seat
Landing: no contract review is owed (no published schema, no governed text, |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 40555304948 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Steedos · project thread
Fixes #26703
Clause-②: no
Metadata-protocol: none
维护者速读
list-view)区块时,右侧属性面板新增三个输入框:对象、视图、条数上限。三者都写到区块的dataSource绑定上(dataSource.object/.view/.limit),中英文标签齐全。dataSource.limit行(没填时 5 行),但设计器以前没有任何地方能改这个数,只能手改页面 JSON。ui/packages/app-shell/src/views/metadata-admin/previews/block-config.ts新增的'list-view'一条;inspectors/PageBlockInspector.listViewRowCap-26703.test.tsx;previews/__tests__/block-config.test.ts新增的PANEL_WITHOUT_PALETTE豁免表。cd ui && pnpm exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/PageBlockInspector.listViewRowCap-26703.test.tsx,预期 4 个用例全绿;或在 Studio 打开一个带列表区块的页面,选中它,「条数上限」框里填 12,页面 JSON 出现dataSource.limit: 12。What changes
BLOCK_CONFIG(the page designer's per-block inspector table) had nolist-viewentry, so selecting a list block showed no typed fields, and "Advanced" lists only keys a block already has. The row cap that PR #26700 made a list block in a wide page region honour (dataSource.limit, 5 when unset) could therefore be set only in JSON.The new entry has three controls, all
at: 'dataSource', the bindingListViewBlockreads its query from:dataSource.objectobjectName(ListViewBlock.tsx,namesRecordSource)dataSource.viewcompactListDestination,element-data-source.ts)dataSource.limit55is its own count when the box is emptyAll three are members of the spec's
ElementDataSourceSchema, which the schema-parity test (block-config-schema-parity-8216.test.ts) judges binding controls against. No new key anywhere, and nopackages/spec/**, server or plugin-list change.Why
A designer who wants a list block on a page to show 10 rows instead of 5 had no control for it. The cap is a key the block already declares and the renderer already honours, so the gap was only the inspector's.
Tests
PageBlockInspector.listViewRowCap-26703.test.tsxdrives the real inspector on a spec-parsed page: the Row limit box is an editable number input hinting5; editing it writesdataSource.limitbeside the bound object and view, neverproperties.limit; a stored cap, object and view show in their boxes and the View box writesdataSource.view; the zh labels render underzh-CN.block-config-i18n.test.ts: the placeholder inventory moves 17 / 6 / 11 → 18 / 6 / 12, andlist-view.limitjoins the literal-value list with its reason.block-config.test.ts: see the first acceptance note.node scripts/ablation-replace.mjsrenamed the'list-view': [key (anchor 1 → 0, blob115a5ace→20037ca9) and the new test file ran red, Tests 4 failed (4). Restored: blob equals HEAD,git diff HEADempty.Acceptance notes
list-view.block-config.test.tspins "a block with a config panel is a block the palette offers", so the new panel needed a decision. Offering the block in the palette is a product change beyond this card, so the case gainsPANEL_WITHOUT_PALETTE, a one-row exemption with its reason:list-viewis a public block (core/src/registry/public-blocks.ts) that published pages place (packages/objectql/src/__fixtures__/hotcrm-4.0.1-published-pages.artifact.json), so the panel edits a node a page already carries. A second case keeps the row self-deleting: it goes red when the palette offers the block or the panel goes away. Whether the palette should offerlist-viewis left as an open question in the card report.data: { provider: 'object', object }instead of the binding keeps doing so; the Object box shows onlydataSource.object.Verification
All readings at head
069c0195(base74db43ef), underscripts/pm/os-verify-lock.sh.Touched package: @object-ui/app-shell
pnpm exec turbo run build --concurrency=2 --filter='@object-ui/app-shell^...', 63 tasks, VERDICT command-exit 0.pnpm --filter @object-ui/app-shell type-checkat42add541:tsc --noEmitclean, thentsc -p tsconfig.test.jsonone error in the new test (astringlocale); fixed in069c0195, andtsc -p tsconfig.test.json --noEmitre-ran clean, VERDICT command-exit 0.PageBlockInspector,block-config,BLOCK_CONFIGor the metadata-admini18n(225 files): Test Files 225 passed (225), Tests 2306 passed (2306). The rest of app-shell is left to CI's Test UI shards.Derived gates: 34 of 34 run
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 34 commands for the 6 changed paths;--ranreconciled: "34 derived famil(ies) accounted for — 34 run, 0 NOT-MEASURED".check:nul-bytes,check:test-source-alias,check:cross-package-test-inputs,check:type-check-coverage,check:type-check-debt,check-sdui-manifest,check-empty-changeset,check-changeset-no-major.pnpm --dir ui exec vitest run scripts/ran while the gate loop shared the box: Tests 3 failed, 5062 passed, 2 skipped, all threeTest timed out in 15000msin tree-scan cases ofcheck-hand-rolled-comment-mask.test.tsandcheck-vi-mock-inherit.test.ts. Re-run alone on a quiet box: Test Files 2 passed (2), Tests 105 passed (105). Neither scan reads a file this diff touches.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (lint is CI's)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jTqu1ZbUqjnAJufZ8m
Generated by Claude Code