Skip to content

Commit dbc749e

Browse files
os-zhuangclaude
andauthored
feat(app-showcase): task default list switches across every record visualization (#2048)
The object's default "All Tasks" list is now the showcase's "switch every view" case (Airtable Visualizations parity): the SAME task records re-shaped on demand through the toolbar visualization switcher. Adds the per-visualization binding blocks to the default list so each type resolves and renders, and widens the appearance.allowedVisualizations whitelist: grid · kanban (by status) · gallery · calendar (due_date) · timeline (created_at) · gantt (start→end) Seed data already carries status / due_date / created_at / start_date / end_date / progress / location, so every one of the six renders with real content. Scope note: map and chart are intentionally NOT in this switcher — • map needs a spec MapConfigSchema the ListViewSchema doesn't yet expose, and the runtime switcher only offers map when options.map.locationField resolves (no field inference); map stays as its own `listViews.map` named view. • chart aggregates a dataset (not records), so it's a named view + dashboard element, not a record-list visualization. Verified in the browser against the live showcase backend: switching the default list to Kanban / Gallery / Calendar / Timeline / Gantt each renders the 10 task records correctly (board columns, card grid, month calendar, time buckets, gantt bars); the switcher offers exactly those six. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent a8e4f3b commit dbc749e

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

examples/app-showcase/src/views/task.view.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,26 @@ export const TaskViews = defineView({
3535
// ADR-0047 — runtime visualization whitelist (Airtable "Appearance →
3636
// Visualizations"). Rendered as a compact dropdown in the toolbar's
3737
// right cluster; types whose bindings don't resolve are hidden by the
38-
// client regardless.
38+
// client regardless. This default list is the showcase's "switch every
39+
// view" case: the SAME records re-shaped into each record-based
40+
// visualization (chart is excluded — it aggregates a dataset, not records,
41+
// and lives as its own named view + dashboard element).
3942
appearance: {
40-
allowedVisualizations: ['grid', 'kanban', 'gallery', 'calendar'],
43+
// The six record-based visualizations the spec + runtime switcher support
44+
// out of the box: the SAME task records re-shaped on demand. (map needs a
45+
// spec MapConfigSchema the ListViewSchema doesn't yet have, and chart
46+
// aggregates a dataset rather than records — both live as their own named
47+
// views below instead of in this switcher.)
48+
allowedVisualizations: ['grid', 'kanban', 'gallery', 'calendar', 'timeline', 'gantt'],
4149
},
50+
51+
// Per-visualization bindings so each type in the switcher resolves and
52+
// renders the same task records. Field names map to task.object.ts.
53+
kanban: { groupByField: 'status', summarizeField: 'estimate_hours', columns: ['title', 'assignee', 'priority'] },
54+
gallery: { coverField: 'cover', titleField: 'title', visibleFields: ['assignee', 'status', 'priority'] },
55+
calendar: { startDateField: 'due_date', titleField: 'title', colorField: 'status' },
56+
timeline: { startDateField: 'created_at', titleField: 'title', colorField: 'priority', scale: 'week' },
57+
gantt: { startDateField: 'start_date', endDateField: 'end_date', titleField: 'title', progressField: 'progress' },
4258
},
4359

4460
listViews: {

0 commit comments

Comments
 (0)