-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
问题描述
按照 Airtable 风格对 ListView 进行优化,修复两个 UI 问题:
1. 顶部次要工具栏按钮默认不应显示
现状: Hide fields、Color、Comfortable(密度)按钮默认始终显示在工具栏中,占用空间。
期望: 参考 Airtable,这些次要控件默认隐藏,仅在 schema 中显式启用时才显示。
根因: ListView.tsx 中 toolbarFlags 的默认值使用 !== false(opt-out),应改为 === true(opt-in):
// 当前(默认显示)
showHideFields: schema.showHideFields !== false,
showColor: schema.showColor !== false,
showDensity: ... schema.showDensity !== false,
// 期望(默认隐藏)
showHideFields: schema.showHideFields === true,
showColor: schema.showColor === true,
showDensity: ... schema.showDensity === true,涉及文件: packages/plugin-list/src/ListView.tsx (lines 278-280)
2. 底部记录数文字重复
现状: 页面底部出现两行 "10 条记录" 文字。
期望: 只显示一次记录数。
根因: 两个组件各自独立渲染了记录数:
ListView.tsx的record-count-bar(line 1526)- Console
ObjectView.tsx的record-count-footer(line 593)
涉及文件:
packages/plugin-list/src/ListView.tsxapps/console/src/components/ObjectView.tsx
截图
验收标准
-
showHideFields、showColor、showDensity默认值改为false(opt-in) - 底部记录数只显示一次(移除 ObjectView 中的重复 footer,或在 ListView 已显示时不重复)
- 运行 test 确保相关测试通过(更新默认行为变更的测试用例)
- 更新 ROADMAP.md 记录此优化
- 现有 schema 中显式设置
showHideFields: true等的场景不受影响
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels