Skip to content

Commit 755dcd8

Browse files
os-zhuangclaude
andauthored
polish(app-showcase): color + sublabels on home & My Work KPI tiles (#2072)
The landing KPIs all rendered with the neutral grey icon (object-metric's default colorVariant) and an empty card bottom, which read flat. Opt them into the metric palette and add a one-line sublabel so the tiles are colorful and informative: • Home — Projects (blue), Tasks (purple), Accounts (teal), Open Tasks (amber) • My Work — Open Tasks (blue), In Review (amber), At-Risk (rose) Each gains a description (active & planned / not done / awaiting review / …) that fills the previously-empty space. Pairs with objectui #1817 (tabular-nums on the metric value). Browser-verified on :5181. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 6595b53 commit 755dcd8

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ export const ComponentGalleryPage: Page = {
6363
columns: 4,
6464
gap: 4,
6565
children: [
66-
{ type: 'object-metric', properties: { objectName: 'showcase_project', label: 'Projects', icon: 'folder-kanban', aggregate: { field: 'id', function: 'count' } } },
67-
{ type: 'object-metric', properties: { objectName: 'showcase_task', label: 'Tasks', icon: 'check-square', aggregate: { field: 'id', function: 'count' } } },
68-
{ type: 'object-metric', properties: { objectName: 'showcase_account', label: 'Accounts', icon: 'building', aggregate: { field: 'id', function: 'count' } } },
69-
{ type: 'object-metric', properties: { objectName: 'showcase_task', label: 'Open Tasks', icon: 'list-checks', aggregate: { field: 'id', function: 'count' }, filter: { status: { $ne: 'done' } } } },
66+
{ type: 'object-metric', properties: { objectName: 'showcase_project', label: 'Projects', icon: 'folder-kanban', colorVariant: 'blue', description: 'active & planned', aggregate: { field: 'id', function: 'count' } } },
67+
{ type: 'object-metric', properties: { objectName: 'showcase_task', label: 'Tasks', icon: 'check-square', colorVariant: 'purple', description: 'all states', aggregate: { field: 'id', function: 'count' } } },
68+
{ type: 'object-metric', properties: { objectName: 'showcase_account', label: 'Accounts', icon: 'building', colorVariant: 'teal', description: 'customers', aggregate: { field: 'id', function: 'count' } } },
69+
{ type: 'object-metric', properties: { objectName: 'showcase_task', label: 'Open Tasks', icon: 'list-checks', colorVariant: 'warning', description: 'not done', aggregate: { field: 'id', function: 'count' }, filter: { status: { $ne: 'done' } } } },
7070
],
7171
},
7272
},

examples/app-showcase/src/pages/my-work.page.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ export const MyWorkPage: Page = {
3636
columns: 3,
3737
gap: 4,
3838
children: [
39-
{ type: 'object-metric', properties: { objectName: 'showcase_task', label: 'Open Tasks', icon: 'list-checks', aggregate: { field: 'id', function: 'count' }, filter: { status: { $ne: 'done' } } } },
40-
{ type: 'object-metric', properties: { objectName: 'showcase_task', label: 'In Review', icon: 'eye', aggregate: { field: 'id', function: 'count' }, filter: { status: 'in_review' } } },
41-
{ type: 'object-metric', properties: { objectName: 'showcase_project', label: 'At-Risk Projects', icon: 'alert-triangle', aggregate: { field: 'id', function: 'count' }, filter: { health: 'red' } } },
39+
{ type: 'object-metric', properties: { objectName: 'showcase_task', label: 'Open Tasks', icon: 'list-checks', colorVariant: 'blue', description: 'not done', aggregate: { field: 'id', function: 'count' }, filter: { status: { $ne: 'done' } } } },
40+
{ type: 'object-metric', properties: { objectName: 'showcase_task', label: 'In Review', icon: 'eye', colorVariant: 'warning', description: 'awaiting review', aggregate: { field: 'id', function: 'count' }, filter: { status: 'in_review' } } },
41+
{ type: 'object-metric', properties: { objectName: 'showcase_project', label: 'At-Risk Projects', icon: 'alert-triangle', colorVariant: 'danger', description: 'health red', aggregate: { field: 'id', function: 'count' }, filter: { health: 'red' } } },
4242
],
4343
},
4444
},

0 commit comments

Comments
 (0)