From d19d251d9dc1a19ace4d4f13052678f20d1290c2 Mon Sep 17 00:00:00 2001 From: sumit Date: Tue, 11 Aug 2026 15:44:53 +0000 Subject: [PATCH 1/2] feat(dashboards): Apple-inspired motion/materials polish, fix chart sizing/labels, add chart expand - DashboardWorkspace/DashboardsHome: translucent chrome, press feedback, spring-flavored hover/entrance transitions, reduced-motion and reduced-transparency fallbacks, refined chat trace panel with a step timeline. - DashboardArtifact: fade artifact in on load; fix a feedback loop where a CSS height transition plus a stale interval poll made dashboard height grow continuously on any reflow (e.g. page scroll). - dashboardChartLib: cap chart height regardless of container width (was inflating on wide cards); add a built-in per-chart expand-to-fullscreen control; darken/enlarge and truncate x-axis labels so long names no longer render illegible or overlap their neighbor. - dashboard-design SKILL.md: document the automatic expand control, add a named "avoid AI-slop patterns" section (gradients, emoji icons, decorative blobs, off-scale spacing/type, chart color discipline) wired into the existing self-review checklist; bump skill version to 2.1.0. --- agent/skills/dashboard-design/SKILL.md | 62 ++++- src/components/DashboardArtifact.jsx | 40 ++- src/components/dashboardChartLib.js | 229 +++++++++++----- .../sections/DashboardWorkspace.jsx | 36 ++- .../sections/DashboardWorkspace.module.css | 251 +++++++++++++++--- .../sections/DashboardsHome.module.css | 62 ++++- 6 files changed, 547 insertions(+), 133 deletions(-) diff --git a/agent/skills/dashboard-design/SKILL.md b/agent/skills/dashboard-design/SKILL.md index 273b247..6a4e4e7 100644 --- a/agent/skills/dashboard-design/SKILL.md +++ b/agent/skills/dashboard-design/SKILL.md @@ -1,7 +1,7 @@ --- name: dashboard-design description: Design and code a self-contained HTML dashboard for DeepSQL — ground on the schema, verify SQL, then write a beautiful single-file dashboard that loads data via the deepsql.query bridge. -version: 2.0.0 +version: 2.1.0 platforms: [linux, macos, windows] metadata: hermes: @@ -23,16 +23,26 @@ await deepsql.query("SELECT ...") // -> { columns: string[], rows: any[] deepsql.ready(fn) // runs fn() once the bridge is live (use this to kick off loading) // Charts — ALWAYS use these instead of hand-writing SVG. Built-in hover tooltips -// (show the value on mouse-over), number formatting, sparse axis labels, and a -// graceful "No data" empty state. Pass the deepsql.query result straight in, or -// [{label,value}] / [[label,value]]. First column = label, second = value (or -// opts.labelKey/valueKey). opts: { valueFormat(fn), height, color, emptyText }. +// (show the value on mouse-over), number formatting, sparse axis labels, a +// graceful "No data" empty state, and a corner expand button that opens the +// same chart larger in an overlay — all automatic, nothing to wire yourself. +// Pass the deepsql.query result straight in, or [{label,value}] / [[label,value]]. +// First column = label, second = value (or opts.labelKey/valueKey). +// opts: { valueFormat(fn), height, color, emptyText, title }. deepsql.charts.bar(elOrSelector, data, opts) // rankings, counts by day deepsql.charts.line(elOrSelector, data, opts) // trends over time (area+line) deepsql.charts.donut(elOrSelector, data, opts) // share/composition (with legend + %) deepsql.charts.format(n) // human number formatter ``` +**Chart sizing and the expand control are handled by the runtime — do not build your own.** +Height is fixed regardless of container width (a chart in a wide card never balloons), and every +chart already gets a corner "expand" button that opens a larger re-render in an overlay — this is +exactly the kind of per-chart chrome that's tempting to hand-roll and easy to get inconsistent +across widgets, so it's built into `deepsql.charts.*` once instead. Pass `opts.title` (the chart's +plain-business-language heading) so the expanded overlay has something to show as its title — do +not add your own zoom/expand/fullscreen button, modal, or lightbox; one already exists per chart. + Hard rules: - Inline everything — one `