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
14 changes: 14 additions & 0 deletions .changeset/useractions-edit-inline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@objectstack/spec': patch
---

feat(spec): add `userActions.editInline` toggle for inline record editing

`UserActionsConfigSchema` — the shared toggle set behind both a view's toolbar
and a page's `interfaceConfig.userActions` — gains `editInline: boolean`
(default `false`, alongside `addRecordForm`). The runtime already honors it
(objectui `InterfaceListPage` reads `userActions.editInline` → `inlineEdit`),
and the metadata-admin "Interface (list pages)" panel — which auto-renders
these booleans as checkboxes — now exposes an "Edit Inline" toggle. When on,
cells edit with the field's type-aware widget (the same control the form uses).
A list stays read-only unless the author opts in.
3 changes: 3 additions & 0 deletions packages/spec/src/ui/view.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2051,6 +2051,7 @@ describe('UserActionsConfigSchema', () => {
expect(config.filter).toBe(true);
expect(config.rowHeight).toBe(true);
expect(config.addRecordForm).toBe(false);
expect(config.editInline).toBe(false);
expect(config.buttons).toBeUndefined();
});

Expand All @@ -2061,11 +2062,13 @@ describe('UserActionsConfigSchema', () => {
filter: false,
rowHeight: true,
addRecordForm: true,
editInline: true,
buttons: ['btn_export', 'btn_archive'],
});
expect(config.sort).toBe(false);
expect(config.filter).toBe(false);
expect(config.addRecordForm).toBe(true);
expect(config.editInline).toBe(true);
expect(config.buttons).toEqual(['btn_export', 'btn_archive']);
});

Expand Down
1 change: 1 addition & 0 deletions packages/spec/src/ui/view.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ export const UserActionsConfigSchema = lazySchema(() => z.object({
filter: z.boolean().default(true).describe('Allow users to filter records'),
rowHeight: z.boolean().default(true).describe('Allow users to toggle row height/density'),
addRecordForm: z.boolean().default(false).describe('Add records through a form instead of inline'),
editInline: z.boolean().default(false).describe('Allow users to edit records inline — click a cell to edit it with the field\'s type-aware widget (the same control the form uses). Off by default: the list is read-only unless the author opts in.'),
buttons: z.array(z.string()).optional().describe('Custom action button IDs to show in the toolbar'),
}).describe('User action toggles for the view toolbar'));

Expand Down