Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions .changeset/39582-object-grid-export-upgrade-note.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@objectstack/spec': patch
---

docs(spec): the `list-view-export-on-by-default` upgrade note now covers page object grids

Clause-②: no
Metadata-protocol: none

The upgrade-guide entry `list-view-export-on-by-default` used to say that an `object-grid` page component still offers export only when it declares `exportOptions`. That stopped being true in this same release. The entry now says that an `object-grid` page component that names an object reads an absent `exportOptions` the same way a list view does: it offers `csv` and `json` by default, and `xlsx` only where it lists it in `formats`. Declare `exportOptions: { formats: [] }` on it to turn its export off. A grid that names no object offers export only when it declares the block. The entry's headline and its check step now name the grid too: an `object-grid` page component that names an object has the same two off switches as a list view (`exportOptions: { formats: [] }` on it, or the object's `userActions.exportCsv: false`), and the same `allowExport` check per permission set. Only the text changed: no behaviour changes and no new upgrade entry is added.
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,29 @@ import type { SemanticMigration } from '../../types.js';
export const entry: SemanticMigration = {
id: 'list-view-export-on-by-default',
surface:
'view.exportOptions on a list view, wherever the view is declared (ABSENT — a view that never declared '
+ 'the block)',
'view.exportOptions on a list view, wherever the view is declared, and properties.exportOptions on an '
+ '`object-grid` page component that names an object (ABSENT — a view or grid that never declared the block)',
replacement:
'No action is owed to keep export: it is offered with the default formats, `csv` and `json`. To keep a view '
+ 'without export, declare `exportOptions: { formats: [] }` on it; to take export off every view of an '
+ 'object, set the object\'s `userActions.exportCsv: false`. Who may export is unchanged: the permission '
+ 'set\'s `allowExport` grant',
+ 'or an `object-grid` page component without export, declare `exportOptions: { formats: [] }` on it; to '
+ 'take export off every view and grid of an object, set the object\'s `userActions.exportCsv: false`. Who '
+ 'may export is unchanged: the permission set\'s `allowExport` grant',
reason:
'Before this release a list view offered its Export entry only when it declared `exportOptions`, so a '
+ 'view that never thought about export offered import and no export. A list now reads an absent block as '
+ 'the empty block and offers its default formats, the way a report offers its own export unasked. The '
+ 'metadata is unchanged and still parses, which is why this is registered: what an absent block means has '
+ 'changed. The permission wall is not moved. A user whose permission sets do not grant `allowExport` on '
+ 'the object is served no `export` operation and sees no Export entry, on any view; the server refuses '
+ 'the export request too. An `object-grid` page component is not changed by this entry: it still offers '
+ 'export only when it declares the block.',
+ 'the export request too. An `object-grid` page component that names an object reads an absent '
+ '`exportOptions` the same way: it offers `csv` and `json` by default, and `xlsx` only where it lists it '
+ 'in `formats`; declare `exportOptions: { formats: [] }` on it to turn its export off. A grid that names '
+ 'no object offers export only when it declares the block. The same permission wall applies to the grid: a '
+ 'user whose permission sets do not grant `allowExport` on its object sees no Export entry there either.',
acceptanceCriteria:
'Every list view that must not offer export declares `exportOptions: { formats: [] }`, or its object sets '
+ '`userActions.exportCsv: false`. Signed in as a holder of each permission set, Export is offered on a list '
+ 'exactly where that set grants `allowExport` on the object.',
'Every list view, and every `object-grid` page component that names an object, that must not offer export '
+ 'declares `exportOptions: { formats: [] }`, or its object sets `userActions.exportCsv: false`. Signed in '
+ 'as a holder of each permission set, Export is offered on a list and on such a grid exactly where that set '
+ 'grants `allowExport` on the object.',
relevantWhen: { kind: 'stack-declares', keys: ['views', 'viewItems', 'objects', 'pages'] },
};
11 changes: 8 additions & 3 deletions packages/spec/src/ui/list-view-export-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,21 @@
* {@link LIST_VIEW_EXPORT_OPTIONS_ARRAY_FORM}). The list view's published JSON
* Schema did not move with it.
*
* [#39475] What an ABSENT block means differs by carrier. A list view that
* [#39475] What an ABSENT block means is the same on both carriers, except
* on an `object-grid` that names no object. A list view that
* declares none offers its export anyway, read as the empty block — the
* default formats, every other member at its default — as a report offers
* its own unasked (maintainer ruling on #39409, option A of analysis
* 7397854343). Who may export is the permission set's `allowExport`, which
* the server folds into the object's effective `export` operation;
* `formats: []` turns a view's export off and the object's
* `userActions.exportCsv: false` every view's.
* An `object-grid` page component still offers export only when it declares
* the block.
* An `object-grid` page component that names an object reads an absent block
* the same way: it offers `csv` and `json` by default, and `xlsx` only where
* it lists it in `formats`; `exportOptions: { formats: [] }` turns its export
* off. A grid that names no object offers export only when it declares the
* block. Who may export is still the object's export verdict (the
* `allowExport` grant).
*
* [#26548] A report's export block lives here too, at the end of the module:
* {@link ReportExportOptionsSchema}, three of these five members under the
Expand Down
Loading