diff --git a/web-admin/src/features/embeds/CanvasEmbed.svelte b/web-admin/src/features/embeds/CanvasEmbed.svelte index 29689e44ae7..b9873fa3682 100644 --- a/web-admin/src/features/embeds/CanvasEmbed.svelte +++ b/web-admin/src/features/embeds/CanvasEmbed.svelte @@ -9,8 +9,8 @@ export let canvasName: string; // TODO: Remove later - let columns = 12; - let gap = 4; + let columns = 20; + let gap = 1; $: canvasQuery = useResource(instanceId, canvasName, ResourceKind.Canvas); $: canvas = $canvasQuery.data?.canvas.spec; diff --git a/web-common/src/features/canvas/Canvas.svelte b/web-common/src/features/canvas/Canvas.svelte index 65c2b072e17..0636e6dd481 100644 --- a/web-common/src/features/canvas/Canvas.svelte +++ b/web-common/src/features/canvas/Canvas.svelte @@ -2,11 +2,13 @@ import CanvasDashboardPreview from "@rilldata/web-common/features/canvas/CanvasDashboardPreview.svelte"; import { getCanvasStateManagers } from "@rilldata/web-common/features/canvas/state-managers/state-managers"; import type { Vector } from "@rilldata/web-common/features/canvas/types"; + import type { FileArtifact } from "@rilldata/web-common/features/entity-management/file-artifact"; import type { V1CanvasSpec } from "@rilldata/web-common/runtime-client"; import { parseDocument } from "yaml"; - const { canvasStore, validSpecStore, fileArtifact } = - getCanvasStateManagers(); + export let fileArtifact: FileArtifact; + + const { canvasStore, validSpecStore } = getCanvasStateManagers(); $: selectedIndex = $canvasStore?.selectedComponentIndex; let showGrid = true; @@ -25,7 +27,7 @@ updateLocalContent, localContent, remoteContent, - } = $fileArtifact); + } = fileArtifact); $: spec = structuredClone($validSpecStore ?? spec); diff --git a/web-common/src/features/canvas/CanvasDashboardEmbed.svelte b/web-common/src/features/canvas/CanvasDashboardEmbed.svelte index ad754dcc587..3e804c5d7c9 100644 --- a/web-common/src/features/canvas/CanvasDashboardEmbed.svelte +++ b/web-common/src/features/canvas/CanvasDashboardEmbed.svelte @@ -1,20 +1,16 @@ + +{#if isChartComponentType(componentType)} +
+ +
+ {#each chartMetadata as chart} + + + + {chart.title} + + + {/each} +
+
+{/if} + + diff --git a/web-common/src/features/canvas/inspector/ComponentInputs.svelte b/web-common/src/features/canvas/inspector/ComponentInputs.svelte index 4d7805851d3..e3dac8c95e6 100644 --- a/web-common/src/features/canvas/inspector/ComponentInputs.svelte +++ b/web-common/src/features/canvas/inspector/ComponentInputs.svelte @@ -2,11 +2,23 @@ Maps the input params for a component to a form input. --> + + +
{#each Object.entries(inputParams) as [key, config]} {#if config.showInUI !== false} @@ -66,6 +80,21 @@ Maps the input params for a component to a form input. component.updateProperty(key, field); }} /> + {:else if config.type === "boolean"} +
+ + { + component.updateProperty(key, paramValues[key]); + }} + small + > +
{:else if config.type === "textArea"}