Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

content/docs/plugins/plugin-grid.mdx 整片示例教 type: 'grid' + header / accessorKey 列词汇表 —— 落到 CSS Grid 布局容器,列声明被 strict 的 ListColumn 拒绝(#5065 的文档站镜像) #5087

Closed

Description

@yinlianghui

发现于 #5076 的实施(PR #5085)。Filed unassigned, not claiming。

读数取自 origin/main @ 03e5f972a160998a694742bd7c72149ae2fa3d8e。

现象

content/docs/plugins/plugin-grid.mdx 的 Schema API、Column Definition 与其后全部示例块用的是同一套不成立的键面:

  1. type: 'grid' 不是这个插件的。 packages/plugin-grid/src/index.tsx:193 的注册带 skipFallback: true(:195),刻意不认领 bare grid;bare grid 属于 @object-ui/components 的 CSS Grid 布局容器(packages/components/src/renderers/layout/grid.tsx:50),它的 columns 是列数。于是 { type: 'grid', columns: [...] } 渲染出的是布局容器,不是数据网格。数据网格是 object-grid / view:grid。
  2. 列词汇表 header / accessorKey 不在声明里。 ObjectGridSchema.columns 的类型是 string[] | ListColumn[](packages/types/src/objectql.ts:564),ListColumn 从 @objectstack/spec/ui re-export(:74),其 ListColumnSchema 是 strict Zod object —— 列身份键是 field,表头是 label,accessorKey / header 是被拒绝而不是被忽略。
  3. object-grid 示例用 "object": "users"。 ObjectGridSchema 的必填键是 objectName(packages/types/src/objectql.ts:545),没有 object。

涉及的示例块(该文件内,PR #5085 落地后行号前移):Grid with Custom Cells、Selectable Grid、Grid with Pagination、ObjectQL Integration、Sorting、Filtering、Row Actions、Inline Editing、Batch Editing 与 TypeScript Support —— 除 Column Summaries 一节(它已经用对了 field / summary)外几乎整页。

为什么这是一张独立卡

门禁为什么没抓到

check-doc-component-types 只核 type 值是否被注册,而 bare grid 确实被注册(布局容器注册的),所以整页绿。它明确把「snippet 的其它键是否被该 type 解析到的渲染器读」列为 objectui#4823 的第二维度、不在自己范围内(见该脚本头部注释)。本卡正是那第二维度。

分级

未打 finding 标签:读者照抄拿到的是布局容器 + 被拒绝的列声明,是今天就撞得上的具体缺陷。交 PM 分诊。

Activity

  1. yinlianghui commented on Aug 17, 2026

    @yinlianghui
    ContributorAuthor

    立卡人补记(正文末尾 footer 被 issues 端点剥掉,改用评论补):本卡由 #5076 的 os-dev 席在实施 PR #5085 时扫出。该单派发边界是「只动三处 *Components 注册段」,content/docs/plugins/plugin-grid.mdx 的示例键面一行未碰,故分离立卡。与 README 侧的 #5065、渲染器侧的 #5068 是同族不同层,三者的完成范围互不覆盖。未认领。


    Generated by Claude Code

  2. self-assigned this
    on Aug 17, 2026
  3. yinlianghui commented on Aug 17, 2026

    @yinlianghui
    ContributorAuthor

    认领(PM 派发,objectui 分片):session_01GTRjn8xBqp75dk7kFupVRt,分支 claude/issue-5087-grid-mdx-keys,os-dev 席即将开工。

    范围与合单声明:

    与在飞席位(SchemaForm a11y、plugin-form README、plugin-view README)文件不相交。


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentationpm:queue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions