|
| 1 | +--- |
| 2 | +'@objectstack/spec': major |
| 3 | +'@object-ui/types': major |
| 4 | +'@objectstack/lint': minor |
| 5 | +'@objectstack/runtime': minor |
| 6 | +'@objectstack/platform-objects': minor |
| 7 | +'@object-ui/core': minor |
| 8 | +'@object-ui/components': minor |
| 9 | +'@object-ui/plugin-detail': minor |
| 10 | +'@object-ui/app-shell': minor |
| 11 | +'@object-ui/i18n': minor |
| 12 | +'@objectstack/cli': patch |
| 13 | +'@objectstack/cloud-connection': patch |
| 14 | +'@objectstack/objectql': patch |
| 15 | +'@objectstack/metadata-protocol': patch |
| 16 | +'@objectstack/plugin-approvals': patch |
| 17 | +'@objectstack/scenarios': patch |
| 18 | +'@objectstack/service-datasource': patch |
| 19 | +'@objectstack/service-messaging': patch |
| 20 | +'@objectstack/verify': patch |
| 21 | +'@object-ui/console': patch |
| 22 | +'@object-ui/fields': patch |
| 23 | +'@object-ui/layout': patch |
| 24 | +'@object-ui/plugin-grid': patch |
| 25 | +'@object-ui/plugin-list': patch |
| 26 | +'@object-ui/react': patch |
| 27 | +--- |
| 28 | + |
| 29 | +feat(spec)!: an action's `locations` say what it acts on, not the part of the page it sits in |
| 30 | + |
| 31 | +**BREAKING** (19.0.0): `ACTION_LOCATIONS` is `list`, `record`, `record_page`, `record_row`, `record_related`, `record_section`. The four words that named a part of a page are retired: `list_toolbar`, `list_item`, `record_header` and `record_more`. `record` is new: the action acts on one record, so it is drawn on the record page's header and in each list row's menu. Which actions are buttons and in what order stays the object's `actionLayout`. |
| 32 | + |
| 33 | +Clause-②: yes (narrowing) |
| 34 | +Metadata-protocol: narrowed |
| 35 | +Skills-docs: follow-up #37895 |
| 36 | + |
| 37 | +<!-- adr-0087: registered action-locations-acted-on --> |
| 38 | + |
| 39 | +A replacement with a registered conversion, so `yes (narrowing)` as on main's precedents (`.changeset/pre/37086-define-metadata-form-rename.md`, `.changeset/pre/37304-knowledge-source-governed-type.md`). Narrowed: the four retired words are refused wherever a location is read. Widened in the same change: the four newly accepted values `list`, `record`, `record_page` and `record_row` at the same positions; the new `@object-ui/types` export `actionFoldedIntoMenu`; and eight new `@object-ui/i18n` Studio keys for the location labels (en, zh), which replace the eight keys of the retired words. |
| 40 | + |
| 41 | +FROM → TO (each action is drawn in exactly the places it was drawn before): |
| 42 | + |
| 43 | +- `locations: ['list_toolbar']` → `locations: ['list']`. |
| 44 | +- `locations: ['list_item']` → `locations: ['record_row']`. |
| 45 | +- `locations: ['record_header']` or `['record_more']` → `locations: ['record_page']`. |
| 46 | +- `record_header` or `record_more` beside `list_item` → `locations: ['record']`. |
| 47 | +- `locations: ['record_more']` without `record_header` (the action lived only in the record header's ⋯ menu) → `locations: ['record_page'], component: 'action:menu'`. The fold is the action's `component`, the key that already sends an action into an action bar's overflow menu. |
| 48 | +- A component's single `location` (`record:quick_actions`, `action:group`, `action:bar`): `list_toolbar` → `list`, `list_item` → `record_row`, `record_header` → `record_page`. |
| 49 | + |
| 50 | +An old word is refused at authoring with the word to write instead. `os migrate meta --from 18 --write` rewrites sources (ADR-0087 conversion `action-locations-acted-on`, retired from the load path from day one, as every protocol-19 entry). Stored items (`applyConversionsToStoredItem`, `os migrate meta --stored`) and built artifacts replay the same conversion. It leaves a TODO, and changes nothing, where no lossless rewrite exists: a `record_more`-only action also on `list_toolbar` that does not already carry `component: 'action:menu'` (the list toolbar folds `action:menu` too); an action at `record_header` with an authored `component: 'action:menu'` (the record page header folded it into its ⋯ menu while a `record:quick_actions` bar at `record_header` drew it as a button, and `record_page` has one state for both); a component whose `location` is `record_more`; and an `action:group` at `record_header` with a `record_more`-only member. A site left as stored keeps its old word, which a protocol-19 runtime matches to no surface: that action or block is drawn nowhere until it is rewritten by hand. The protocol-19 upgrade guide carries the same step as the semantic entry `action-locations-page-parts-retired`. |
| 51 | + |
| 52 | +Also in this change: |
| 53 | + |
| 54 | +- `@object-ui/types`: `actionRendersAt` reads `record` as covering `record_page` and `record_row`. The new `actionFoldedIntoMenu(action)` answers whether an action is folded into the ⋯ (`component: 'action:menu'`). `arrangedHeaderActions` pins and unpins through `component` and no longer writes locations. |
| 55 | +- `@object-ui/components`: the record `page:header` routes every folded action to its ⋯ menu, and every other `record_page` action takes the inline budget, as `record_header` actions did. |
| 56 | +- `@object-ui/plugin-detail`: `record:quick_actions` defaults to `record_page` and leaves folded actions out at that location, as it left out `record_more`-only ones. The related list reads `record` as a row action. |
| 57 | +- `@object-ui/core`, `@objectstack/runtime`: the record-scoped checks (`isRecordScopedAction`, `requiresRecord`) accept `record`. |
| 58 | +- `@objectstack/lint`: the record-page header, related-list and action-layout rules read the new words. |
| 59 | +- Studio: the action inspector, the `record:quick_actions` location dropdown and the action preview offer `record` and draw the fold as "record_page · ⋯". |
| 60 | +- `@objectstack/platform-objects`, the examples and every other package: declarations and prose rewritten to the new words. The packages listed as `patch` change comments, test fixtures or authoring copy, except three that ship rewritten words: `@objectstack/plugin-approvals` and `@objectstack/service-datasource` (their declared actions' `locations`) and `@object-ui/layout` (a location literal it passes at runtime). |
| 61 | + |
| 62 | +Not moved: #37895 (the `skills/**` teaching of the new words; Blocked-by this change). |
0 commit comments