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-view.mdx 整片示例的 object / viewMode / fields 键面在 ObjectViewSchema 上一个都不成立(#5077 的文档站镜像) #5088

Closed

Description

@yinlianghui

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

读数取自 origin/main @ 03e5f972a160998a694742bd7c72149ae2fa3d8e。

现象

content/docs/plugins/plugin-view.mdx 的 Schema API 一节与其后每一个 object-view 示例(Grid View / Form View / Detail View、CRUD 四段、Field Configuration、Nested Objects、Tabs View、ObjectQL Integration、TypeScript Support)都建立在同一套非声明键上:

页面教的键 ObjectViewSchema(packages/types/src/objectql.ts:1387)里的实情
object: 'users' 无此键;必填的是 objectName(:1392)
viewMode: 'grid' | 'form' | 'detail' 无此键;视图类型是 defaultViewType
fields: ['name', ...] 无此键;列是网格配置,走 table.columns
mode / recordId / fieldConfig / nestedFields / tabs / enableDelete / filters / searchable 均非 ObjectViewSchema 声明成员

type: 'object-view' 本身是对的(packages/plugin-view/src/index.tsx:66 注册),所以渲染器会被解析到 —— 但它拿不到 objectName,读者照抄得到的是一个空视图,而不是一个报错。这比红框更难诊断。

为什么这是一张独立卡

复核方式

git grep -n "interface ObjectViewSchema" -- packages/types/src   # objectql.ts:1387,紧接着 objectName: string(必填)
git grep -nw "viewMode" -- packages/plugin-view/src              # 渲染路径零命中

门禁为什么没抓到

check-doc-component-types 只核 type 值是否被注册,object-view 注册了,故整页绿;该脚本头部明确把「snippet 的其它键是否被渲染器读」列为 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-view.mdx 的示例键面一行未碰,故分离立卡。与 README 侧的 #5077 完成范围不覆盖。未认领。


    Generated by Claude Code

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

    @yinlianghui
    ContributorAuthor

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

    范围与合单声明:

    与在飞席位(plugin-grid.mdx、plugin-grid src、SchemaForm、plugin-dashboard.mdx)文件不相交。


    Generated by Claude Code

  4. added a commit that references this issue on Aug 23, 2026
    99d5659
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