Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
0aa0b51
wip(spec): widen InlineGridColumnSchema.type with user, multiselect, …
claude Nov 22, 2026
9853f20
chore(spec): regenerate docs, authorable surface and liveness counts …
claude Nov 22, 2026
b44930d
wip(ui): line-item cells for user, multiselect, tags, boolean, rating
claude Nov 22, 2026
1dcbb95
feat(ui): line-item cells pins, shared read-only faces, changeset
claude Nov 22, 2026
c658fb9
test(ui): pin the five line-item cells; people derive skips the syste…
claude Nov 22, 2026
9b928ca
chore(spec): regenerate docs for the column options description
claude Nov 22, 2026
10767ef
test(ui): the late-catalogue and corpus pins read the derived boolean…
claude Nov 22, 2026
ccb079c
fix: classify the column max key for field-level security; move the c…
claude Nov 22, 2026
a768266
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Nov 22, 2026
25ab865
chore(spec): regenerate the view reference after merging main
claude Nov 22, 2026
44eb9ac
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Nov 22, 2026
78d6e22
chore(spec): regenerate the field liveness counts, authorable surface…
claude Nov 22, 2026
7381929
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Nov 22, 2026
f73a435
chore(spec): regenerate the field liveness counts, authorable surface…
claude Nov 22, 2026
6e74cfe
fix: an emptied list cell writes null; a tags cell takes no options; …
claude Nov 22, 2026
2197dbd
fix(fields): an emptied tags cell reads as empty, as an emptied multi…
claude Nov 22, 2026
68ebf22
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Nov 22, 2026
6185cae
chore(spec): regenerate the ui component reference after merging main
claude Nov 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .changeset/36043-line-item-cell-editors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
'@objectstack/spec': minor
'@object-ui/fields': minor
'@object-ui/plugin-form': minor
'@objectstack/metadata-core': patch
'@object-ui/types': patch
---

feat: the form's line-item table edits people, multi-select, tags, check and rating cells the way the main list does

Clause-②: yes (widening)
Metadata-protocol: semantic

`InlineGridColumnSchema.type` (a relationship field's `inlineColumns`, a form view's `subforms[].columns`, and the page blocks that carry the same column) accepts five more cell types, each spelled as its namesake field type: `user` (people), `multiselect`, `tags`, `boolean` (check) and `rating`. The column also takes an optional `max`, the star count of a `rating` cell (default 5).

In the line-item table:

- A `user` cell opens the main list's person picker under the cell: a searchable list with recent people and Clear; a pick writes and closes. `multiple` holds several people.
- A `multiselect` cell holds several of its options and a `tags` cell holds free-form tags. Each opens its searchable list under the cell; a click outside or Tab writes what was picked, Esc writes nothing. A list emptied in the cell writes `null`, as a cleared multi-value field stores, so a line whose only value was removed is still a blank line. A `tags` cell takes no `options`.
- A `boolean` cell is a checkbox: a click or Space toggles it and writes `true` / `false`.
- A `rating` cell draws its stars; a click on a star, or a digit key on the cell, sets it, and 0 clears it.
- Read-only and list-mode cells show people by name, a rating as its stars, a multi-select's option labels, and a check cell as the session's yes/no word.

Visible change on existing forms: a column the table derives from a child field (no `type` written) now follows that field. A `boolean` / `toggle` field becomes a checkbox instead of the yes/no select, and it writes `true` / `false` instead of the strings `'true'` / `'false'` (the server reads both the same). A `rating` field becomes stars instead of a number box. `user`, `multiselect`, `checkboxes` and `tags` fields get their own cells instead of a plain text box that took a typed user id or a single option. A column that writes its `type` is unchanged, a `type: 'select'` column over a boolean field included. Which derived columns are visible by default is unchanged.

The field-level security scrubber classifies the column's new `max` key as kept (a number, never a field name).
18 changes: 12 additions & 6 deletions content/docs/data-modeling/field-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -599,16 +599,22 @@ the parent's form edits the children as rows of a table:

