feat(ui): Interface Foundation — Phase A (v3.2)#696
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…and per-element data binding Phase A: Interface Foundation (v3.2) — Airtable Interface Parity - Add InterfaceSchema as self-contained, shareable, multi-page application surface - Add RecordReviewConfigSchema for sequential record review/approval pages - Add content elements (element:text, element:number, element:image, element:divider) to PageComponentType - Add ElementDataSourceSchema for per-element data binding on PageComponentSchema - Add ElementTextPropsSchema, ElementNumberPropsSchema, ElementImagePropsSchema to component.zod.ts - Update ComponentPropsMap with new element types - Export new interface module from src/ui/index.ts - Add comprehensive tests (57 tests across all new schemas) Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
|
@copilot 评估这个设计方案和现有ui元数据是否有功能重叠,并提出改进方案。 |
…dingSchema - Add shared SortItemSchema to enums.zod.ts (reuses SortDirectionEnum) - ElementDataSourceSchema now uses shared SortItemSchema instead of inline sort - RecordReviewConfigSchema now uses shared SortItemSchema instead of inline sort - InterfaceBrandingSchema now extends AppBrandingSchema (adds coverImage only) - Add SortItemSchema tests to enums.test.ts Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
完成了完整的功能重叠评估并已实施改进(a0a3d1a)。 重叠分析存在重叠但设计上合理的领域:
已修复的实际重叠:
架构清晰度: Security: CodeQL 无告警。 |
|
@copilot 评估 InterfacePageSchema 是否应该合并到 PageSchema |
There was a problem hiding this comment.
Pull request overview
This PR implements Phase A of the Airtable Interface parity roadmap, introducing a self-contained, shareable, multi-page application surface distinct from the existing AppSchema navigation container. The Interface concept enables role-specific surfaces that stitch together views, elements, and actions into cohesive experiences.
Changes:
- Introduces
InterfaceSchemawith 12 page types (dashboard, grid, list, gallery, kanban, calendar, timeline, form, record_detail, record_review, overview, blank) - Adds
RecordReviewConfigSchemafor sequential record review/approval workflows with configurable actions and navigation modes - Extracts shared
SortItemSchematoshared/enums.zod.tsfor reuse across UI schemas - Implements per-element data binding via
ElementDataSourceSchemaenabling multi-object pages where each element can query different data sources - Adds four content element types (
element:text,element:number,element:image,element:divider) with corresponding prop schemas
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/spec/src/ui/interface.zod.ts | New file defining InterfaceSchema, InterfacePageSchema, RecordReviewConfigSchema, and InterfaceBrandingSchema with comprehensive documentation and examples |
| packages/spec/src/ui/interface.test.ts | Comprehensive test suite with 57 tests covering all schemas, validation rules, edge cases, and end-to-end scenarios |
| packages/spec/src/ui/page.zod.ts | Adds ElementDataSourceSchema for per-element data binding and extends PageComponentType enum with four content element types |
| packages/spec/src/ui/component.zod.ts | Adds ElementTextPropsSchema, ElementNumberPropsSchema, and ElementImagePropsSchema with corresponding ComponentPropsMap entries |
| packages/spec/src/ui/index.ts | Exports the new interface.zod.ts module |
| packages/spec/src/shared/enums.zod.ts | Extracts reusable SortItemSchema pattern (field + order) from inline definitions |
| packages/spec/src/shared/enums.test.ts | Adds comprehensive tests for SortItemSchema validation |
| export function defineInterface(config: z.input<typeof InterfaceSchema>): Interface { | ||
| return InterfaceSchema.parse(config); | ||
| } |
There was a problem hiding this comment.
The defineInterface factory function follows the same pattern as defineView, defineApp, defineFlow, and defineAgent, which are all exported from the root index.ts for developer convenience. However, defineInterface is not exported there. For consistency with the established pattern, consider adding:
export { defineInterface } from './ui/interface.zod';to packages/spec/src/index.ts around line 80, near the other DX Helper Functions.
There was a problem hiding this comment.
Added in 0e35543 — defineInterface is now exported from root index.ts alongside defineView, defineApp, defineFlow, and defineAgent.
…e type system - Expand PageSchema.type to include all 16 types (4 platform + 12 interface) - Move RecordReviewConfigSchema from interface.zod.ts to page.zod.ts - Add icon and recordReview properties to PageSchema - Export new PageTypeSchema for the unified enum - InterfaceSchema.pages now uses PageSchema directly - Remove InterfacePageSchema, InterfacePageTypeSchema (merged into PageSchema) - Update all tests for the merged structure - All 199 test files (5468 tests) pass Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…chema.name Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
已完成合并(11b0157, 420c896)。 合并前的对比:
9 个属性中 7 个完全一致,应该合并。 合并结果:
199 文件,5468 测试全部通过。 |
|
更新文档和roadmap |
|
…fineInterface - Export defineInterface from root index.ts (reviewer suggestion) - Mark ROADMAP Phase A items as complete - Update ROADMAP metrics (199 test files, 5468 tests, 177 schema files) - Update Phase 1 deliverables with Interface/content elements - Add defineInterface() to DX helper list - Update design doc status from "Proposal" to "Phase A Implemented" - Mark design doc Phase A checklist items complete - Add decisions #6-8 to design doc decision log (PageSchema merge, SortItemSchema, branding extend) Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
已完成(0e35543)。 ROADMAP.md 更新:
设计文档更新:
额外:
|
…date design doc decisions Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…ument-revisions
Implements Phase A of the Airtable Interface parity roadmap, introducing a self-contained, shareable, multi-page application surface distinct from the existing
AppSchemanavigation container. The Interface concept enables role-specific surfaces that stitch together views, elements, and actions into cohesive experiences.New:
InterfaceSchema(src/ui/interface.zod.ts)InterfaceSchema— top-level entity with pages, branding, role assignments, default landing pageInterfaceBrandingSchema— extendsAppBrandingSchemawithcoverImagedefineInterface()factory — exported from rootindex.tsalongsidedefineView,defineApp,defineFlow,defineAgentUnified Page System (
page.zod.ts)PageTypeSchema— unified 16-type enum: 4 platform (record,home,app,utility) + 12 interface (dashboard,grid,list,gallery,kanban,calendar,timeline,form,record_detail,record_review,overview,blank)RecordReviewConfigSchema— sequential record review/approval with actions (approve/reject/skip/custom), navigation modes, field updates, progress indicatoriconproperty added toPageSchemafor interface navigationInterfaceSchema.pagesreferencesPageSchemadirectly (no separateInterfacePageSchema)Content Elements (
page.zod.ts,component.zod.ts)element:text,element:number,element:image,element:dividertoPageComponentTypeElementTextPropsSchema— markdown content, variant, alignmentElementNumberPropsSchema— object/field aggregation (count/sum/avg/min/max), format, prefix/suffixElementImagePropsSchema— src, alt, object-fit, heightComponentPropsMapPer-element Data Binding (
page.zod.ts)ElementDataSourceSchema— object, view, filter, sort, limitdataSourceoptional property onPageComponentSchema— overrides page-level object context for multi-object dashboardsShared Primitives (
shared/enums.zod.ts)SortItemSchema({ field, order }) reusingSortDirectionEnum— replaces inline sort definitions across UI schemasDocumentation & Roadmap
defineInterface()airtable-interface-gap-analysis.md) status updated to "Phase A Implemented"61 new tests. All 199 test files (5468 tests) pass.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.