|
| 1 | +--- |
| 2 | +'@object-ui/types': minor |
| 3 | +--- |
| 4 | + |
| 5 | +**BREAKING** — `NamedListView` (one entry of `ObjectViewSchema.listViews`) retires |
| 6 | +sixteen members on its TypeScript authoring face (objectui#7924). Each is now a |
| 7 | +`?: never` tombstone: a TypeScript author who writes one gets a compile error at that |
| 8 | +key, and the member's docblock names the key to write instead. |
| 9 | + |
| 10 | +**The eight legacy `show*` spellings** (bucket ② of the director-seat ruling on |
| 11 | +objectui#7924, letter **A**). None is a protocol key on a view; the protocol's |
| 12 | +`userActions` and `appearance` blocks are the canonical home, and `NamedListView` |
| 13 | +already declares both (objectui#8980), so objectui is not narrower than the protocol |
| 14 | +on any of the toggles. |
| 15 | + |
| 16 | +| retired | author instead | |
| 17 | +| --- | --- | |
| 18 | +| `showSearch` | `userActions.search` | |
| 19 | +| `showSort` | `userActions.sort` | |
| 20 | +| `showFilters` | `userActions.filter` | |
| 21 | +| `showHideFields` | `userActions.hideFields` | |
| 22 | +| `showGroup` | `userActions.group` | |
| 23 | +| `showColor` | `userActions.rowColor` | |
| 24 | +| `showDensity` | `userActions.rowHeight` | |
| 25 | +| `showDescription` | `appearance.showDescription` | |
| 26 | + |
| 27 | +```ts |
| 28 | +// before |
| 29 | +const all: NamedListView = { label: 'All', showSearch: false, showDescription: true }; |
| 30 | +// after |
| 31 | +const all: NamedListView = { label: 'All', userActions: { search: false }, appearance: { showDescription: true } }; |
| 32 | +``` |
| 33 | + |
| 34 | +**Eight members the protocol declares nowhere and no renderer acts on** (bucket ③): |
| 35 | +`addDeleteRecordsInline`, `addRecordViaForm`, `clickIntoRecordDetails`, |
| 36 | +`collapseAllByDefault`, `color`, `fieldTextColor`, `prefixField`, `wrapHeaders`. Two |
| 37 | +tombstones point at a likely intent, with no alias mapping behind either: `color` at the |
| 38 | +row-colour configuration `rowColor: { field }`, and `addRecordViaForm` at the |
| 39 | +`userActions.addRecordForm` toggle. |
| 40 | + |
| 41 | +**Two bucket-③ members are NOT retired, because each is read:** `allowExport` gates |
| 42 | +`ListView`'s export control when the Console relays it off the active named view, and |
| 43 | +`densityMode` is folded onto `rowHeight` by `normalizeListViewSchema`. They stay |
| 44 | +declared as they were. |
| 45 | + |
| 46 | +**Only the authoring face changes.** Stored view documents that still carry a legacy |
| 47 | +spelling keep loading: `normalizeListViewSchema` (`@object-ui/core`) still folds the eight |
| 48 | +`show*` flags onto `userActions` / `appearance` at runtime, and hosts that read a stored |
| 49 | +view through a loose type are unaffected. |
| 50 | + |
| 51 | +**ADR-0087 disposition:** the eight `show*` spellings are a **D2** conversion. Stored |
| 52 | +documents are accepted and converted at load by the existing runtime fold, and the TS |
| 53 | +face refuses the old spelling at authoring time. The eight bucket-③ members have **no |
| 54 | +conversion**, because the protocol has no equivalent to convert them to. The refusal is |
| 55 | +loud and by name on the TS face, and a stored document carrying one stays as inert as |
| 56 | +it was before this change. |
0 commit comments