Skip to content

Commit 397893e

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-35932-draft-save-no-remount
2 parents 59e9e7c + c00be39 commit 397893e

147 files changed

Lines changed: 6106 additions & 1505 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@object-ui/plugin-grid': patch
3+
'@object-ui/components': patch
4+
'@object-ui/types': patch
5+
'@object-ui/app-shell': patch
6+
---
7+
8+
feat(plugin-grid): selected rows get one small bar floating at the bottom centre of the list
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: none
12+
13+
Selecting rows in a grid now shows one bar floating at the bottom centre of the list area: 「已选 N 条」 and ×, up to three labelled actions, and the rest under 「更多」. When the selection offers no more than three actions they are all buttons, so a lone Delete is a button; over three, Delete goes behind 「更多」 with the rest. The bar sits above the footer calc row, the list keeps room after its last row so that row scrolls fully clear of the bar, and when every loaded row is selected and more match, the bar offers 「选择全部 N 条」. × or Esc clears the selection; Esc that belongs to a field, or to another open menu or dialog, does not.
14+
15+
The same bar serves the object list page, a record's child-table tabs, the side record and embedded tables. The old bottom strip and the list page's 「已选」 face in the view bar are both retired, so the top of the list page no longer changes when rows are selected. On the list page, where rows draw no actions of their own, one selected record offers that record's actions; elsewhere the bar offers the bulk actions at any count. A narrow list gives actions back to 「更多」 until the bar fits on one line.
16+
17+
- `@object-ui/plugin-grid`: `BulkActionBar` is redrawn as the floating bar; its props gain `singleRowMenu`. `useListPageScope(scope)` replaces the unpublished `useListPageBarHost`.
18+
- `@object-ui/types` / `@object-ui/components`: `DataTableSchema.floatingBar` is a runtime slot (refused by the zod twin like the other runtime slots). The table floats it over its scroll box, above its summary row, with room after its last row.
19+
- `@object-ui/app-shell`: the list page header and the view bar no longer swap to a selection face.
20+
21+
This supersedes the selection behaviour in the list-page entry of this release (no Actions column on the list page): the selection is no longer shown in the page bar, up to three actions are buttons and a lone Delete is one, and grids outside a list page no longer draw a bottom bulk bar.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
'@object-ui/fields': patch
3+
'@object-ui/plugin-grid': patch
4+
'@object-ui/components': patch
5+
'@object-ui/i18n': patch
6+
---
7+
8+
feat(fields): in a list grid's cell editor, select, multi-select, tags, date, time and colour open ready to pick
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: none
12+
13+
The widget contract `FieldWidgetComponentProps` gains two optional host keys, `inCell` (draw the face for a grid cell's editor) and `onCommit` (the user has finished: write the last `onChange` value and close). `FieldEditWidget` forwards both, and `ObjectGrid`'s cell editor passes them. A host that passes neither renders every widget exactly as before.
14+
15+
In the cell editor of every grid `ObjectGrid` draws:
16+
17+
- **Single select and status** show their option list at once, with a search box that filters as you type. The arrow keys move through the list, Enter or a click picks, and the pick is saved; the selection stays on the cell. With nothing picked, Enter commits as before and Escape cancels.
18+
- **Multi-select** (and a select declared `multiple`) is the same list with check marks: each pick toggles, and the edit is saved when you move on.
19+
- **Tags** list this record's tags with check marks; unchecking removes one, and text that matches no tag is added from the list's leading "Add" row (Enter).
20+
- **Date and date-time** open their calendar at once while the typed value stays visible and editable in the text box. The calendar offers Today, Tomorrow, Next week (seven days from today) and Clear. On a date, picking a day or a quick pick saves and closes; on a date-time, a day keeps the calendar open for the time, as in forms.
21+
- **Time** opens the browser's time picker when the editor opens.
22+
- **Colour** shows the hex box first (Enter saves, Escape leaves) and a row of swatches plus the browser's colour picker; a swatch saves and closes.
23+
- A value picked this way hands the keyboard focus back to the selected cell, and in a grid that edits on a single click, the click that picked it no longer opens the editor again.
24+
25+
`@object-ui/i18n` adds the strings these faces show in every locale: `fields.datePicker.nextWeek`, `fields.datePicker.clearPick`, `fields.options.search`, `fields.options.noMatches`, `fields.tags.add`, `fields.color.swatches`, `fields.color.custom`.
26+
27+
Forms, dialogs and the record page keep their current controls.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@object-ui/plugin-form': patch
3+
'@object-ui/components': patch
4+
'@objectstack/spec': patch
5+
---
6+
7+
fix(ui): the entry form draws a group-placed master-detail table at its field group
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
A master-detail child that a field group of the parent places (`fieldGroups[].relatedList`) is now drawn at that group in the parent's create and edit forms, where the record page draws it, instead of below all of the record's fields:
13+
14+
- A form laid out from the parent's field groups draws the table after the sections of the groups declared before the placing group and before the ones declared after it.
15+
- The form's section bar stops at the table too, between the sections around it.
16+
- A tabbed form gives it a tab of its own at that position, labelled with the group's label. A wizard master-detail form is drawn as the simple form, as before, and places it the same way.
17+
- A form whose sections name no field group, and a child no group places (a form view's own `subforms`), keep the table below the record's fields, as before.
18+
19+
The table is the same one: its rows still save with the record in one batch, an expanded row's editor opens beside it, and the document totals stay at the foot of the form. No metadata changes.

‎.changeset/35889-master-detail-tab-by-default.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ A `master_detail` FK that declares no `relatedList` used to put its child list i
1919
- `inlineEdit` on the FK no longer inlines a child in the parent's form by itself (maintainer ruling B: only the field group decides). It now only picks the form factor of a child a group places: `'grid'`, `'form'`, or `true` / absent for the shape-picked default. A child with `inlineEdit` that no group names is a tab and is not in the form.
2020
- `os lint`: `relationship/line-items-inline-edit` now suggests a field group on the parent (with its required `label`) instead of `inlineEdit: true`, and only for a FK a group may place; `relationship/association-inline-edit` and `relationship/inline-edit-needs-bulk` judge the children a parent group places; the field-consumer rule credits a child's inline grid columns only when a parent group places it.
2121
- The showcase invoice and expense report, and the CRM opportunity, gain a field group naming their lines, so their forms and record pages keep the line table.
22-
- In the entry form a placed table still sits below the record's fields, where `inlineEdit` tables sit today. Moving it to its group's place in the form is a follow-up.
22+
- In the entry form a placed table sits at its group's place too: between the sections of the groups around it, or in a tab of its own (labelled with the group) in a tabbed form. A form whose sections name no field group keeps it below the record's fields.
2323
- Studio's field-group picker offers the same children as before. The relationship field inspector reads a plain `master_detail` FK as "Show", and "Show" leaves the key absent so a group can still place it.
2424

2525
To keep a master-detail child's table in the overview and its rows in the form (including a child that set `inlineEdit`), add a field group to the parent that names it, in the place the table should sit:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@object-ui/fields': patch
3+
'@object-ui/plugin-kanban': patch
4+
'@object-ui/plugin-grid': patch
5+
'@object-ui/plugin-detail': patch
6+
'@object-ui/i18n': patch
7+
---
8+
9+
feat(list,detail): a change that makes other fields required asks for them in place — the kanban drop's fill-in, now shared by the list cell and the record page
10+
11+
Clause-②: yes (widening) — `@object-ui/fields` exports `collectRequiredWhenPromptFields`, `RequiredFieldsDialog` and their types (moved from `@object-ui/plugin-kanban`, which never exported them) and the new `requiredWhenPromptReads`; nothing removed or renamed
12+
Metadata-protocol: none
13+
14+
When a value about to be written makes another field's `requiredWhen` true while that field is still empty, the write is held and one dialog asks for the missing values:
15+
16+
- **Where:** a list cell in the select-first grid every `ListView` draws, the record page's inline Save, and the kanban drop (as before).
17+
- **What it shows:** the record's name, the change that set it off (read-only), and one row per field to fill, with the editors the record form uses. A value typed there that makes one more field required adds that field; Save waits for it.
18+
- **Save** writes the change and the typed values as ONE update. **Cancel** writes nothing: the list cell keeps its value; on the record page the edit session and its draft stay.
19+
- **A refusal of that update stays in the dialog:** under the field it names, as a new row for another field the reader can fill, or at the dialog's foot.
20+
- **Not asked for**, and written and refused as before: a field that already has a value, is hidden or read-only, that the reader may not write, or that has no in-place editor (a file, rich text, a formula). The record drawer's per-field save does not ask either.
21+
22+
The pre-evaluation is the one the kanban drop already used (`resolveFieldRuleState`, the evaluator the form and the server share, judged as the engine's transition gate), generalised from one key to any set of changed keys.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/console': patch
4+
'@object-ui/i18n': patch
5+
---
6+
7+
fix(studio): the key-fields editor no longer previews a record-page strip
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
The default record page draws no key-field strip, so Studio's object settings
13+
stop drawing a "Highlight strip preview" under the `highlightFields` list. The
14+
ordered rows stay: order still decides which fields each surface takes. The
15+
`engine.studio.settings.highlightPreview` catalogue key leaves the studio
16+
namespace (English and Chinese).
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@object-ui/components': minor
4+
'@object-ui/layout': minor
5+
'@object-ui/app-shell': minor
6+
'@object-ui/i18n': minor
7+
'@objectstack/metadata-core': patch
8+
'@objectstack/platform-objects': minor
9+
---
10+
11+
feat(spec, ui): an object takes a colour from a fixed palette, and its icon is drawn as a white glyph on a square of that colour
12+
13+
Clause-②: yes (widening)
14+
Metadata-protocol: added
15+
16+
- **`ObjectSchema.color` (new, optional).** One name from a closed palette of nine: `gray`, `blue`, `teal`, `green`, `amber`, `orange`, `red`, `pink`, `purple` (exported as `OBJECT_COLORS` and the `ObjectColor` type from `@objectstack/spec/data`). No free colour values: `color: '#ff0000'` is refused, and the refusal lists the nine names. An object without a `color` is drawn in the neutral `gray`. Nothing to migrate: every existing object stays valid and simply has no colour.
17+
- **The AI blueprint carries it too.** `BlueprintObjectSchema.color` is the same leaf (required-but-nullable on `SolutionBlueprintStrictSchema`, like `icon`), and its rule asks the model to colour every object and give each object of one solution a different colour while the palette lasts. A producer of the STRICT shape must now send `color` on each object, `null` when it has none; the lenient shape a stored blueprint is read with keeps it optional.
18+
- **`ObjectIconTile` (new, `@object-ui/components`).** Draws an icon name as a white glyph on a rounded square of a palette colour, in four sizes. Each name has a light-theme and a dark-theme value chosen so the white glyph keeps at least 3:1 contrast. `OBJECT_COLOR_TILE_CLASS` and `objectColorOrDefault` are exported with it.
19+
- **Navigation draws objects as tiles.** In the sidebar, the app-home menu and the phone menu, every entry that opens an object is drawn as that object's tile: the entry's own `icon` when it names one, else the object's, on the object's colour. Dashboards, pages and links keep their line icons. `NavigationRenderer` takes a new `resolveTargetColor` resolver (`NavTargetColorResolver`) beside `resolveTargetIcon`; the console answers it from the object metadata it already holds (`useNavTargetColor`). A host that passes no `resolveTargetColor` gets its object entries as gray tiles where it had line icons.
20+
- **The designer picks icon and colour together.** In the object's settings, the icon picker shows the nine colour swatches, and the trigger and every icon in the grid are previewed as the tile they become. The picker elsewhere (pages, apps, navigation entries) is unchanged: only objects carry a colour.
21+
- The other places that draw an object's icon (list and record headers, search, related-record chips, the designer's object lists) switch to the tile in a follow-up release.
22+
23+
`@objectstack/metadata-core`: the field-level-security reference table classifies the new `color` key as `keep` (a palette name names no field).
24+
25+
`@objectstack/platform-objects`: the generic object form's metadata-form packs ship the new `color` row's label and help text in all 10 locales.

‎content/docs/frontend/plugins/plugin-grid.mdx‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,15 @@ through the host's data source (`dataSource.update`) with no callback to wire.
374374
window the layer opens upward, near the right edge it shifts left, and a
375375
cell half hidden behind a frozen column or the header is scrolled into view
376376
first. Scrolling the cell out of sight commits the edit.
377+
- **Pickers open ready to pick** (objectstack#35688): a single select or
378+
status shows its option list at once, with a search box that filters as you
379+
type; the arrow keys and Enter (or a click) pick, and the pick is saved. A
380+
multi-select is the same list with check marks, and tags list the field's
381+
tags with an "Add" row for new text; both save when you move on. A date or
382+
date-time opens its calendar while the value stays typeable in its box, with
383+
Today, Tomorrow, Next week (seven days from today) and Clear; on a date, a
384+
day or a quick pick saves. A time opens the browser's time picker, and a
385+
colour offers swatches beside its hex box (a swatch saves, Escape leaves).
377386

378387
To own persistence in a React host, supply `onCellChange` as a **component
379388
prop** — it is not a schema key.
@@ -447,6 +456,19 @@ row whose new value would sort it elsewhere stays in place until the next load
447456
trigger related automation."). Cancel writes nothing and the cell keeps the
448457
value it had; Change saves it as any commit is saved. The confirm does not
449458
list the flows. A host asks this through `GridCellSelection.confirmCommit`.
459+
- **A change that makes other fields required asks for them** (objectstack#35956).
460+
When the new value makes a field's `requiredWhen` true while that field is
461+
still empty (a win reason on "Won", say), nothing is written yet: a dialog
462+
names the record and the change and asks for those fields, with the editors
463+
the record form uses, whether or not the view draws them as columns. A value
464+
typed there that makes one more field required adds it. Save writes the cell
465+
and the typed values as one update; Cancel writes nothing and the cell keeps
466+
its value. A refusal of that update stays in the dialog, under the field it
467+
names. That dialog is the confirmation, so a state-machine field does not ask
468+
twice. A field that has a value, is hidden or read-only, the reader may not
469+
write, or has no in-place editor (a file, rich text) is not asked for: the
470+
change is saved and refused as before. The kanban drop and the record page's
471+
inline Save open the same dialog (`RequiredFieldsDialog` in `@object-ui/fields`).
450472
- **The record drawer follows.** A record open in the list's drawer is read
451473
again when a list cell saves it. If the drawer holds unsaved edits of its own,
452474
those stay as typed, the drawer's save bar says the record was changed

0 commit comments

Comments
 (0)