File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818
1919 let open = false ;
2020
21- $ : ({ h: hue , s: saturation , l: lightness } = stringColorToHsl (stringColor ));
21+ // Use a reactive block (not destructuring assignment) so that hue/saturation/lightness
22+ // are plain state variables, not derived. Derived values are read-only in Svelte 5 compat
23+ // and can't be updated via bind:value on the sliders.
24+ let hue = 0 ;
25+ let saturation = 100 ;
26+ let lightness = 50 ;
27+ $ : {
28+ const parsed = stringColorToHsl (stringColor );
29+ hue = parsed .h ;
30+ saturation = parsed .s ;
31+ lightness = parsed .l ;
32+ }
2233
2334 $ : hsl = ` hsl(${hue }, ${saturation }%, ${lightness }%) ` ;
2435
Original file line number Diff line number Diff line change 3737 min =" 0"
3838 max ={mode === " hue" ? 360 : 100 }
3939 bind:value
40- onchange ={onChange }
40+ oninput ={onChange }
4141 />
4242
4343 <input
Original file line number Diff line number Diff line change 1010 getAnalyzedConnectorByName ,
1111 getAnalyzedConnectors ,
1212 } from " @rilldata/web-common/features/connectors/selectors.ts" ;
13+
1314 import { Button } from " @rilldata/web-common/components/button" ;
1415 import {
1516 type AddDataConfig ,
Original file line number Diff line number Diff line change @@ -79,7 +79,9 @@ export function isExplorerType(connectorDriver: V1ConnectorDriver) {
7979}
8080
8181export function isLiveConnectorType ( connectorDriver : V1ConnectorDriver ) {
82- return ! ! connectorDriver ?. implementsOlap ;
82+ return (
83+ ! ! connectorDriver ?. implementsOlap && ! connectorDriver ?. implementsWarehouse
84+ ) ;
8385}
8486
8587const NonModelSteps = [
@@ -92,8 +94,6 @@ export function getImportStepsForConnector(
9294 config : AddDataConfig ,
9395 driver : V1ConnectorDriver ,
9496) {
95- // Live connectors cannot create models as of now.
96- // They will create metrics views directly.
9797 const steps = isLiveConnectorType ( driver ) ? NonModelSteps : FullListOfSteps ;
9898 return config . importOnly ? [ steps [ 0 ] ] : steps ;
9999}
Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ export const SOURCES = [
9191 "postgres" ,
9292 "redshift" ,
9393 "s3" ,
94+ "snowflake" ,
9495 "sqlite" ,
9596 "supabase" ,
9697 "https" ,
@@ -99,7 +100,6 @@ export const SOURCES = [
99100
100101export const OLAP_ENGINES = [
101102 "clickhouse" ,
102- "snowflake" ,
103103 "motherduck" ,
104104 "duckdb" ,
105105 "druid" ,
Original file line number Diff line number Diff line change 11import type { MultiStepFormSchema } from "./types" ;
22
3+ // TODO: Add a "Use as OLAP engine" toggle to the Snowflake form.
4+ // When enabled, set olap_connector: snowflake in rill.yaml so
5+ // isLiveConnectorType resolves true and skips DuckDB ingestion.
36export const snowflakeSchema : MultiStepFormSchema = {
47 $schema : "http://json-schema.org/draft-07/schema#" ,
58 type : "object" ,
69 title : "Snowflake" ,
7- "x-category" : "olap " ,
10+ "x-category" : "warehouse " ,
811 "x-form-height" : "tall" ,
912 properties : {
1013 auth_method : {
Original file line number Diff line number Diff line change 3737 route ,
3838 } = $page );
3939
40+ $ : onVizRoute = route .id ?.includes (" explore" ) || route .id ?.includes (" canvas" );
41+
4042 $ : ({ unsavedFiles } = fileArtifacts );
4143 $ : ({ size: unsavedFileCount } = $unsavedFiles );
4244 $ : onDeployPage = isDeployPage ($page );
102104
103105 <Tag text ={mode } color =" gray" ></Tag >
104106
105- {#if mode === " Preview" }
107+ {#if mode === " Preview" || onVizRoute }
106108 {#if $exploresQuery ?.data }
107109 <Breadcrumbs {pathParts } {currentPath } />
108110 {/if }
120122 {/if }
121123
122124 <div class =" flex gap-x-2 items-center ml-auto" >
123- {#if mode === " Preview" }
124- {#if route .id ?.includes (" explore" )}
125- <ExplorePreviewCTAs exploreName ={dashboardName } />
126- {:else if route .id ?.includes (" canvas" )}
127- <CanvasPreviewCTAs canvasName ={dashboardName } />
128- {/if }
125+ {#if route .id ?.includes (" explore" )}
126+ <ExplorePreviewCTAs exploreName ={dashboardName } />
127+ {:else if route .id ?.includes (" canvas" )}
128+ <CanvasPreviewCTAs canvasName ={dashboardName } />
129129 {:else if showDeveloperChat }
130130 <ChatToggle />
131131 {/if }
Original file line number Diff line number Diff line change 9797 $ : onDeployPage = isDeployPage ($page );
9898 $ : isPreviewMode = $previewModeStore ;
9999
100- // Preview mode from store OR (viz) route group
101- $ : mode =
102- isPreviewMode || route .id ?.includes (" (viz)" ) ? " Preview" : " Developer" ;
100+ $ : mode = isPreviewMode ? " Preview" : " Developer" ;
103101
104102 $ : shouldShowPreviewNav =
105103 isPreviewMode && showPreviewNav ($page .url .pathname ) && ! onDeployPage ;
You can’t perform that action at this time.
0 commit comments