Skip to content

fix: sync ViewConfigPanel changes to all list view types in real-time#712

Merged
hotlong merged 3 commits intomainfrom
copilot/fix-view-config-sync-issues
Feb 22, 2026
Merged

fix: sync ViewConfigPanel changes to all list view types in real-time#712
hotlong merged 3 commits intomainfrom
copilot/fix-view-config-sync-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 22, 2026

ViewConfigPanel edits (fields, filters, sort, appearance) only reflected after clicking Save. The useMemo dependency chains from console ObjectView → plugin ObjectView → grid/list renderers had gaps that prevented live preview.

Schema type

  • Add showSort?: boolean to ObjectViewSchema interface and Zod schema

Console ObjectView

  • Add showSort to objectViewSchema useMemo value and dependency array
  • Propagate rowHeight, densityMode, inlineEdit, appearance from view draft through renderListViewfullSchema
// Before: objectViewSchema deps missed showSort
}), [objectDef.name, onEdit, activeView?.showSearch, activeView?.showFilters]);

// After
}), [objectDef.name, onEdit, activeView?.showSearch, activeView?.showFilters, activeView?.showSort]);

Plugin ObjectView

  • Respect showSort === false in sortSchema generation
  • Include striped/bordered from activeView in gridSchema
  • Pass rowHeight, densityMode, groupBy in renderContentrenderListView schema

Tests

  • 4 new console-level live preview tests (toggle showSearch/showSort, column sync, label sync via breadcrumb)
  • 6 new plugin-level tests (rerender on columns/sort/filter/appearance prop changes, renderListView schema propagation, showSort suppression)
Original prompt

This section details on the original issue you should resolve

<issue_title>【Bug】右侧视图配置面板变更未实时同步到全部列表类型(Grid/Kanban/Calendar/Timeline/Gallery/Map)</issue_title>
<issue_description>## 问题描述

在 ObjectUI 的 ObjectView 页面,右侧 ViewConfigPanel 配置面板修改字段、过滤、排序、外观等,主区域(如 grid/kanban/calendar 等)通常未及时反映变更,仅在点击"保存"后才统一刷新。

此行为影响所有列表视图类型,包含但不限于:

  • Grid 表格视图
  • Kanban 看板视图
  • Calendar 日历视图
  • Timeline 甘特/时间线视图
  • Gallery 画廊视图
  • Map 地图视图

复现步骤

  1. 打开任一列表视图
  2. 编辑右侧配置面板任一属性(字段、过滤、排序、外观等)
  3. 发现主内容区未实时反映 Panel 改动,仅保存后才生效
视图配置面板截图

期望结果

  • 无论是否"保存",panel 内任何变更均应直接同步到主内容,实现所见即所得
  • 所��支持的列表类型均具备 live preview

技术分析&排查建议

  • ViewConfigPanel 实现 onViewUpdate 实时向上抛变动,但 ObjectView(console层)仅合并 viewDraft;objectViewSchema/useMemo 依赖列不全,未能触发 PluginObjectView 实时反映所有变更
  • plugin-view 的 PluginObjectView 内部 useMemo 依赖和 grid/kanban/calendar/timeline/gallery/map 等列表类型对应 schema 构建链路需进一步补齐依赖,保证视图配置实时同步

修复建议

  1. ObjectView console 侧:扩大 objectViewSchema/useMemo 依赖到所有 viewConfig 字段
  2. 保证 mergedViews 产生变化即时驱动 PluginObjectView 的 live re-render
  3. plugin-view 层 grid/kanban 等 schema/useMemo 需完整依赖 viewConfig
  4. (如性能瓶颈)可增差异化刷新,或仅部分配置触发强刷新

子任务

  • 全面梳理所有列表类型受影响的属性与依赖链
  • 修复依赖、增补 useMemo/useEffect 来满足 live preview
  • 回归现有相关 test,补充自动化测试
  • 更新 Roadmap 规划此优化

修复后请运行全部 test,并同步修订 Roadmap。</issue_description>

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


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 22, 2026

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

Project Deployment Actions Updated (UTC)
objectui Ready Ready Preview, Comment Feb 22, 2026 2:38am
objectui-demo Ready Ready Preview, Comment Feb 22, 2026 2:38am
objectui-storybook Ready Ready Preview, Comment Feb 22, 2026 2:38am

Request Review

…e preview)

- Add showSort to objectViewSchema and its dependencies in Console ObjectView
- Pass appearance/viewConfig properties (rowHeight, densityMode, color, etc.) through renderListView to fullSchema
- Include striped/bordered from activeView in Plugin ObjectView gridSchema
- Pass rowHeight, densityMode, groupBy in Plugin renderContent for renderListView path
- Add showSort property to ObjectViewSchema interface and Zod schema
- Respect showSort=false in Plugin sortSchema generation
- Add 10 live preview sync tests across console and plugin-view

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…ce spread

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix view config panel not syncing changes in all list types fix: sync ViewConfigPanel changes to all list view types in real-time Feb 22, 2026
Copilot AI requested a review from hotlong February 22, 2026 02:35
@hotlong hotlong marked this pull request as ready for review February 22, 2026 02:37
Copilot AI review requested due to automatic review settings February 22, 2026 02:37
@hotlong hotlong merged commit 8f0979b into main Feb 22, 2026
6 checks passed
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

This pull request fixes a critical UX issue where ViewConfigPanel edits (fields, filters, sort, appearance) were not reflected in real-time across all list view types (Grid/Kanban/Calendar/Timeline/Gallery/Map). Changes only appeared after clicking Save. The fix completes the live preview data flow by adding missing useMemo dependencies and propagating view configuration properties through the rendering chain.

Changes:

  • Added showSort property to ObjectViewSchema interface and Zod schema to control sort UI visibility
  • Extended useMemo dependency arrays in both console and plugin ObjectView components to track all view configuration properties
  • Propagated appearance properties (rowHeight, densityMode, striped, bordered, etc.) through renderListView and gridSchema for live preview
  • Added 10 new tests (4 console-level, 6 plugin-level) to verify live preview functionality across all scenarios

Reviewed changes

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

Show a summary per file
File Description
packages/types/src/objectql.ts Added showSort?: boolean property to ObjectViewSchema interface with JSDoc
packages/types/src/zod/objectql.zod.ts Added showSort validation to ObjectViewSchema Zod schema
packages/plugin-view/src/ObjectView.tsx Added showSort check in sortSchema, included striped/bordered in gridSchema, propagated rowHeight/densityMode/groupBy in renderListView, updated useMemo dependencies
apps/console/src/components/ObjectView.tsx Added showSort to objectViewSchema with dependency, propagated appearance properties through fullSchema in renderListView
packages/plugin-view/src/tests/ObjectView.test.tsx Added 6 live preview tests for prop updates (columns, sort, filters, appearance, renderListView, showSort)
apps/console/src/tests/ObjectView.test.tsx Added 4 live preview tests for ViewConfigPanel sync (showSearch, showSort, columns, label)
ROADMAP.md Updated test count to 5,110+ and documented the live preview feature completion

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.

【Bug】右侧视图配置面板变更未实时同步到全部列表类型(Grid/Kanban/Calendar/Timeline/Gallery/Map)

3 participants