Skip to content

Align ConfigPanel UI with spec: strict field ordering, spec annotations, comprehensive coverage#742

Merged
hotlong merged 5 commits intomainfrom
copilot/align-ui-with-spec-protocol
Feb 23, 2026
Merged

Align ConfigPanel UI with spec: strict field ordering, spec annotations, comprehensive coverage#742
hotlong merged 5 commits intomainfrom
copilot/align-ui-with-spec-protocol

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 23, 2026

Comprehensive spec alignment of the ConfigPanel (ViewConfigPanel) UI against the NamedListView/ListViewSchema spec protocol — covering type alignment, strict field ordering, spec source annotations, and full field coverage validation.

Type alignment

  • NamedListView.rowHeight and ObjectGridSchema.rowHeight extended from 'compact' | 'medium' | 'tall''compact' | 'short' | 'medium' | 'tall' | 'extra_tall' to match ListViewSchema
  • Zod schema rowHeight enum updated to match
  • ROW_HEIGHT_OPTIONS gains short (gap-px) and extra_tall (gap-1.5)
  • clickIntoRecordDetails switch added to userActions section
// Before: 3 values
rowHeight?: 'compact' | 'medium' | 'tall';

// After: aligned with ListViewSchema spec RowHeight enum
rowHeight?: 'compact' | 'short' | 'medium' | 'tall' | 'extra_tall';

Strict spec-order alignment

All fields within each section reordered to match NamedListView property declaration order:

  • PageConfig: showSort moved before showFilters; _export moved before navigation
  • Data: columns → filter → sort (was sort → groupBy → prefix → columns → filter)
  • Appearance: striped/bordered first, then color, wrapHeaders, etc.
  • UserActions: inlineEdit before clickIntoRecordDetails

Spec source annotations

Every field (56 total) annotated with // spec: NamedListView.* or // UI extension comment, documenting the exact spec source for each control.

Protocol suggestions

4 UI-extended fields identified and documented as pending spec addition: description, _source, _groupBy, _typeOptions.

Tests

  • ViewConfigPanel test updated to assert all 5 row-height buttons
  • Section field-key tests upgraded from presence-only to exact ordering validation per spec
  • Comprehensive spec coverage test validates all 44 NamedListView properties are mapped to UI fields
  • All 544 console tests pass, 138 types tests pass

ROADMAP

  • P1.8 updated with detailed spec alignment completion notes
Original prompt

This section details on the original issue you should resolve

<issue_title>设置面板 UI 严格按协议(spec)对齐、梳理和整改</issue_title>
<issue_description>## 背景

当前 Console 设置面板(ConfigPanel)已实现 schema-driven 架构,但 UI 设计未做到严格与协议(spec)定义对齐,存��部分字段、结构或交互与协议描述不一致现象。

任务内容

  • 全面梳理当前设置面板各 Section(如 PageConfig、Data、Appearance、UserActions、Sharing、Accessibility 等)涉及的 UI 字段、控件、分组、布局细节,与 spec 协议(如 objectViewSchema/listViewSchema/DashboardViewSchema/Field options/控件类型等)进行一一对照
  • 列出所有不一致项,包括:字段缺失/多余、控件类型不符、分组结构不符、交互/校验/显示条件未按协议实现等
  • 严格以协议(spec)为唯一"蓝本"调整 UI,并补充/修正 panel schema,优先采用声明式映射而不是特殊逻辑/兼容 hack
  • 明确记录每一处改动的 spec 来源,如字段描述/属性、枚举、校验、分组规则、可选/必选项等
  • 用 issues/pr checklist 跟踪全部修正点,确保 UI 能一键映射 spec
  • 若 spec 未覆盖的实际需求,应输出"协议建议"并补充到产品/规范升级流程
  • 要求所有控件命名、顺序、分组、交互、校验、提示信息与协议完全一致,UI 不得自行"优化"字段或布局

验收标准

  • 设置面板 UI 与 spec 协议字段/层级/校验/分组完全一致
  • 所有 UI 显示字段都有明确 spec 对应/注释
  • 不再存在"协议外"自定义控件或字段,所有特殊兼容、历史遗留 hack 已清理
  • UI 设计遇到协议缺口需同步补齐协议或提交升级建议

附加说明

  • 强制 test 覆盖全部字段协议映射和校验逻辑
  • 完成后同步更新 Roadmap 与相关文档

@hotlong 按上述要求推进,输出严格对齐 spec 的 schema-driven 设置面板实现和修正清单。</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 23, 2026

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

Project Deployment Actions Updated (UTC)
objectui Ready Ready Preview, Comment Feb 23, 2026 5:47am
objectui-demo Error Error Feb 23, 2026 5:47am
objectui-storybook Error Error Feb 23, 2026 5:47am

Request Review

…toRecordDetails toggle

- NamedListView/ObjectGridSchema rowHeight: add 'short' and 'extra_tall' to align with ListViewSchema spec
- Zod schema: update rowHeight enum to include all 5 spec values
- ROW_HEIGHT_OPTIONS: add 'short' (gap-px) and 'extra_tall' (gap-1.5) entries
- Add clickIntoRecordDetails toggle to userActions section (NamedListView spec field)
- Update ViewConfigPanel test for 5 row height buttons
- Add 5 spec-alignment tests (ROW_HEIGHT_OPTIONS coverage, NamedListView field coverage)
- Update ROADMAP.md

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Align ConfigPanel UI with specification Align ConfigPanel UI with spec: rowHeight 5 values, add clickIntoRecordDetails toggle Feb 23, 2026
Copilot AI requested a review from hotlong February 23, 2026 05:05
@hotlong hotlong marked this pull request as ready for review February 23, 2026 05:12
Copilot AI review requested due to automatic review settings February 23, 2026 05:12
@hotlong
Copy link
Copy Markdown
Contributor

hotlong commented Feb 23, 2026

@copilot 请仔细审查,严格完成每一项要求

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns Console ViewConfigPanel with the @objectstack/spec RowHeight enum (5 values) and exposes an explicit clickIntoRecordDetails toggle so navigation behavior is configurable via the panel schema.

Changes:

  • Extend rowHeight enums in Types + Zod validation from 3 → 5 values (compact, short, medium, tall, extra_tall).
  • Update Console config schema/utilities to expose the full row-height set and add clickIntoRecordDetails switch in UserActions.
  • Expand Console test coverage to assert the new toggle and row-height option completeness; update roadmap notes.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/types/src/zod/objectql.zod.ts Expands ListViewSchema.rowHeight Zod enum to 5 values.
packages/types/src/objectql.ts Expands TS rowHeight unions for ObjectGridSchema and NamedListView and updates docs.
apps/console/src/utils/view-config-utils.ts Adds short + extra_tall to ROW_HEIGHT_OPTIONS with gap classes.
apps/console/src/utils/view-config-schema.tsx Adds clickIntoRecordDetails switch to the UserActions section.
apps/console/src/tests/view-config-schema.test.tsx Adds spec-alignment tests for row-height options and click-into-details field presence.
apps/console/src/tests/ViewConfigPanel.test.tsx Updates row-height button assertions to include all 5 values.
ROADMAP.md Documents completion notes for the spec alignment items.

Comment on lines +419 to +424
* Row height preset for the grid.
* Controls the density of grid rows.
* Aligned with @objectstack/spec RowHeight enum.
* @default 'medium'
*/
rowHeight?: 'compact' | 'medium' | 'tall';
rowHeight?: 'compact' | 'short' | 'medium' | 'tall' | 'extra_tall';
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ObjectGridSchema.rowHeight is expanded to include 'short' and 'extra_tall', but the ObjectGrid implementation still hardcodes a 3-value rowHeight mode ('compact' | 'medium' | 'tall') and cycles/styles based on only those values (see packages/plugin-grid/src/ObjectGrid.tsx:129, 1031-1036, 804-808). With the new type, passing 'short'/'extra_tall' will either fail type-checking in strict builds or fall back to the 'medium' styling at runtime. Update the grid row-height logic/types to support all 5 enum values (or explicitly narrow ObjectGridSchema.rowHeight back to 3 values if the grid intentionally only supports those).

