Round dashboards: shape and ring, the ring drawn and turned in every look, Knob preset and face guide in the editor

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Melvin Strobl
2026-10-14 14:23:55 +02:00
co-authored by Claude Opus 5.5
parent f067fb60d4
commit 8b8cb5cda9
21 changed files with 1447 additions and 57 deletions
@@ -19,6 +19,20 @@ import {
const KINDS = Object.keys(WIDGET_LABELS) as WidgetKind[]
/**
* What a round face draws badly: a row of controls or text, a plot or a strip
* that wants the width a circle only has across its middle, and a page in a
* tile. Offered all the same — a soft mark, not a refusal.
*/
const POOR_ON_ROUND = new Set<WidgetKind>([
"input",
"buttons",
"chart",
"forecast",
"agenda",
"embed",
])
const GROUPS = [
["Show a value", KINDS.filter((kind) => !INPUT_WIDGETS.has(kind))],
["Control something", KINDS.filter((kind) => INPUT_WIDGETS.has(kind))],
@@ -34,6 +48,7 @@ export function DashboardPalette({
onAdd,
onSettings,
onPublish,
round,
}: {
open: boolean
onOpenChange: (open: boolean) => void
@@ -41,6 +56,8 @@ export function DashboardPalette({
onSettings: () => void
/** Absent while there is nothing to publish. */
onPublish?: () => void
/** The dashboard is round: the types that draw badly on it say so. */
round?: boolean
}) {
const navigate = useNavigate()
const { data } = useQuery({ ...dashboardsQueryOptions(), enabled: open })
@@ -79,6 +96,9 @@ export function DashboardPalette({
<span>{WIDGET_LABELS[kind]}</span>
<span className="text-xs text-muted-foreground">
{WIDGET_DESCRIPTIONS[kind]}
{round && POOR_ON_ROUND.has(kind)
? " · Poor fit for round"
: ""}
</span>
</span>
</CommandItem>