diff --git a/ROADMAP.md b/ROADMAP.md index 717093684..7d6107442 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -203,6 +203,11 @@ ObjectUI is a universal Server-Driven UI (SDUI) engine built on React + Tailwind | `showSearch` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | `showSort` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | `showFilters` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| `showHideFields` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| `showGroup` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| `showColor` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| `showDensity` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| `allowExport` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | `rowHeight` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | `densityMode` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | `striped` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | @@ -218,7 +223,10 @@ ObjectUI is a universal Server-Driven UI (SDUI) engine built on React + Tailwind 3. ~~**`NamedListView` type:** Missing toolbar/display properties~~ → Added as first-class properties 4. ~~**Plugin `renderListView` schema missing toolbar flags:** `renderContent` → `renderListView` schema did not include `showSearch`/`showFilters`/`showSort`~~ → Now propagated (PR #771) 5. ~~**ListView toolbar unconditionally rendered:** Search/Filter/Sort buttons always visible regardless of schema flags~~ → Now conditionally rendered based on `schema.showSearch`/`showFilters`/`showSort` (PR #771) -6. **No per-view-type integration tests:** Pending — tests verify config reaches `fullSchema`, but per-renderer integration tests still needed +6. ~~**Hide Fields/Group/Color/Density buttons always visible:** No schema property to control visibility~~ → Added `showHideFields`/`showGroup`/`showColor`/`showDensity` with conditional rendering (Issue #719) +7. ~~**Export toggle broken:** ViewConfigPanel writes `allowExport: boolean` but ListView checks `exportOptions` object~~ → Export now checks both `exportOptions && allowExport !== false`; Console clears `exportOptions` when `allowExport === false` (Issue #719) +8. ~~**`hasExport` logic bug:** `draft.allowExport !== false` was always true when undefined~~ → Fixed to `draft.allowExport === true || draft.exportOptions != null` (Issue #719) +9. **No per-view-type integration tests:** Pending — tests verify config reaches `fullSchema`, but per-renderer integration tests still needed **Phase 1 — Grid/Table View (baseline, already complete):** - [x] `gridSchema` includes `striped`/`bordered` from `activeView` @@ -226,6 +234,15 @@ ObjectUI is a universal Server-Driven UI (SDUI) engine built on React + Tailwind - [x] `useMemo` dependency arrays cover all grid config - [x] ListView toolbar buttons conditionally rendered based on `schema.showSearch`/`showFilters`/`showSort` (PR #771) - [x] `renderListView` schema includes toolbar toggle flags (`showSearch`/`showFilters`/`showSort`) and display props (`striped`/`bordered`/`color`) (PR #771) +- [x] Hide Fields/Group/Color/Density toolbar buttons conditionally rendered via `showHideFields`/`showGroup`/`showColor`/`showDensity` (Issue #719) +- [x] Export button checks both `exportOptions` and `allowExport` (Issue #719) +- [x] `hasExport` logic fixed — no longer always true when `allowExport` is undefined (Issue #719) +- [x] ViewConfigPanel includes toggles for `showHideFields`/`showGroup`/`showColor`/`showDensity` (Issue #719) +- [x] `showHideFields`/`showGroup`/`showColor`/`showDensity`/`allowExport` propagated through Console `fullSchema` and PluginObjectView `renderListView` (Issue #719) +- [x] Full end-to-end data flow: all ViewConfigPanel props (`inlineEdit`/`wrapHeaders`/`clickIntoRecordDetails`/`addRecordViaForm`/`addDeleteRecordsInline`/`collapseAllByDefault`/`fieldTextColor`/`prefixField`/`showDescription`) propagated through Console `fullSchema` → PluginObjectView `renderListView` → ListView (Issue #719) +- [x] ListView forwards `striped`/`bordered`/`wrapHeaders` to child `viewComponentSchema` (grid gets `wrapHeaders`, all views get `striped`/`bordered`) (Issue #719) +- [x] ViewConfigPanel includes `striped`/`bordered` toggles in Appearance section (Issue #719) +- [x] Type definitions complete: `NamedListView` + `ListViewSchema` + Zod schema include all 22 view-config properties (Issue #719) **Phase 2 — Kanban Live Preview:** - [x] Propagate `showSort`/`showSearch`/`showFilters` through `generateViewSchema` kanban branch @@ -253,6 +270,8 @@ ObjectUI is a universal Server-Driven UI (SDUI) engine built on React + Tailwind **Phase 6 — Data Flow & Dependency Refactor:** - [x] Add `showSearch`/`showSort`/`showFilters`/`striped`/`bordered`/`color` to `NamedListView` type in `@object-ui/types` +- [x] Add `showHideFields`/`showGroup`/`showColor`/`showDensity`/`allowExport` to `NamedListView` and `ListViewSchema` types and Zod schema (Issue #719) +- [x] Add `inlineEdit`/`wrapHeaders`/`clickIntoRecordDetails`/`addRecordViaForm`/`addDeleteRecordsInline`/`collapseAllByDefault`/`fieldTextColor`/`prefixField`/`showDescription` to `NamedListView` and `ListViewSchema` types and Zod schema (Issue #719) - [x] Update Console `renderListView` to pass all config properties in `fullSchema` - [ ] Audit all `useMemo`/`useEffect` dependency arrays in `plugin-view/ObjectView.tsx` for missing `activeView` sub-properties - [x] Remove hardcoded `showSearch: false` from `generateViewSchema` — use `activeView.showSearch ?? schema.showSearch` instead diff --git a/apps/console/src/__tests__/ViewConfigPanel.test.tsx b/apps/console/src/__tests__/ViewConfigPanel.test.tsx index 17e546575..5ecbe1268 100644 --- a/apps/console/src/__tests__/ViewConfigPanel.test.tsx +++ b/apps/console/src/__tests__/ViewConfigPanel.test.tsx @@ -439,7 +439,7 @@ describe('ViewConfigPanel', () => { const exportSwitch = screen.getByTestId('toggle-allowExport'); fireEvent.click(exportSwitch); - expect(onViewUpdate).toHaveBeenCalledWith('allowExport', false); + expect(onViewUpdate).toHaveBeenCalledWith('allowExport', true); }); it('toggles addRecordViaForm via Switch', () => { @@ -1566,8 +1566,81 @@ describe('ViewConfigPanel', () => { fireEvent.click(screen.getByTestId('toggle-addRecordViaForm')); expect(onViewUpdate).toHaveBeenCalledWith('addRecordViaForm', true); - // Toggle allowExport off + // Toggle allowExport on (starts unchecked by default) fireEvent.click(screen.getByTestId('toggle-allowExport')); - expect(onViewUpdate).toHaveBeenCalledWith('allowExport', false); + expect(onViewUpdate).toHaveBeenCalledWith('allowExport', true); + }); + + it('new toolbar toggles (showHideFields, showGroup, showColor, showDensity) call onViewUpdate correctly', () => { + const onViewUpdate = vi.fn(); + render( + + ); + + // Toggle showHideFields off + fireEvent.click(screen.getByTestId('toggle-showHideFields')); + expect(onViewUpdate).toHaveBeenCalledWith('showHideFields', false); + + // Toggle showGroup off + fireEvent.click(screen.getByTestId('toggle-showGroup')); + expect(onViewUpdate).toHaveBeenCalledWith('showGroup', false); + + // Toggle showColor off + fireEvent.click(screen.getByTestId('toggle-showColor')); + expect(onViewUpdate).toHaveBeenCalledWith('showColor', false); + + // Toggle showDensity off + fireEvent.click(screen.getByTestId('toggle-showDensity')); + expect(onViewUpdate).toHaveBeenCalledWith('showDensity', false); + }); + + it('hasExport should be false when allowExport is undefined and no exportOptions', () => { + const onViewUpdate = vi.fn(); + render( + + ); + + // allowExport toggle should be unchecked (false) when allowExport is undefined + const exportSwitch = screen.getByTestId('toggle-allowExport'); + expect(exportSwitch).toHaveAttribute('aria-checked', 'false'); + }); + + it('striped and bordered toggles call onViewUpdate correctly', () => { + const onViewUpdate = vi.fn(); + render( + + ); + + // Expand appearance section if collapsed + const appearanceSection = screen.getByTestId('section-appearance'); + if (appearanceSection.getAttribute('aria-expanded') === 'false') { + fireEvent.click(appearanceSection); + } + + // Toggle striped on + fireEvent.click(screen.getByTestId('toggle-striped')); + expect(onViewUpdate).toHaveBeenCalledWith('striped', true); + + // Toggle bordered on + fireEvent.click(screen.getByTestId('toggle-bordered')); + expect(onViewUpdate).toHaveBeenCalledWith('bordered', true); }); }); diff --git a/apps/console/src/components/ObjectView.tsx b/apps/console/src/components/ObjectView.tsx index f3c7e71aa..3fb9a749f 100644 --- a/apps/console/src/components/ObjectView.tsx +++ b/apps/console/src/components/ObjectView.tsx @@ -307,9 +307,24 @@ export function ObjectView({ dataSource, objects, onEdit, onRowClick }: any) { showSearch: viewDef.showSearch ?? listSchema.showSearch, showSort: viewDef.showSort ?? listSchema.showSort, showFilters: viewDef.showFilters ?? listSchema.showFilters, + showHideFields: viewDef.showHideFields ?? listSchema.showHideFields, + showGroup: viewDef.showGroup ?? listSchema.showGroup, + showColor: viewDef.showColor ?? listSchema.showColor, + showDensity: viewDef.showDensity ?? listSchema.showDensity, + allowExport: viewDef.allowExport ?? listSchema.allowExport, + exportOptions: viewDef.allowExport === false ? undefined : (viewDef.exportOptions ?? listSchema.exportOptions), striped: viewDef.striped ?? listSchema.striped, bordered: viewDef.bordered ?? listSchema.bordered, color: viewDef.color ?? listSchema.color, + // Propagate view-config properties (Bug 4 / items 14-22) + wrapHeaders: viewDef.wrapHeaders ?? listSchema.wrapHeaders, + clickIntoRecordDetails: viewDef.clickIntoRecordDetails ?? listSchema.clickIntoRecordDetails, + addRecordViaForm: viewDef.addRecordViaForm ?? listSchema.addRecordViaForm, + addDeleteRecordsInline: viewDef.addDeleteRecordsInline ?? listSchema.addDeleteRecordsInline, + collapseAllByDefault: viewDef.collapseAllByDefault ?? listSchema.collapseAllByDefault, + fieldTextColor: viewDef.fieldTextColor ?? listSchema.fieldTextColor, + prefixField: viewDef.prefixField ?? listSchema.prefixField, + showDescription: viewDef.showDescription ?? listSchema.showDescription, // Propagate filter/sort as default filters/sort for data flow ...(viewDef.filter?.length ? { filters: viewDef.filter } : {}), ...(viewDef.sort?.length ? { sort: viewDef.sort } : {}), diff --git a/apps/console/src/components/ViewConfigPanel.tsx b/apps/console/src/components/ViewConfigPanel.tsx index ae85007be..12576aa20 100644 --- a/apps/console/src/components/ViewConfigPanel.tsx +++ b/apps/console/src/components/ViewConfigPanel.tsx @@ -320,7 +320,11 @@ export function ViewConfigPanel({ open, onClose, mode = 'edit', activeView, obje const hasSearch = draft.showSearch !== false; const hasFilter = draft.showFilters !== false; const hasSort = draft.showSort !== false; - const hasExport = draft.exportOptions !== undefined || draft.allowExport !== false; + const hasHideFields = draft.showHideFields !== false; + const hasGroup = draft.showGroup !== false; + const hasColor = draft.showColor !== false; + const hasDensity = draft.showDensity !== false; + const hasExport = draft.exportOptions != null || draft.allowExport === true; const hasAddForm = draft.addRecordViaForm === true; const hasShowDescription = draft.showDescription !== false; @@ -507,6 +511,38 @@ export function ViewConfigPanel({ open, onClose, mode = 'edit', activeView, obje className="scale-75" /> + + updateDraft('showHideFields', checked)} + className="scale-75" + /> + + + updateDraft('showGroup', checked)} + className="scale-75" + /> + + + updateDraft('showColor', checked)} + className="scale-75" + /> + + + updateDraft('showDensity', checked)} + className="scale-75" + /> + + + updateDraft('striped', checked)} + className="scale-75" + /> + + + updateDraft('bordered', checked)} + className="scale-75" + /> + )} diff --git a/packages/i18n/src/locales/ar.ts b/packages/i18n/src/locales/ar.ts index 8964e0848..038c9eb7b 100644 --- a/packages/i18n/src/locales/ar.ts +++ b/packages/i18n/src/locales/ar.ts @@ -202,6 +202,10 @@ const ar = { enableSearch: 'تفعيل البحث', enableFilter: 'تفعيل التصفية', enableSort: 'تفعيل الترتيب', + enableHideFields: 'تفعيل إخفاء الحقول', + enableGroup: 'تفعيل التجميع', + enableColor: 'تفعيل اللون', + enableDensity: 'تفعيل الكثافة', userActions: 'إجراءات المستخدم', addRecordViaForm: 'إضافة سجلات عبر النموذج', advanced: 'متقدم', @@ -238,6 +242,8 @@ const ar = { wrapHeaders: 'التفاف العناوين', showFieldDescriptions: 'إظهار أوصاف الحقول', collapseAllByDefault: 'طي الكل افتراضياً', + striped: 'صفوف مخططة', + bordered: 'خلايا محاطة بحدود', editRecordsInline: 'تحرير السجلات مباشرة', addDeleteRecordsInline: 'إضافة/حذف السجلات مباشرة', clickIntoRecordDetails: 'انقر لعرض تفاصيل السجل', diff --git a/packages/i18n/src/locales/de.ts b/packages/i18n/src/locales/de.ts index e4c921a40..24d0335f9 100644 --- a/packages/i18n/src/locales/de.ts +++ b/packages/i18n/src/locales/de.ts @@ -206,6 +206,10 @@ const de = { enableSearch: 'Suche aktivieren', enableFilter: 'Filter aktivieren', enableSort: 'Sortierung aktivieren', + enableHideFields: 'Felder ausblenden aktivieren', + enableGroup: 'Gruppierung aktivieren', + enableColor: 'Farbe aktivieren', + enableDensity: 'Dichte aktivieren', userActions: 'Benutzeraktionen', addRecordViaForm: 'Datensätze über Formular hinzufügen', advanced: 'Erweitert', @@ -242,6 +246,8 @@ const de = { wrapHeaders: 'Kopfzeilen umbrechen', showFieldDescriptions: 'Feldbeschreibungen anzeigen', collapseAllByDefault: 'Standardmäßig alle einklappen', + striped: 'Gestreifte Zeilen', + bordered: 'Umrandete Zellen', editRecordsInline: 'Datensätze inline bearbeiten', addDeleteRecordsInline: 'Datensätze inline hinzufügen/löschen', clickIntoRecordDetails: 'Klicken für Datensatzdetails', diff --git a/packages/i18n/src/locales/en.ts b/packages/i18n/src/locales/en.ts index bd1d66ac4..7dcd91c0a 100644 --- a/packages/i18n/src/locales/en.ts +++ b/packages/i18n/src/locales/en.ts @@ -206,6 +206,10 @@ const en = { enableSearch: 'Enable search', enableFilter: 'Enable filter', enableSort: 'Enable sort', + enableHideFields: 'Enable hide fields', + enableGroup: 'Enable group', + enableColor: 'Enable color', + enableDensity: 'Enable density', userActions: 'User actions', addRecordViaForm: 'Add records through a form', advanced: 'Advanced', @@ -242,6 +246,8 @@ const en = { wrapHeaders: 'Wrap headers', showFieldDescriptions: 'Show field descriptions', collapseAllByDefault: 'Collapse all by default', + striped: 'Striped rows', + bordered: 'Bordered cells', editRecordsInline: 'Edit records inline', addDeleteRecordsInline: 'Add/delete records inline', clickIntoRecordDetails: 'Click into record details', diff --git a/packages/i18n/src/locales/es.ts b/packages/i18n/src/locales/es.ts index 88ae264e9..8940616d7 100644 --- a/packages/i18n/src/locales/es.ts +++ b/packages/i18n/src/locales/es.ts @@ -201,6 +201,10 @@ const es = { enableSearch: 'Habilitar búsqueda', enableFilter: 'Habilitar filtro', enableSort: 'Habilitar ordenamiento', + enableHideFields: 'Habilitar ocultar campos', + enableGroup: 'Habilitar agrupación', + enableColor: 'Habilitar color', + enableDensity: 'Habilitar densidad', userActions: 'Acciones de usuario', addRecordViaForm: 'Agregar registros mediante formulario', advanced: 'Avanzado', @@ -237,6 +241,8 @@ const es = { wrapHeaders: 'Ajustar encabezados', showFieldDescriptions: 'Mostrar descripciones de campos', collapseAllByDefault: 'Contraer todo por defecto', + striped: 'Filas alternadas', + bordered: 'Celdas con borde', editRecordsInline: 'Editar registros en línea', addDeleteRecordsInline: 'Agregar/eliminar registros en línea', clickIntoRecordDetails: 'Clic para detalles del registro', diff --git a/packages/i18n/src/locales/fr.ts b/packages/i18n/src/locales/fr.ts index 59fca2675..84b3e85d4 100644 --- a/packages/i18n/src/locales/fr.ts +++ b/packages/i18n/src/locales/fr.ts @@ -206,6 +206,10 @@ const fr = { enableSearch: 'Activer la recherche', enableFilter: 'Activer le filtre', enableSort: 'Activer le tri', + enableHideFields: 'Activer masquer les champs', + enableGroup: 'Activer le regroupement', + enableColor: 'Activer la couleur', + enableDensity: 'Activer la densité', userActions: 'Actions utilisateur', addRecordViaForm: 'Ajouter des enregistrements via un formulaire', advanced: 'Avancé', @@ -242,6 +246,8 @@ const fr = { wrapHeaders: 'Retour à la ligne des en-têtes', showFieldDescriptions: 'Afficher les descriptions des champs', collapseAllByDefault: 'Tout réduire par défaut', + striped: 'Lignes rayées', + bordered: 'Cellules bordées', editRecordsInline: 'Modifier les enregistrements en ligne', addDeleteRecordsInline: 'Ajouter/supprimer des enregistrements en ligne', clickIntoRecordDetails: "Cliquer pour les détails de l'enregistrement", diff --git a/packages/i18n/src/locales/ja.ts b/packages/i18n/src/locales/ja.ts index ded1f10b2..3ec2e56f8 100644 --- a/packages/i18n/src/locales/ja.ts +++ b/packages/i18n/src/locales/ja.ts @@ -201,6 +201,10 @@ const ja = { enableSearch: '検索を有効化', enableFilter: 'フィルターを有効化', enableSort: '並べ替えを有効化', + enableHideFields: 'フィールド非表示を有効化', + enableGroup: 'グループを有効化', + enableColor: 'カラーを有効化', + enableDensity: '密度を有効化', userActions: 'ユーザーアクション', addRecordViaForm: 'フォームからレコードを追加', advanced: '詳細設定', @@ -237,6 +241,8 @@ const ja = { wrapHeaders: 'ヘッダーの折り返し', showFieldDescriptions: 'フィールド説明を表示', collapseAllByDefault: 'デフォルトですべて折りたたむ', + striped: 'ストライプ行', + bordered: 'ボーダーセル', editRecordsInline: 'インラインでレコードを編集', addDeleteRecordsInline: 'インラインでレコードを追加/削除', clickIntoRecordDetails: 'レコード詳細をクリックで表示', diff --git a/packages/i18n/src/locales/ko.ts b/packages/i18n/src/locales/ko.ts index 9df24fc5f..12dc56566 100644 --- a/packages/i18n/src/locales/ko.ts +++ b/packages/i18n/src/locales/ko.ts @@ -201,6 +201,10 @@ const ko = { enableSearch: '검색 활성화', enableFilter: '필터 활성화', enableSort: '정렬 활성화', + enableHideFields: '필드 숨기기 활성화', + enableGroup: '그룹 활성화', + enableColor: '색상 활성화', + enableDensity: '밀도 활성화', userActions: '사용자 작업', addRecordViaForm: '양식으로 레코드 추가', advanced: '고급', @@ -237,6 +241,8 @@ const ko = { wrapHeaders: '헤더 줄바꿈', showFieldDescriptions: '필드 설명 표시', collapseAllByDefault: '기본적으로 모두 접기', + striped: '줄무늬 행', + bordered: '테두리 셀', editRecordsInline: '인라인으로 레코드 편집', addDeleteRecordsInline: '인라인으로 레코드 추가/삭제', clickIntoRecordDetails: '레코드 상세 보기 클릭', diff --git a/packages/i18n/src/locales/pt.ts b/packages/i18n/src/locales/pt.ts index addd6b200..e82914ff6 100644 --- a/packages/i18n/src/locales/pt.ts +++ b/packages/i18n/src/locales/pt.ts @@ -201,6 +201,10 @@ const pt = { enableSearch: 'Habilitar pesquisa', enableFilter: 'Habilitar filtro', enableSort: 'Habilitar ordenação', + enableHideFields: 'Ativar ocultar campos', + enableGroup: 'Ativar agrupamento', + enableColor: 'Ativar cor', + enableDensity: 'Ativar densidade', userActions: 'Ações do usuário', addRecordViaForm: 'Adicionar registros via formulário', advanced: 'Avançado', @@ -237,6 +241,8 @@ const pt = { wrapHeaders: 'Quebrar cabeçalhos', showFieldDescriptions: 'Mostrar descrições dos campos', collapseAllByDefault: 'Recolher tudo por padrão', + striped: 'Linhas listradas', + bordered: 'Células com borda', editRecordsInline: 'Editar registros em linha', addDeleteRecordsInline: 'Adicionar/excluir registros em linha', clickIntoRecordDetails: 'Clique para detalhes do registro', diff --git a/packages/i18n/src/locales/ru.ts b/packages/i18n/src/locales/ru.ts index e98e16e09..cba7091dd 100644 --- a/packages/i18n/src/locales/ru.ts +++ b/packages/i18n/src/locales/ru.ts @@ -201,6 +201,10 @@ const ru = { enableSearch: 'Включить поиск', enableFilter: 'Включить фильтр', enableSort: 'Включить сортировку', + enableHideFields: 'Включить скрытие полей', + enableGroup: 'Включить группировку', + enableColor: 'Включить цвет', + enableDensity: 'Включить плотность', userActions: 'Действия пользователя', addRecordViaForm: 'Добавить записи через форму', advanced: 'Расширенные', @@ -237,6 +241,8 @@ const ru = { wrapHeaders: 'Перенос заголовков', showFieldDescriptions: 'Показать описания полей', collapseAllByDefault: 'Свернуть всё по умолчанию', + striped: 'Полосатые строки', + bordered: 'Ячейки с границами', editRecordsInline: 'Редактировать записи встроенно', addDeleteRecordsInline: 'Добавлять/удалять записи встроенно', clickIntoRecordDetails: 'Нажмите для просмотра деталей записи', diff --git a/packages/i18n/src/locales/zh.ts b/packages/i18n/src/locales/zh.ts index 10c6f1d66..001136e0f 100644 --- a/packages/i18n/src/locales/zh.ts +++ b/packages/i18n/src/locales/zh.ts @@ -206,6 +206,10 @@ const zh = { enableSearch: '启用搜索', enableFilter: '启用筛选', enableSort: '启用排序', + enableHideFields: '启用隐藏字段', + enableGroup: '启用分组', + enableColor: '启用颜色', + enableDensity: '启用密度', userActions: '用户操作', addRecordViaForm: '通过表单添加记录', advanced: '高级', @@ -242,6 +246,8 @@ const zh = { wrapHeaders: '自动换行标题', showFieldDescriptions: '显示字段描述', collapseAllByDefault: '默认全部折叠', + striped: '斑马纹行', + bordered: '边框单元格', editRecordsInline: '内联编辑记录', addDeleteRecordsInline: '内联添加/删除记录', clickIntoRecordDetails: '点击进入记录详情', diff --git a/packages/plugin-list/src/ListView.tsx b/packages/plugin-list/src/ListView.tsx index 568134515..11af3e9b5 100644 --- a/packages/plugin-list/src/ListView.tsx +++ b/packages/plugin-list/src/ListView.tsx @@ -610,6 +610,9 @@ export const ListView: React.FC = ({ showSearch: false, // Pass navigation click handler to child views onRowClick: navigation.handleClick, + // Forward display properties to child views + ...(schema.striped != null ? { striped: schema.striped } : {}), + ...(schema.bordered != null ? { bordered: schema.bordered } : {}), }; switch (currentView) { @@ -620,6 +623,7 @@ export const ListView: React.FC = ({ columns: effectiveFields, ...(schema.conditionalFormatting ? { conditionalFormatting: schema.conditionalFormatting } : {}), ...(schema.inlineEdit != null ? { editable: schema.inlineEdit } : {}), + ...(schema.wrapHeaders != null ? { wrapHeaders: schema.wrapHeaders } : {}), ...(schema.options?.grid || {}), }; case 'kanban': @@ -814,6 +818,7 @@ export const ListView: React.FC = ({
{/* Hide Fields */} + {schema.showHideFields !== false && (
+ )} {/* Filter */} {schema.showFilters !== false && ( @@ -910,6 +916,7 @@ export const ListView: React.FC = ({ )} {/* Group */} + {schema.showGroup !== false && ( + )} {/* Sort */} {schema.showSort !== false && ( @@ -960,6 +968,7 @@ export const ListView: React.FC = ({ )} {/* Color */} + {schema.showColor !== false && ( + )} {/* Row Height / Density Mode */} + {schema.showDensity !== false && ( + )} {/* Export */} - {schema.exportOptions && ( + {schema.exportOptions && schema.allowExport !== false && (