From e2b81c96dca432adafe37f7840461420c4842c38 Mon Sep 17 00:00:00 2001 From: os-zhuang Date: Fri, 19 Jun 2026 21:35:03 +0800 Subject: [PATCH] feat(app-showcase): task default list switches across every record visualization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- examples/app-showcase/src/views/task.view.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/examples/app-showcase/src/views/task.view.ts b/examples/app-showcase/src/views/task.view.ts index be7c9565cc..5a326c58a7 100644 --- a/examples/app-showcase/src/views/task.view.ts +++ b/examples/app-showcase/src/views/task.view.ts @@ -35,10 +35,26 @@ export const TaskViews = defineView({ // ADR-0047 — runtime visualization whitelist (Airtable "Appearance → // Visualizations"). Rendered as a compact dropdown in the toolbar's // right cluster; types whose bindings don't resolve are hidden by the - // client regardless. + // client regardless. This default list is the showcase's "switch every + // view" case: the SAME records re-shaped into each record-based + // visualization (chart is excluded — it aggregates a dataset, not records, + // and lives as its own named view + dashboard element). appearance: { - allowedVisualizations: ['grid', 'kanban', 'gallery', 'calendar'], + // The six record-based visualizations the spec + runtime switcher support + // out of the box: the SAME task records re-shaped on demand. (map needs a + // spec MapConfigSchema the ListViewSchema doesn't yet have, and chart + // aggregates a dataset rather than records — both live as their own named + // views below instead of in this switcher.) + allowedVisualizations: ['grid', 'kanban', 'gallery', 'calendar', 'timeline', 'gantt'], }, + + // Per-visualization bindings so each type in the switcher resolves and + // renders the same task records. Field names map to task.object.ts. + kanban: { groupByField: 'status', summarizeField: 'estimate_hours', columns: ['title', 'assignee', 'priority'] }, + gallery: { coverField: 'cover', titleField: 'title', visibleFields: ['assignee', 'status', 'priority'] }, + calendar: { startDateField: 'due_date', titleField: 'title', colorField: 'status' }, + timeline: { startDateField: 'created_at', titleField: 'title', colorField: 'priority', scale: 'week' }, + gantt: { startDateField: 'start_date', endDateField: 'end_date', titleField: 'title', progressField: 'progress' }, }, listViews: {