Skip to content

Commit c0dcc67

Browse files
os-zhuangclaude
andauthored
docs(showcase): reorganize pages by authoring model for teaching (Start Here + kind-grouped nav) (#2498)
Page `kind` keeps iterating (full/slotted · html · react), but the showcase had no map: 29 pages in one flat "Pages" group, 6 overlapping react pages, 1 html page, and nowhere that teaches WHICH kind fits WHICH scenario. Reorganize the showcase to teach the decision. - New **Start Here** default landing (`examples/.../start-here.page.ts`): a `kind:'html'` teaching index — two-axis model (type × kind), a decision tree (catalogue→full/slotted · custom layout→html · interactivity→react), and four cards linking to the canonical example of each. Doubles as the 2nd html example. Browser-verified: renders + cards navigate. - **Nav grouped BY KIND**: replace the flat "Pages" dump with Authoring · Structured / · Visualizations / · HTML / · React, so the authoring models are visible at a glance. Start Here pinned at the top; component-gallery loses its default flag. - **React consolidated 6 → 4**, each teaching one react-only capability: CRM Workbench · master/detail, Task Desk · drawer & modal, Account Cockpit · live rollup, Renewals Pipeline · record blocks. Drop inquiry-triage + invoice-console (their tabs/KPI patterns are covered by the kept pages and the Task Triage / structured interface pages). - Labels show the teaching point; the Start Here decision tree is the single source for "which kind when". os validate + tsc green; no Tailwind in the new html page (ADR-0065 guardrail clean). Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 077b02e commit c0dcc67

6 files changed

Lines changed: 130 additions & 246 deletions

File tree

examples/app-showcase/objectstack.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { ChartGalleryDashboard, OpsDashboard } from './src/dashboards/index.js';
2222
import { ShowcaseTaskDataset, ShowcaseProjectDataset } from './src/datasets/index.js';
2323
import { allReports } from './src/reports/index.js';
2424
import { allActions } from './src/actions/index.js';
25-
import { ComponentGalleryPage, ProjectWorkspacePage, ProjectDetailPage, TaskWorkbenchPage, TaskTriagePage, TaskBoardPage, TaskCalendarPage, TaskGalleryPage, TaskSchedulePage, TaskTimelinePage, TaskMapPage, TaskAllViewsPage, ActiveProjectsPage, TaskDetailPage, AccountDetailPage, ReviewQueuePage, NewProjectWizardPage, MyWorkPage, SettingsPage, StylingGalleryPage, CommandCenterPage, CommandCenterJsxPage, CrmWorkbenchPage, InquiryTriagePage, AccountCockpitPage, InvoiceConsolePage, TaskDeskPage, PageVariablesPage, ContactFormPage, RenewalsPipelinePage } from './src/pages/index.js';
25+
import { StartHerePage, ComponentGalleryPage, ProjectWorkspacePage, ProjectDetailPage, TaskWorkbenchPage, TaskTriagePage, TaskBoardPage, TaskCalendarPage, TaskGalleryPage, TaskSchedulePage, TaskTimelinePage, TaskMapPage, TaskAllViewsPage, ActiveProjectsPage, TaskDetailPage, AccountDetailPage, ReviewQueuePage, NewProjectWizardPage, MyWorkPage, SettingsPage, StylingGalleryPage, CommandCenterPage, CommandCenterJsxPage, CrmWorkbenchPage, AccountCockpitPage, TaskDeskPage, PageVariablesPage, ContactFormPage, RenewalsPipelinePage } from './src/pages/index.js';
2626
import { allFlows } from './src/flows/index.js';
2727
import { allWebhooks } from './src/webhooks/index.js';
2828
import { allHooks } from './src/hooks/index.js';
@@ -154,7 +154,7 @@ export default defineStack({
154154
apps: [ShowcaseApp],
155155
portals: allPortals,
156156
views: [TaskViews, ProjectViews, InquiryViews, BusinessUnitViews],
157-
pages: [ComponentGalleryPage, ProjectWorkspacePage, ProjectDetailPage, TaskWorkbenchPage, TaskTriagePage, TaskBoardPage, TaskCalendarPage, TaskGalleryPage, TaskSchedulePage, TaskTimelinePage, TaskMapPage, TaskAllViewsPage, ActiveProjectsPage, TaskDetailPage, AccountDetailPage, ReviewQueuePage, NewProjectWizardPage, MyWorkPage, SettingsPage, StylingGalleryPage, CommandCenterPage, CommandCenterJsxPage, CrmWorkbenchPage, InquiryTriagePage, AccountCockpitPage, InvoiceConsolePage, TaskDeskPage, PageVariablesPage, ContactFormPage, RenewalsPipelinePage],
157+
pages: [StartHerePage, ComponentGalleryPage, ProjectWorkspacePage, ProjectDetailPage, TaskWorkbenchPage, TaskTriagePage, TaskBoardPage, TaskCalendarPage, TaskGalleryPage, TaskSchedulePage, TaskTimelinePage, TaskMapPage, TaskAllViewsPage, ActiveProjectsPage, TaskDetailPage, AccountDetailPage, ReviewQueuePage, NewProjectWizardPage, MyWorkPage, SettingsPage, StylingGalleryPage, CommandCenterPage, CommandCenterJsxPage, CrmWorkbenchPage, AccountCockpitPage, TaskDeskPage, PageVariablesPage, ContactFormPage, RenewalsPipelinePage],
158158
dashboards: [ChartGalleryDashboard, OpsDashboard],
159159
books: allBooks,
160160
datasets: [ShowcaseTaskDataset, ShowcaseProjectDataset],

examples/app-showcase/src/apps/index.ts

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,18 @@
33
import { App } from '@objectstack/spec/ui';
44

55
/**
6-
* Showcase app — navigation that links to every surface so a human can click
7-
* through the whole gallery: the data objects, the Task view gallery, the
8-
* Chart Gallery dashboard, the reports, and the component-gallery home page.
6+
* Showcase app — navigation organized to TEACH page authoring.
7+
*
8+
* "Start Here" is the default landing: it explains the two axes every page has —
9+
* `type` (the surface role) and `kind` (the authoring model) — and links to the
10+
* canonical example of each kind. The first three groups (Workspace / Data Model
11+
* / Analytics) are the app *working* like a real product. The "Authoring · *"
12+
* groups are the page-authoring gallery, split BY KIND so a learner can see
13+
* which model fits which scenario:
14+
* • Structured (full/slotted) — declarative regions, no code (the default)
15+
* • Visualizations — one list/interface page per record view-type
16+
* • HTML — constrained JSX, composed, parsed-never-executed
17+
* • React — real React, executed, interactive (trusted tier)
918
*/
1019
export const ShowcaseApp = App.create({
1120
name: 'showcase_app',
@@ -14,6 +23,7 @@ export const ShowcaseApp = App.create({
1423
branding: { primaryColor: '#7C3AED' },
1524

1625
navigation: [
26+
{ id: 'nav_start_here', type: 'page', pageName: 'showcase_start_here', label: 'Start Here', icon: 'compass' },
1727
{
1828
id: 'grp_workspace',
1929
type: 'group',
@@ -59,18 +69,12 @@ export const ShowcaseApp = App.create({
5969
],
6070
},
6171
{
62-
id: 'grp_pages',
72+
id: 'grp_auth_structured',
6373
type: 'group',
64-
label: 'Pages',
65-
icon: 'layout',
74+
label: 'Authoring · Structured',
75+
icon: 'layout-template',
6676
children: [
6777
{ id: 'nav_gallery', type: 'page', pageName: 'showcase_component_gallery', label: 'Component Gallery', icon: 'layout-template' },
68-
{ id: 'nav_command_center_jsx', type: 'page', pageName: 'showcase_command_center_jsx', label: 'Command Center (HTML)', icon: 'code' },
69-
{ id: 'nav_crm_workbench', type: 'page', pageName: 'showcase_crm_workbench', label: 'CRM Workbench (React)', icon: 'layout-dashboard' },
70-
{ id: 'nav_inquiry_triage', type: 'page', pageName: 'showcase_inquiry_triage', label: 'Inquiry Triage (React)', icon: 'inbox' },
71-
{ id: 'nav_account_cockpit', type: 'page', pageName: 'showcase_account_cockpit', label: 'Account Cockpit (React)', icon: 'satellite' },
72-
{ id: 'nav_invoice_console', type: 'page', pageName: 'showcase_invoice_console', label: 'Invoice Console (React)', icon: 'receipt' },
73-
{ id: 'nav_task_desk', type: 'page', pageName: 'showcase_task_desk', label: 'Task Desk (React)', icon: 'panel-right-open' },
7478
{ id: 'nav_styling_gallery', type: 'page', pageName: 'showcase_styling_gallery', label: 'Styling (ADR-0065)', icon: 'palette' },
7579
{ id: 'nav_page_variables', type: 'page', pageName: 'showcase_page_variables', label: 'Page Variables', icon: 'mouse-pointer-click' },
7680
{ id: 'nav_contact_form', type: 'page', pageName: 'showcase_contact_form', label: 'Contact Form', icon: 'mail-plus' },
@@ -79,6 +83,14 @@ export const ShowcaseApp = App.create({
7983
{ id: 'nav_task_workbench', type: 'page', pageName: 'showcase_task_workbench', label: 'Task Workbench', icon: 'sliders-horizontal' },
8084
{ id: 'nav_task_triage', type: 'page', pageName: 'showcase_task_triage', label: 'Task Triage (Tabs)', icon: 'layout-list' },
8185
{ id: 'nav_active_projects', type: 'page', pageName: 'showcase_active_projects', label: 'Active Projects', icon: 'folder-kanban' },
86+
],
87+
},
88+
{
89+
id: 'grp_auth_viz',
90+
type: 'group',
91+
label: 'Authoring · Visualizations',
92+
icon: 'layout-grid',
93+
children: [
8294
{ id: 'nav_task_all_views', type: 'page', pageName: 'showcase_task_all_views', label: 'All Views', icon: 'layout-grid' },
8395
{ id: 'nav_task_board', type: 'page', pageName: 'showcase_task_board', label: 'Task Board', icon: 'columns-3' },
8496
{ id: 'nav_task_calendar', type: 'page', pageName: 'showcase_task_calendar', label: 'Task Calendar', icon: 'calendar' },
@@ -88,5 +100,26 @@ export const ShowcaseApp = App.create({
88100
{ id: 'nav_task_map', type: 'page', pageName: 'showcase_task_map', label: 'Work Map', icon: 'map-pin' },
89101
],
90102
},
103+
{
104+
id: 'grp_auth_html',
105+
type: 'group',
106+
label: 'Authoring · HTML',
107+
icon: 'code',
108+
children: [
109+
{ id: 'nav_command_center_jsx', type: 'page', pageName: 'showcase_command_center_jsx', label: 'Command Center', icon: 'code' },
110+
],
111+
},
112+
{
113+
id: 'grp_auth_react',
114+
type: 'group',
115+
label: 'Authoring · React',
116+
icon: 'zap',
117+
children: [
118+
{ id: 'nav_crm_workbench', type: 'page', pageName: 'showcase_crm_workbench', label: 'CRM Workbench · master/detail', icon: 'layout-dashboard' },
119+
{ id: 'nav_task_desk', type: 'page', pageName: 'showcase_task_desk', label: 'Task Desk · drawer & modal', icon: 'panel-right-open' },
120+
{ id: 'nav_account_cockpit', type: 'page', pageName: 'showcase_account_cockpit', label: 'Account Cockpit · live rollup', icon: 'satellite' },
121+
{ id: 'nav_renewals_pipeline', type: 'page', pageName: 'showcase_renewals_pipeline', label: 'Renewals Pipeline · record blocks', icon: 'refresh-cw' },
122+
],
123+
},
91124
],
92125
});

examples/app-showcase/src/pages/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { definePage } from '@objectstack/spec/ui';
44

5+
export { StartHerePage } from './start-here.page.js';
56
export { ProjectWorkspacePage } from './project-workspace.page.js';
67
export { ProjectDetailPage } from './project-detail.page.js';
78
export { TaskWorkbenchPage } from './task-workbench.page.js';
@@ -17,9 +18,7 @@ export { StylingGalleryPage } from './styling-gallery.page.js';
1718
export { CommandCenterPage } from './command-center.page.js';
1819
export { CommandCenterJsxPage } from './command-center-jsx.page.js';
1920
export { CrmWorkbenchPage } from './crm-workbench.page.js';
20-
export { InquiryTriagePage } from './inquiry-triage.page.js';
2121
export { AccountCockpitPage } from './account-cockpit.page.js';
22-
export { InvoiceConsolePage } from './invoice-console.page.js';
2322
export { TaskDeskPage } from './task-desk.page.js';
2423
export { PageVariablesPage } from './page-variables.page.js';
2524
export { ContactFormPage } from './contact-form.page.js';
@@ -46,7 +45,7 @@ export const ComponentGalleryPage = definePage({
4645
label: 'Component Gallery',
4746
type: 'home',
4847
template: 'header-sidebar-main',
49-
isDefault: true,
48+
isDefault: false,
5049
kind: 'full',
5150
regions: [
5251
{

examples/app-showcase/src/pages/inquiry-triage.page.ts

Lines changed: 0 additions & 111 deletions
This file was deleted.

0 commit comments

Comments
 (0)