Repository navigation
feat(app-shell): the page designer's add-block picker offers the list view block - #26915
Merged
Merged
Conversation
… view block The list-view block has had an inspector panel (Object, View, Row limit) but no BLOCK_TYPE_META row, so the add-block picker never offered it. Add the row under the data category with its type label (en + zh, studio namespace), drop the PANEL_WITHOUT_PALETTE exemption the coverage test carried for it, and pin the picker -> canvas -> inspector path in a new test. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jVDGfqqDsAhmZbg6aF
…st-view palette case Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jVDGfqqDsAhmZbg6aF
Contributor
Author
席位核对ACCEPT · seat
Landing: no contract review is owed (no published schema, no governed text, |
This was referenced Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steedos · project thread
Fixes #26794
Clause-②: no
Metadata-protocol: none
维护者速读
list-view),放在「数据」分类下,和表格、表单、指标、看板并列;中英文名称齐全。ui/packages/app-shell/src/views/metadata-admin/previews/block-types.ts新增的'list-view'一行;previews/PageBlockCanvas.addListView-26794.test.tsx;previews/__tests__/block-config.test.ts删掉的PANEL_WITHOUT_PALETTE。cd ui && pnpm exec vitest run packages/app-shell/src/views/metadata-admin/previews/PageBlockCanvas.addListView-26794.test.tsx,预期 3 个用例全绿;或在 Studio 打开一个页面,点「添加区块」,在「数据」下选「列表视图」,右侧出现对象、视图、条数上限三个空框,画布上的列表提示先选对象。What changes
list-view.BLOCK_TYPE_METAgains alist-viewrow: categorydata, theLayoutListicon (the one its registration in plugin-list names), and the type labelengine.pageBlockCanvas.type.listView, "List view" / "列表视图".BlockTypeIdgains the id.TYPES_BY_CATEGORY, which the picker renders, is derived from that table, so nothing else changes in the picker.studionamespace of@object-ui/i18n(en + zh), beside the block's three inspector rows, as the claim's file surface names. Its siblingengine.pageBlockCanvas.type.*rows are still in app-shell's designer table (views/metadata-admin/i18n.ts); the designer'st()asks that table first and the namespace second, so the picker reads either home the same way.previews/__tests__/block-config.test.tslosesPANEL_WITHOUT_PALETTEand its self-deleting case; "a block with a config panel is a block the palette offers" now reads the palette with no exemption.addBlockwrites{ type }and selects it, andListViewBlockwith neitherdatanordataSourcedraws its existing hint ("No object named: set data.object or dataSource.object.") rather than an empty list. So the chosen behaviour is "asks for its object": the block is written bare, and the panel's Object control writesdataSource.object. No canvas default was added.Tests
previews/PageBlockCanvas.addListView-26794.test.tsxdrives the real picker inPageBlockCanvasand the realPageBlockInspector:list-viewrow sits under the Data heading, named in en and zh (zh read from the catalogue and checked to differ from en);[{ type: 'list-view' }]into the region, the draft passesPageSchema.safeParse, and the canvas selectsregions[0].components[0];dataSource.object.Acceptance notes
engine.pageBlockCanvas.*takes them; the open slice S4 (PR feat(ui): five Studio pillars, the data source pages and the field types move into the studio i18n namespace (#25922 slice S4) #26900) does not move that family.Verification
All readings at head
1959511d, on merge base6090bb73(main has since moved to1708115ewithout touching any file of this diff).New test, and the ablation that proves it can fail
cd ui && pnpm exec vitest run packages/app-shell/src/views/metadata-admin/previews/PageBlockCanvas.addListView-26794.test.tsx: Test Files 1 passed, Tests 3 passed.'list-view'row deleted fromBLOCK_TYPE_META(anchor count after mutation 0), then the new file plus__tests__/block-config.test.ts: Tests 4 failed, 44 passed, the three new cases and "a block with a config panel is a block the palette offers". Restored:git diff HEADempty,git hash-objectequals the HEAD blobf6153ab1.Touched suites and type-checks
block-types,PageBlockCanvas,BLOCK_CONFIGorPageBlockInspector, every app-shell or i18n test naming the studio namespace, plus all ofpackages/i18n: Test Files 181 passed, Tests 2387 passed, 13 skipped. The rest of app-shell is left to CI's Test UI shards.pnpm --filter @object-ui/i18n run type-checkandpnpm --filter @object-ui/app-shell run type-check: exit 0 (both cover test files).cd ui && pnpm run check:i18n-designer-parity: exit 0, every en row has a zh row.check:i18n-dead-keys: exit 0, the new key is not reported.check:new-line-citations: 0 new citations.Derived gates
node scripts/pm/dispatch-gates.mjs --commandsderived 34 commands; all 34 ran locally with exit 0 (PR-body gates against this body throughGITHUB_EVENT_PATH), and--ranreconciles 34 derived, 34 run, 0 NOT-MEASURED.check-partof-closing-keywordwithPR_BODY: exit 0. CI's lint and type-check farms are left to CI.Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (n/a: nopackages/specchange)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jVDGfqqDsAhmZbg6aF
Generated by Claude Code