Dashboard add widget: searchable command palette with ⌘P, as on flows

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 21:59:16 +02:00
co-authored by Claude Opus 5.5
parent 2cfa251036
commit 9c75d7ae13
3 changed files with 119 additions and 30 deletions
@@ -97,6 +97,30 @@ export const WIDGET_LABELS: Record<WidgetKind, string> = {
color: "Colour",
}
/** One line per type for the add palette, which searches these too. */
export const WIDGET_DESCRIPTIONS: Record<WidgetKind, string> = {
stat: "A single reading, large",
gauge: "A number against its range",
chart: "Readings over time",
markdown: "Formatted text, headings and links",
agenda: "Upcoming events from a calendar list",
notification: "The latest published title and message",
bar: "Several readings, a bar each",
icon: "An icon picked by the value it reads",
forecast: "What comes next, as a strip of columns",
clock: "Local time and date",
media: "A camera image, clip or audio",
player: "What a streamer is playing",
embed: "Another web page, framed",
button: "Sends a value when pressed",
buttons: "A grid of buttons, each its own value",
switch: "Turns something on or off",
slider: "Sets a number by dragging",
input: "Sends what is typed",
dropdown: "Picks one of a list of options",
color: "Picks a colour or brightness",
}
/** Default footprint per type, in grid units. */
export const WIDGET_SIZES: Record<WidgetKind, { w: number; h: number }> = {
stat: { w: 3, h: 2 },