Skip to content

Commit 961b511

Browse files
committed
feat: Update app kit template
1 parent eb890d2 commit 961b511

File tree

12 files changed

+4127
-504
lines changed

12 files changed

+4127
-504
lines changed

experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/App.tsx

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useAnalyticsQuery } from '@databricks/app-kit/react';
1+
import { useAnalyticsQuery, AreaChart, LineChart, RadarChart } from '@databricks/app-kit-ui/react';
22
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
33
import { Skeleton } from '@/components/ui/skeleton';
44
import type { QueryResult } from '../../shared/types';
@@ -45,15 +45,13 @@ function App() {
4545
}, []);
4646

4747
return (
48-
<div className="min-h-screen bg-gradient-to-br from-slate-50 to-slate-100 dark:from-slate-900 dark:to-slate-800 flex flex-col items-center justify-center p-4">
48+
<div className="min-h-screen bg-background flex flex-col items-center justify-center p-4 w-full">
4949
<div className="mb-8 text-center">
50-
<h1 className="text-4xl font-bold mb-2 bg-gradient-to-r from-slate-900 to-slate-700 dark:from-slate-100 dark:to-slate-300 bg-clip-text text-transparent">
51-
Minimal Databricks App
52-
</h1>
50+
<h1 className="text-4xl font-bold mb-2 text-foreground">Minimal Databricks App</h1>
5351
<p className="text-lg text-muted-foreground max-w-md">A minimal Databricks App powered by Databricks AppKit</p>
5452
</div>
5553

56-
<div className="flex flex-col gap-6 w-full max-w-md">
54+
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 w-full max-w-7xl">
5755
<Card className="shadow-lg">
5856
<CardHeader>
5957
<CardTitle>SQL Query Result</CardTitle>
@@ -69,9 +67,7 @@ function App() {
6967
{data && data.length > 0 && (
7068
<div className="space-y-2">
7169
<div className="text-sm text-muted-foreground">Query: SELECT :message AS value</div>
72-
<div className="text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent">
73-
{data[0].value}
74-
</div>
70+
<div className="text-2xl font-bold text-primary">{data[0].value}</div>
7571
</div>
7672
)}
7773
{data && data.length === 0 && <div className="text-muted-foreground">No results</div>}
@@ -95,10 +91,8 @@ function App() {
9591
{health && (
9692
<div className="space-y-2">
9793
<div className="flex items-center gap-2">
98-
<div className="w-2 h-2 rounded-full bg-green-500 animate-pulse"></div>
99-
<div className="text-lg font-semibold text-green-600 dark:text-green-400">
100-
{health.status.toUpperCase()}
101-
</div>
94+
<div className="w-2 h-2 rounded-full bg-[hsl(var(--success))] animate-pulse"></div>
95+
<div className="text-lg font-semibold text-[hsl(var(--success))]">{health.status.toUpperCase()}</div>
10296
</div>
10397
<div className="text-sm text-muted-foreground">
10498
Last checked: {new Date(health.timestamp).toLocaleString()}
@@ -108,6 +102,31 @@ function App() {
108102
</CardContent>
109103
</Card>
110104

105+
<Card className="shadow-lg flex min-w-0">
106+
<CardHeader>
107+
<CardTitle>Sales Trend Area Chart</CardTitle>
108+
</CardHeader>
109+
<CardContent>
110+
<AreaChart queryKey="mocked_sales" parameters={{}} />
111+
</CardContent>
112+
</Card>
113+
<Card className="shadow-lg flex min-w-0">
114+
<CardHeader>
115+
<CardTitle>Sales Trend Line Chart</CardTitle>
116+
</CardHeader>
117+
<CardContent>
118+
<LineChart queryKey="mocked_sales" parameters={{}} />
119+
</CardContent>
120+
</Card>
121+
<Card className="shadow-lg flex min-w-0">
122+
<CardHeader>
123+
<CardTitle>Sales Trend Line Chart</CardTitle>
124+
</CardHeader>
125+
<CardContent>
126+
<RadarChart queryKey="mocked_sales" parameters={{}} />
127+
</CardContent>
128+
</Card>
129+
111130
<Card className="shadow-lg">
112131
<CardHeader>
113132
<CardTitle>Model Query Demo</CardTitle>
@@ -116,7 +135,7 @@ function App() {
116135
{modelLoading && (
117136
<div className="space-y-2">
118137
<Skeleton className="h-4 w-48" />
119-
<div className="bg-slate-100 dark:bg-slate-800 p-3 rounded-md border border-slate-200 dark:border-slate-700 space-y-2">
138+
<div className="bg-muted p-3 rounded-md border border-border space-y-2">
120139
<Skeleton className="h-4 w-full" />
121140
<Skeleton className="h-4 w-5/6" />
122141
<Skeleton className="h-4 w-4/6" />
@@ -127,9 +146,7 @@ function App() {
127146
{modelResponse && (
128147
<div className="space-y-2">
129148
<div className="text-sm text-muted-foreground">Prompt: &quot;How are you today?&quot;</div>
130-
<div className="text-base bg-slate-100 dark:bg-slate-800 p-3 rounded-md border border-slate-200 dark:border-slate-700">
131-
{modelResponse}
132-
</div>
149+
<div className="text-base bg-muted p-3 rounded-md border border-border">{modelResponse}</div>
133150
</div>
134151
)}
135152
</CardContent>

0 commit comments

Comments
 (0)