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.

plugin-grid README 教 gridComponents 手动注册与 GridSchema / GridColumn 类型 —— 前两者不存在,GridSchema 这个名字在 types 里是 CSS Grid #5013

Closed

Description

@yinlianghui

发现于 #5002 的实施(plugin-map README 重写)。Filed unassigned, not claiming.

现象

packages/plugin-grid/README.md 三处从本包名导入的标识符,在本包导出面上都不存在:

README 实际
:42 import { gridComponents } from '@object-ui/plugin-grid' + :46 Object.entries(gridComponents).forEach(...) 全包零命中。注册是 import 的副作用;真实导出在 src/index.tsx:20-56(ObjectGrid、VirtualGrid、ImportWizard、InlineEditing、ObjectGridComponentProps、ObjectGridColumnState …)。照抄即 Object.entries(undefined) 抛 TypeError。
:392 import type { GridSchema, GridColumn } from '@object-ui/plugin-grid',:394/:400 用作数据表格的类型 GridColumn 在本包与 @object-ui/types 都不存在。GridSchema 在本包不存在,而 @object-ui/types 里有一个同名 export —— packages/types/src/layout.ts:202 的 GridSchema,那是 CSS Grid 布局组件(type: 'grid',columns / gap),与数据表格无关。所以这一行照抄之后即便改导入路径也仍然错:一个想写数据表格的读者会拿到布局网格的类型。数据表格那一侧的真名是 ObjectGridSchema / ObjectGridComponentProps。

README:60/:74 还在 "Schema API" 里现场声明了一个 interface GridColumn { … } 作为文内说明,与 :392 那行导入是两回事,但正好把这个不存在的名字读起来像个真导出。

同族

#5002 是 mapComponents 在 plugin-map 上的同一段复制品。实施 #5002 时把 19 个 packages/plugin-*/README.md 的自包命名导入与各包真实导出面对了一遍,命中 8 个包:calendar(#5010)、form(#5011)、gantt(#5012)、grid(本单)、view、dashboard、report。按 #5002 认领评论的裁定「兄弟 README 只查不改」,各包各立一单。

本单的同名撞车那一半可能值得单独定级:它不是"名字不存在",而是"名字存在且指向另一个组件族",按错误路径修好导入之后 TS 依然会绿地通过一个错的形状。

复核方式

grep -n "gridComponents\|GridSchema\|GridColumn" packages/plugin-grid/README.md
grep -rn "gridComponents\|\bGridColumn\b" packages/plugin-grid/src   # 零命中
grep -rn "interface GridSchema" packages/types/src                   # layout.ts:202,CSS Grid

分级

交 PM 分诊。包内 README 的 API 断言今天没有门禁看得到。

Activity

  1. added theissue type on Aug 17, 2026
  2. os-zhuang commented on Aug 17, 2026

    @os-zhuang
    Contributor

    Triage: lands in packages/plugin-grid/README.md — pm:queue, type Bug. Family of #5002, split one-card-per-package per #5002's claim ruling. Extra care on this one: GridSchema exists in types but means CSS Grid, so the README's usage is not just a wrong path but a wrong referent — the fix must name the real types (or drop the snippet), not re-export the colliding name. ⛔ No new exports to make the README true. Independent of siblings; S-tier mechanical, suggest sonnet.

    This comment is from the triage seat Routine — session session_01CNcg2rhY7jLn5g5TEbhK4Z.


    Generated by Claude Code

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

    @yinlianghui
    ContributorAuthor

    认领(objectui 分片 PM 直辖,批次 22 补席)—— session session_01GTRjn8xBqp75dk7kFupVRt,分支 claude/issue-5013-plugin-grid-readme。os-dev 席位实施,PM 只读验收。

    按分诊裁定与同族已落地方法学(#5010→PR5046、#5016→PR5053、#5012→PR5059):① 删虚构 gridComponents 手动注册节,改教真实机制(import 副作用 + 真实导出面 + 实际 register 键);② 同名错指涉是本卡要害(分诊席已点名):GridSchema 在 types 里是 CSS Grid 布局,不是数据表格 —— 修好路径也仍是错形状;数据表格真名按声明式 grep 核(ObjectGridSchema / ObjectGridComponentProps 方向),⛔ 不 re-export 撞名、不加新导出;③ :60/:74 文内 interface GridColumn 说明块把假名坐实,一并按真实形状处置;④ AST 版名集合核对(#5043 追评规格)+ 编译探针对 dist 双向 pin(#5012 席实证:只抽 typed example 会漏键名重命名类,pin 块必须有)。


    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

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions