|
| 1 | +--- |
| 2 | +'@object-ui/plugin-grid': minor |
| 3 | +'@object-ui/types': minor |
| 4 | +--- |
| 5 | + |
| 6 | +An `object-grid` now honours `description` and `emptyState`, and four keys it declared but |
| 7 | +never read are retired (objectui#11068). |
| 8 | + |
| 9 | +**What was wrong.** `ObjectGridSchema` declared eight keys the grid never read. An author who |
| 10 | +wrote `description`, `emptyState`, `name`, `placeholder`, `rowSpecActions` or `bulkSpecActions` |
| 11 | +on an `object-grid` got no type error, no validator refusal and no effect. The reference |
| 12 | +example in `schema-reference.md` taught `description` and `showFilters` as if they worked. It |
| 13 | +now authors only keys the grid reads. |
| 14 | + |
| 15 | +**`@object-ui/plugin-grid` (feature).** |
| 16 | + |
| 17 | +- `description` draws one line of help text above the grid, in the muted style `list-view` |
| 18 | + uses for a view's description. A per-locale map resolves against the display locale, as |
| 19 | + `label` does. A map with no usable entry draws nothing. |
| 20 | +- `emptyState: { title?, message?, icon? }` draws in place of an empty table, through the same |
| 21 | + empty-state component and icon resolver `list-view` uses. A member you leave out keeps the |
| 22 | + grid's default: the shared empty-state glyph, the table's "No results found" heading, and no |
| 23 | + message. It is not drawn when a term typed into the grid's own server-side search box emptied |
| 24 | + it: the table and its search box stay, so the term can be cleared. A grid without the key |
| 25 | + draws the table's own empty row, as before. |
| 26 | + |
| 27 | +**`@object-ui/types` (breaking for a writer of a retired key, hence `minor`).** |
| 28 | + |
| 29 | +- `rowSpecActions` and `bulkSpecActions` are retired. They were second spellings of |
| 30 | + `rowActions` and `bulkActions`, which the grid reads. Rename the key. |
| 31 | +- `name` and `placeholder` are retired on `object-grid`. A grid is not a form field or an |
| 32 | + input, and the grid never read either key. Write `id` for the node's identity, `label` for |
| 33 | + its caption, and `emptyState: { message }` for the text shown when it has no rows. |
| 34 | +- Each retired key is `?: never` on the interface and a named refusal on the Zod twin, so |
| 35 | + TypeScript code that writes one fails to compile, and a document that carries one fails |
| 36 | + validation with a message that names the key and its replacement. |
| 37 | +- The Zod twin now also validates `emptyState`: three optional strings, with an unknown member |
| 38 | + refused by name. |
| 39 | + |
| 40 | +**Unchanged.** An `object-view`'s `table` slot still withholds `description` and `emptyState`. |
| 41 | +Write them on the `object-grid` node itself. `showFilters` and `keyboardNavigation` are still |
| 42 | +declared and still not read. |
0 commit comments