-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtask-workbench.page.ts
More file actions
70 lines (62 loc) · 2.38 KB
/
Copy pathtask-workbench.page.ts
File metadata and controls
70 lines (62 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
import type { Page } from '@objectstack/spec/ui';
/**
* Task Workbench — the canonical **interface page** example (ADR-0047).
*
* Demonstrates the second run mode for object UI: where the object nav
* entry ("Tasks") shows every list view as switcher tabs and lets users
* create their own views (data mode), this page is an author-curated
* surface (interface mode):
*
* • it REFERENCES the object's default list view (`sourceView` —
* columns/filter/sort are inherited, never restated here);
* • end users get exactly the quick filters the author enabled
* (status + priority dropdowns) — nothing else;
* • the visualization is locked to grid (no switcher);
* • view creation / advanced filtering are not offered.
*
* Mirrors Airtable's Interfaces right panel: Data (source), User filters
* (Elements: dropdowns), Appearance (Visualizations), User actions.
*/
export const TaskWorkbenchPage: Page = {
name: 'showcase_task_workbench',
label: 'Task Workbench',
type: 'list',
object: 'showcase_task',
kind: 'full',
template: 'default',
isDefault: false,
// Interface pages carry no regions — the list surface is generated from
// `interfaceConfig` (ADR-0047), not composed from components.
regions: [],
interfaceConfig: {
source: 'showcase_task',
// ADR-0047 (revised): the page defines its own columns directly — no
// inheriting from a separate view.
columns: ['title', 'project', 'assignee', 'status', 'priority', 'estimate_hours'],
// End-user quick filters — the only filtering surface on this page.
userFilters: {
element: 'dropdown',
fields: [
{ field: 'status' },
{ field: 'priority', showCount: true },
],
},
// Locked visualization: a single-entry whitelist renders no switcher.
appearance: {
showDescription: true,
allowedVisualizations: ['grid'],
},
userActions: {
sort: true,
search: true,
filter: false, // no advanced filter builder on a curated page
rowHeight: false,
addRecordForm: false,
},
// Toolbar buttons ARE object actions (ADR-0047) — referenced by name from
// the showcase_task object's ActionSchema, not free text.
buttons: ['showcase_bulk_reassign', 'showcase_mark_done'],
showRecordCount: true,
},
};