Skip to content

Commit 546332b

Browse files
Copilothotlong
andcommitted
fix: comprehensive view config panel cleanup — remove unused fields, correct view-type visibility
Removed fields not consumed by runtime: - prefixField (data section) - collapseAllByDefault (appearance section) - fieldTextColor (appearance section) - clickIntoRecordDetails (userActions section) - densityMode (appearance section, previous commit) Added semantic view-type visibility predicates: - supportsGrouping (grid/kanban/gallery) - supportsColorField (grid/calendar/timeline/gantt) - supportsConditionalFormatting (grid/kanban) - supportsRowActions (grid/kanban) - supportsGenericGroupBy (grid/gallery) Changed grid-only fields from disabledWhen to visibleWhen: - striped, bordered, wrapHeaders, resizable Added visibleWhen to previously universal fields: - showRecordCount, allowPrinting (grid only) - inlineEdit, addDeleteRecordsInline (grid only) - rowActions, bulkActions (grid/kanban) Corrected visibility for toolbar toggles: - showGroup: grid/kanban/gallery (was grid/kanban) - showColor: grid/calendar/timeline/gantt (was grid) - searchableFields/filterableFields/quickFilters/showDescription: universal (was grid) Updated 239 tests (103 schema + 136 panel), 10 integration tests pass. Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 2382521 commit 546332b

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

ROADMAP.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,9 @@ ObjectUI is a universal Server-Driven UI (SDUI) engine built on React + Tailwind
402402

403403
**Phase 2 — Schema Factory (All Sections):**
404404
- [x] Page Config section: label, description, viewType, toolbar toggles (7 switches), navigation mode/width/openNewTab, selection, addRecord sub-editor, export + sub-config, showRecordCount, allowPrinting
405-
- [x] Data section: source, sortBy (expandable), groupBy, prefixField, columns selector (expandable w/ reorder), filterBy (expandable), pagination, searchable/filterable/hidden fields (expandable), quickFilters (expandable), virtualScroll, type-specific options (kanban/calendar/map/gallery/timeline/gantt)
406-
- [x] Appearance section: color, fieldTextColor (grid only), rowHeight (icon group, grid only), wrapHeaders, showDescription (grid only), collapseAllByDefault (groupBy-dependent), striped, bordered, resizable, conditionalFormatting (expandable, grid only), emptyState (title/message/icon)
407-
- [x] User Actions section: inlineEdit, addDeleteRecordsInline, rowActions (expandable), bulkActions (expandable)
405+
- [x] Data section: source, sortBy (expandable), groupBy (grid/gallery), columns selector (expandable w/ reorder), filterBy (expandable), pagination, searchable/filterable/hidden fields (expandable), quickFilters (expandable), virtualScroll (grid only), type-specific options (kanban/calendar/map/gallery/timeline/gantt)
406+
- [x] Appearance section: color (grid/calendar/timeline/gantt), rowHeight (icon group, grid only), wrapHeaders (grid only), showDescription, striped/bordered (grid only), resizable (grid only), conditionalFormatting (expandable, grid/kanban), emptyState (title/message/icon)
407+
- [x] User Actions section: inlineEdit (grid only), addDeleteRecordsInline (grid only), rowActions/bulkActions (expandable, grid/kanban)
408408
- [x] Sharing section: sharingEnabled, sharingVisibility (visibleWhen: sharing.enabled)
409409
- [x] Accessibility section: ariaLabel, ariaDescribedBy, ariaLive
410410
- [x] `ExpandableWidget` component for hook-safe expandable sub-sections within custom render functions
@@ -435,14 +435,20 @@ ObjectUI is a universal Server-Driven UI (SDUI) engine built on React + Tailwind
435435

436436
**Phase 6 — Config Panel Cleanup (Invalid Items Fix):**
437437
- [x] Remove `densityMode` field from appearance section (redundant with `rowHeight` which provides finer 5-value granularity)
438-
- [x] Add `visibleWhen` to toolbar toggles: `showGroup` (grid/kanban only), `showColor` (grid only), `showDensity` (grid only)
439-
- [x] Add `visibleWhen` to data fields: `prefixField` (grid only), `_groupBy` (hidden for kanban — uses dedicated type-specific `kanban.groupByField`), `searchableFields`/`filterableFields`/`quickFilters`/`virtualScroll` (grid only)
440-
- [x] Add `visibleWhen` to appearance fields: `collapseAllByDefault` (only when `groupBy` is set), `fieldTextColor`/`showDescription`/`rowHeight`/`conditionalFormatting` (grid only)
438+
- [x] Remove `prefixField` from data section (not consumed by any runtime renderer)
439+
- [x] Remove `collapseAllByDefault` from appearance section (not consumed by any runtime renderer)
440+
- [x] Remove `fieldTextColor` from appearance section (not consumed by any runtime renderer)
441+
- [x] Remove `clickIntoRecordDetails` from userActions section (controlled implicitly via navigation mode, not directly consumed)
442+
- [x] Add view-type-aware `visibleWhen` to toolbar toggles: `showGroup` (grid/kanban/gallery), `showColor` (grid/calendar/timeline/gantt), `showDensity` (grid only), `showRecordCount` (grid only), `allowPrinting` (grid only)
443+
- [x] Add view-type-aware `visibleWhen` to data fields: `_groupBy` (grid/gallery — kanban uses dedicated type-specific option), `virtualScroll` (grid only)
444+
- [x] Add view-type-aware `visibleWhen` to appearance fields: `striped`/`bordered`/`wrapHeaders`/`resizable`/`rowHeight` (grid only, changed from disabledWhen to visibleWhen), `color` (grid/calendar/timeline/gantt), `conditionalFormatting` (grid/kanban)
445+
- [x] Add view-type-aware `visibleWhen` to userActions fields: `inlineEdit`/`addDeleteRecordsInline` (grid only), `rowActions`/`bulkActions` (grid/kanban)
446+
- [x] Correct `searchableFields`/`filterableFields`/`quickFilters`/`showDescription` to universal (all view types) — data fetch/toolbar features not view-specific
441447
- [x] Extend `buildSwitchField` and `buildFieldMultiSelect` helpers to accept `visibleWhen` parameter
442-
- [x] 15 new visibleWhen predicate tests covering all new conditional visibility rules
443-
- [x] 1 new test verifying `densityMode` removal
444-
- [x] Updated ViewConfigPanel interaction tests to account for new visibility conditions
445-
- [x] All 244 schema + panel tests pass, 10 config-sync integration tests pass
448+
- [x] Define semantic predicates: `supportsGrouping`, `supportsColorField`, `supportsConditionalFormatting`, `supportsRowActions`, `supportsGenericGroupBy`
449+
- [x] 103 schema tests pass (updated field key lists, visibleWhen predicates for all view types, removed field verification)
450+
- [x] 136 ViewConfigPanel interaction tests pass (removed tests for deleted fields)
451+
- [x] 10 config-sync integration tests pass
446452

447453
**Code Reduction:** ~1655 lines imperative → ~170 lines declarative wrapper + ~1100 lines schema factory + ~180 lines shared utils = **>50% net reduction in component code** with significantly improved maintainability
448454

0 commit comments

Comments
 (0)