Copilot uses AI. Check for mistakes.
resizable: z.boolean().optional().describe('Allow column resizing'),
densityMode: z.enum(['compact', 'comfortable', 'spacious']).optional().describe('Density mode'),
rowHeight: z.enum(['compact', 'medium', 'tall']).optional().describe('Row height'),
rowHeight: z.enum(['compact', 'short', 'medium', 'tall', 'extra_tall']).optional().describe('Row height'),
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ListViewSchema.rowHeight enum is updated here, but ObjectGridSchema's Zod schema currently doesn't define rowHeight at all (packages/types/src/zod/objectql.zod.ts:110-140). Since ObjectGridSchema.rowHeight is now part of the TS interface, consider adding the same z.enum to ObjectGridSchema Zod too; otherwise runtime validation/safeParse will strip or reject the field, leaving types and runtime validation out of sync.

Copilot uses AI. Check for mistakes.
Copilot AI and others added 3 commits February 23, 2026 05:21
Reorder the fields array in buildDataSection to follow the logical
grouping from the NamedListView specification:
1. _source (read-only display)
2. _columns (fields/columns selector)
3. _filterBy (filter conditions)
4. _sortBy (sort configuration)
5. prefixField
6. _groupBy (UI extension)
7. _pageSize / _pageSizeOptions (pagination)
8. searchableFields / filterableFields / hiddenFields
9. _quickFilters
10. virtualScroll
11. _typeOptions (type-specific sub-configs)

Updated comments to reference the corresponding NamedListView spec
properties. No functional changes — only reorder and comment updates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tView spec

Reorder fields in buildAppearanceSection and buildUserActionsSection to
match the NamedListView spec property declaration order. Add spec source
annotation comments to each field.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- PageConfig: reorder showSort before showFilters, _export before navigation (per NamedListView spec)
- Data: reorder columns → filter → sort per spec; prefixField after sort
- Appearance: reorder striped/bordered first, then color, wrapHeaders, etc. per spec
- UserActions: swap inlineEdit before clickIntoRecordDetails per spec
- Add spec source annotations (// spec: NamedListView.*) to every field
- Document UI extension fields as protocol suggestions (description, _source, _groupBy, _typeOptions)
- Tests: validate exact field ordering per spec (not just presence) — 64 schema tests, 544 console tests
- Update ROADMAP.md with comprehensive spec alignment details

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 23, 2026

@copilot 请仔细审查,严格完成每一项要求

Completed comprehensive spec alignment in commit 0ef36bd:

Strict field ordering — All 6 sections reordered to match NamedListView property declaration order:

  • PageConfig: showSort before showFilters; _export before navigation
  • Data: columns → filter → sort (was sort → groupBy → prefix → columns → filter)
  • Appearance: striped/bordered first, then color, wrapHeaders, etc.
  • UserActions: inlineEdit before clickIntoRecordDetails

Spec source annotations — Every field (56 total) annotated with // spec: NamedListView.* or // UI extension comment.

Protocol suggestions — 4 UI-extended fields documented: description, _source, _groupBy, _typeOptions.

Comprehensive spec coverage test — All 44 NamedListView properties validated mapped to UI fields; exact ordering validated per spec within each section.

Type alignment — rowHeight 5-value enum, clickIntoRecordDetails toggle, Zod schema aligned.

Total: 64 schema tests, 544 console tests pass.

Copilot AI changed the title Align ConfigPanel UI with spec: rowHeight 5 values, add clickIntoRecordDetails toggle Align ConfigPanel UI with spec: strict field ordering, spec annotations, comprehensive coverage Feb 23, 2026
@hotlong hotlong merged commit c980b3e into main Feb 23, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

设置面板 UI 严格按协议(spec)对齐、梳理和整改

3 participants