Skip to content

feat(components,app-shell): Studio 表格字段管理 — 选中字段改属性 + 完整类型(Airtable 式) - #2090

Merged
os-zhuang merged 1 commit into
mainfrom
feat/studio-field-management
Jun 29, 2026
Merged

feat(components,app-shell): Studio 表格字段管理 — 选中字段改属性 + 完整类型(Airtable 式)#2090
os-zhuang merged 1 commit into
mainfrom
feat/studio-field-management

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

按用户方向(listview 集成暂缓,先把基于表格的字段管理做完善;并先对照了 Airtable 的加字段/字段属性 UX)。

之前的问题

加字段只有 6 个硬编码类型,且无法选中字段后设置属性

现在(复用现成 ObjectFieldInspector,零新编辑器)

Data 支柱里:

  • 「+ 添加字段」(头部按钮 / 网格末尾「+」)→ 新建字段并打开右侧字段属性编辑器
  • 每个列头 hover 出「编辑字段」笔形(给 GridFieldAuthoring context 加 onEditColumn,跳过非字段列如 Actions)→ 打开同一个编辑器。
  • 编辑器 = ObjectFieldInspector:完整 38 类型(按 文本/数值/日期/逻辑/选择/关系/媒体/计算/高级 9 类分组) + 每类专属配置(文本 min/max、数值精度、货币、单选选项、lookup 目标、公式…)+ 必填/唯一/默认值/描述 + 高级(只读/隐藏/索引)+ 删除。
  • 编辑累积进对象 draft;保存草稿 + 发布 写 env overlay,再 adapter.clearCache() + 网格重挂 → 新/改的列免刷新即现。

验证(浏览器实测,showcase_account,OS_METADATA_WRITABLE=object)

点列头笔形 → 编辑器开(name 字段:类型"文本·单行文本"、min/max 长度);类型下拉列出全部分组类型。加字段 → 改显示名"客户分级" → 保存草稿 → 发布:

字段
code16(包源不动)
overlay/effective19,含 {name:field_19, type:text, label:客户分级}(overlayScope:env)

新列免刷新即现网格。eslint . 0 error / tsc 0 error。

设计取舍 / 后续

  • 字段属性用右侧面板(非 Airtable 的列头锚定 popover)——更贴 Studio 既有设计语言、实现更稳;类型选择是分组下拉(非 Airtable 的可搜索图标网格)——类型已全,可搜索图标版作为后续 polish。
  • Airtable 的 AI「field agents」按用户要求不做
  • feat: add live playground for interactive schema demonstration #8 的 gate:对象 schema 默认锁,需 OS_METADATA_WRITABLE=object(Studio/设计环境开)。
  • 仅 objectui main,未 live。

🤖 Generated with Claude Code

…dit field properties + full type list
Replaces the limited add-field modal (6 hardcoded types) with full table-based
field management, reusing the existing ObjectFieldInspector. In the Data pillar:
- "+ 添加字段" creates a field and opens the field-property editor.
- Each column header gets a hover "edit field" affordance (extends the
GridFieldAuthoring context with onEditColumn, guarded to skip non-field
columns) that opens the same editor.
- The editor (ObjectFieldInspector) exposes the full 38-type list grouped by
category + per-type config (text min/max, number precision, currency, select
options, lookup target, formula, ...), required/unique, default, description,
advanced (readonly/hidden/indexed), and delete.
- Edits accumulate in the object draft; 保存草稿 + 发布 persist the env overlay,
then adapter.clearCache() + grid remount surface the new/edited column live.
Verified live (showcase_account, OS_METADATA_WRITABLE=object): add a field,
rename to "客户分级", publish -> overlay {name:field_19,type:text,label:客户分级},
effective fields 16->19, the column appears in the grid without a reload. The
type selector lists all categories (text/number/date/logic/selection/relation/
media/calculated/advanced).
Per the Airtable study, AI "field agents" are intentionally out of scope.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercelBot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
objectuiIgnoredIgnoredJun 29, 2026 9:35am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

❌ Console Performance Budget

MetricValueBudget
Main entry (gzip)** KB**KB
Entry file``
StatusFAIL

📦 Bundle Size Report

PackageSizeGzipped

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@os-zhuang
os-zhuang merged commit 3622f6a into mainJun 29, 2026
6 of 10 checks passed
@os-zhuang
os-zhuang deleted the feat/studio-field-management branch June 29, 2026 09:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@os-zhuang