- **Columns.** Without `inlineColumns` the columns are derived from the child object. An
explicit column (`InlineGridColumn`) names the child field in `name` and may set `label`,
`width` (pixels), `required` and `type`. A column's `type` is one of nine cell controls:
`text`, `number`, `currency`, `date`, `datetime`, `time`, `select`, `lookup` and `file`.
Declaring `type` opts the column out of derivation, so supply what the control needs
(`options` for a select, `reference` and `displayField` for a lookup).
`width` (pixels), `required` and `type`. A column's `type` is one of fourteen cell controls:
`text`, `number`, `currency`, `date`, `datetime`, `time`, `select`, `lookup`, `file`, `user`,
`multiselect`, `tags`, `boolean` and `rating`. Declaring `type` opts the column out of
derivation, so supply what the control needs (`options` for a select or multi-select,
`reference` and `displayField` for a lookup, `max` for a rating).
- **File cells.** A `file` column is an upload control in the cell, with removable chips and
thumbnails for images; `accept` and `multiple` restrict it. Derived columns map `file`,
`image` and `avatar` child fields to `file` cells, an image field accepting `image/*`. Shown as
text, a file cell reads the file's name, or a count when it holds several.
- **Booleans.** A derived `boolean` or `toggle` child field becomes a `select` cell storing
`'true'` / `'false'`, labelled in the session language.
- **Booleans.** A derived `boolean` or `toggle` child field becomes a checkbox cell storing
`true` / `false`; read-only, it shows the session language's yes / no word. A column authored
as `type: 'select'` over a boolean field keeps the select.
- **People, multi-select, tags and rating.** A derived `user` field becomes the person picker
(several people when the field is `multiple`), `multiselect` and `checkboxes` fields a list
holding several options, `tags` a free-form tag list, and `rating` a row of stars (`max`
from the field, default 5). Each edits as the same cell does in the list view.
- **Currency.** A `currency` cell shows the resolved currency's symbol, and decimals of that
currency's CLDR fraction digits; `prefix` replaces the symbol only.
- **Order.** When the columns are derived and the child object has a field named `position`, `sort_order`, `sequence`,
Expand Down
16 changes: 9 additions & 7 deletions content/docs/references/data/field.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const result = CurrencyConfigSchema.parse(data);
| **deleteBehavior** | `Enum<'set_null' \| 'cascade' \| 'restrict'>` | optional (default: `"set_null"`) | What happens if referenced record is deleted |
| **inlineEdit** | `boolean \| Enum<'grid' \| 'form'>` | optional | How the parent's form edits these child records inline (atomic master-detail) when a field group of the parent names this child (fieldGroups[].relatedList); a child no group names is not inlined, whatever this says. true or absent = auto-pick grid/form by child shape; 'grid' = editable line-item grid; 'form' = list + per-row full form. |
| **inlineTitle** | `string` | optional | Title for the inline master-detail grid |
| **inlineColumns** | `{ name: string; label?: string; type?: Enum<'text' \| 'number' \| 'currency' \| 'date' \| 'datetime' \| 'time' \| 'select' \| 'lookup' \| 'file'>; width?: number; … }[]` | optional | Explicit columns for the inline grid (derived from the child object when omitted). Each entry is a strict, name-keyed column (`{ name, label?, type?, … }` — objectui GridColumn); identity-only entries (`{ name }`) hydrate everything else from the child object's fields. Unknown keys and the retired `field` spelling are refused at parse. |
| **inlineColumns** | `{ name: string; label?: string; type?: Enum<'text' \| 'number' \| 'currency' \| 'date' \| 'datetime' \| 'time' \| 'select' \| …>; width?: number; … }[]` | optional | Explicit columns for the inline grid (derived from the child object when omitted). Each entry is a strict, name-keyed column (`{ name, label?, type?, … }` — objectui GridColumn); identity-only entries (`{ name }`) hydrate everything else from the child object's fields. Unknown keys and the retired `field` spelling are refused at parse. |
| **inlineAmountField** | `string` | optional | Numeric child field summed for the inline grid total |
| **relatedList** | `boolean \| 'primary'` | optional | Show this child collection as a related list on the parent's detail page (read-side mirror of inlineEdit). true = an auxiliary panel on the record page; absent = an auxiliary panel, except that a master_detail field becomes a body table when a field group of the parent names it (fieldGroups[].relatedList); false = hidden: the child object is not shown on the parent record page; 'primary' = a body table: part of the record's main content, shown as a full-width table in the record's detail body. Write true on a master_detail field to keep it an auxiliary panel even from a field group. 'primary' places a list and does not order it: the parent object's relatedLists orders the full-width tables and the auxiliary panels. The page layout is defined by ADR-0085. A derived related list (relatedList: 'primary') inherits its row order from the child object's DEFAULT list view sort — the isDefault view, or the first declared list item when none is marked default; wire spelling is sort=`<field>` / sort=-`<field>`, never $orderby. A child object with no list-view sort emits no ordering parameter, and rows fall back to record-id order. |
| **relatedListTitle** | `string` | optional | Title for the detail-page related list |
Expand Down Expand Up @@ -220,16 +220,17 @@ const result = CurrencyConfigSchema.parse(data);
| :--- | :--- | :--- | :--- |
| **name** | `string` | ✅ | Child field this column shows — the key the grid reads and writes on each row object (objectui GridColumn.name). The retired `field` spelling is refused. |
| **label** | `string` | optional | Column header; defaults to the child field's label via hydration. |
| **type** | `Enum<'text' \| 'number' \| 'currency' \| 'date' \| 'datetime' \| 'time' \| 'select' \| 'lookup' \| 'file'>` | optional | Cell control, derived from the child field's type when omitted. Declaring it opts the column out of schema hydration — supply the extras (options / reference / …) yourself. |
| **type** | `Enum<'text' \| 'number' \| 'currency' \| 'date' \| 'datetime' \| 'time' \| 'select' \| …>` | optional | Cell control, derived from the child field's type when omitted: `user` is a person picker, `multiselect` a list holding several of the column's options, `tags` a list of free-form tags, `boolean` a checkbox and `rating` a row of stars. Declaring it opts the column out of schema hydration — supply the extras (options / reference / …) yourself. |
| **width** | `number` | optional | Fixed column width in px; omitted columns use type-based role sizing (text flexes, numeric/date/select stay fixed). |
| **required** | `boolean` | optional | Cell is flagged inline-invalid while empty. Computed columns are never required. |
| **options** | `{ label: string; value: string }[]` | optional | Select-cell options for `type: 'select'`; derived from the child field's options when the column declares no `type`. |
| **options** | `{ label: string; value: string }[]` | optional | Options of a `select` or `multiselect` cell, and the words a `boolean` cell reads as (values `true` / `false`); derived from the child field's options when the column declares no `type`. A `tags` cell reads none: it holds free-form tags. |
| **prefix** | `string` | optional | Symbol shown in a `currency` cell in place of the resolved currency's own symbol. No default: when omitted, the cell shows the symbol of the currency it resolves. It replaces the symbol only — the amount's decimal places stay the currency's. |
| **step** | `number` | optional | Input step for numeric cells. |
| **reference** | `string` | optional | Referenced object for `type: 'lookup'` cells; derived from the child lookup field when the column declares no `type`. |
| **displayField** | `string` | optional | Label field shown for a picked lookup record. |
| **idField** | `string` | optional | Id field stored for a picked lookup record. |
| **multiple** | `boolean` | optional | Multi-value column: multi-record lookup, or multi-file upload cell. |
| **multiple** | `boolean` | optional | Multi-value column: multi-record lookup, several people in a `user` cell, or multi-file upload cell. |
| **max** | `integer` | optional | Star count of a `rating` cell (default 5); derived from the child field's `max` when the column declares no `type`. |
| **accept** | `string[]` | optional | Accepted MIME types / extensions for a `file` cell's picker (e.g. ['image/*', '.pdf']); omit to accept anything. |
| **defaultHidden** | `boolean` | optional | Collapsed into the grid's column chooser by default (not dropped); required columns are never default-hidden. |
| **computed** | `boolean` | optional | Read-only computed column, recomputed live from sibling cells via `expr` and written back into the row. |
Expand Down Expand Up @@ -417,16 +418,17 @@ Allowed Values: `phone`, `id_card`, `bank_account`, `email`, `name`
| :--- | :--- | :--- | :--- |
| **name** | `string` | ✅ | Child field this column shows — the key the grid reads and writes on each row object (objectui GridColumn.name). The retired `field` spelling is refused. |
| **label** | `string` | optional | Column header; defaults to the child field's label via hydration. |
| **type** | `Enum<'text' \| 'number' \| 'currency' \| 'date' \| 'datetime' \| 'time' \| 'select' \| 'lookup' \| 'file'>` | optional | Cell control, derived from the child field's type when omitted. Declaring it opts the column out of schema hydration — supply the extras (options / reference / …) yourself. |
| **type** | `Enum<'text' \| 'number' \| 'currency' \| 'date' \| 'datetime' \| 'time' \| 'select' \| 'lookup' \| 'file' \| 'user' \| 'multiselect' \| 'tags' \| 'boolean' \| 'rating'>` | optional | Cell control, derived from the child field's type when omitted: `user` is a person picker, `multiselect` a list holding several of the column's options, `tags` a list of free-form tags, `boolean` a checkbox and `rating` a row of stars. Declaring it opts the column out of schema hydration — supply the extras (options / reference / …) yourself. |
| **width** | `number` | optional | Fixed column width in px; omitted columns use type-based role sizing (text flexes, numeric/date/select stay fixed). |
| **required** | `boolean` | optional | Cell is flagged inline-invalid while empty. Computed columns are never required. |
| **options** | `{ label: string; value: string }[]` | optional | Select-cell options for `type: 'select'`; derived from the child field's options when the column declares no `type`. |
| **options** | `{ label: string; value: string }[]` | optional | Options of a `select` or `multiselect` cell, and the words a `boolean` cell reads as (values `true` / `false`); derived from the child field's options when the column declares no `type`. A `tags` cell reads none: it holds free-form tags. |
| **prefix** | `string` | optional | Symbol shown in a `currency` cell in place of the resolved currency's own symbol. No default: when omitted, the cell shows the symbol of the currency it resolves. It replaces the symbol only — the amount's decimal places stay the currency's. |
| **step** | `number` | optional | Input step for numeric cells. |
| **reference** | `string` | optional | Referenced object for `type: 'lookup'` cells; derived from the child lookup field when the column declares no `type`. |
| **displayField** | `string` | optional | Label field shown for a picked lookup record. |
| **idField** | `string` | optional | Id field stored for a picked lookup record. |
| **multiple** | `boolean` | optional | Multi-value column: multi-record lookup, or multi-file upload cell. |
| **multiple** | `boolean` | optional | Multi-value column: multi-record lookup, several people in a `user` cell, or multi-file upload cell. |
| **max** | `integer` | optional | Star count of a `rating` cell (default 5); derived from the child field's `max` when the column declares no `type`. |
| **accept** | `string[]` | optional | Accepted MIME types / extensions for a `file` cell's picker (e.g. ['image/*', '.pdf']); omit to accept anything. |
| **defaultHidden** | `boolean` | optional | Collapsed into the grid's column chooser by default (not dropped); required columns are never default-hidden. |
| **computed** | `boolean` | optional | Read-only computed column, recomputed live from sibling cells via `expr` and written back into the row. |
Expand Down
Loading
Loading