From f04063c26b2c3ee34fdd352329280d016efcb728 Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Tue, 19 Jan 2021 13:42:49 +0100 Subject: [PATCH 1/6] retains icons design panel options while being able to change color in settings panel --- packages/standard-components/src/Icon.svelte | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/standard-components/src/Icon.svelte b/packages/standard-components/src/Icon.svelte index 643b07836a..783411cc14 100644 --- a/packages/standard-components/src/Icon.svelte +++ b/packages/standard-components/src/Icon.svelte @@ -1,15 +1,16 @@ - +
+ +
\ No newline at end of file From 4f71f70053755e597bdc4ae03ebe45ecf04061e0 Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Tue, 19 Jan 2021 14:00:15 +0100 Subject: [PATCH 2/6] switch method of applying color style --- packages/standard-components/src/Icon.svelte | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/standard-components/src/Icon.svelte b/packages/standard-components/src/Icon.svelte index 783411cc14..d175bfd6b0 100644 --- a/packages/standard-components/src/Icon.svelte +++ b/packages/standard-components/src/Icon.svelte @@ -6,11 +6,15 @@ export let icon = "" export let size = "fa-lg" - export let color = "#000" + export let color = "#f00" + $: styles = { + ...$component.styles, + normal: { + ...$component.styles.normal, + color + } +} -
- -
\ No newline at end of file + \ No newline at end of file From d4b27f7bc4d66642e47a7d95ef81f7149d3684a2 Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Tue, 19 Jan 2021 15:11:21 +0100 Subject: [PATCH 3/6] adds an empty state if there is no datasource selected. --- packages/standard-components/src/List.svelte | 25 ++++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/packages/standard-components/src/List.svelte b/packages/standard-components/src/List.svelte index 1a5638404a..f02b5e73c8 100644 --- a/packages/standard-components/src/List.svelte +++ b/packages/standard-components/src/List.svelte @@ -4,6 +4,7 @@ const { API, styleable, DataProvider } = getContext("sdk") const component = getContext("component") + console.log($component) const dataContext = getContext("data") export let datasource = [] @@ -24,9 +25,23 @@
- {#each rows as row} - - - - {/each} + {#if rows.length > 0} + {#each rows as row} + + + + {/each} + {:else} +

Feed me some data

+ {/if}
+ + \ No newline at end of file From 84450d03233321a2478342e69a8b96436f3b485e Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Tue, 19 Jan 2021 15:21:23 +0100 Subject: [PATCH 4/6] adds a empty state for no components added in the repeater --- packages/client/src/components/Component.svelte | 2 +- packages/standard-components/src/List.svelte | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/client/src/components/Component.svelte b/packages/client/src/components/Component.svelte index 23ba364dfb..7361573efd 100644 --- a/packages/client/src/components/Component.svelte +++ b/packages/client/src/components/Component.svelte @@ -29,7 +29,7 @@ $builderStore.previewType === "layout" || screenslotContext // Update component context - $: componentStore.set({ id, styles: { ...styles, id, allowSelection } }) + $: componentStore.set({ id, children: children.length, styles: { ...styles, id, allowSelection } }) // Gets the component constructor for the specified component const getComponentConstructor = component => { diff --git a/packages/standard-components/src/List.svelte b/packages/standard-components/src/List.svelte index f02b5e73c8..6c60c62c6f 100644 --- a/packages/standard-components/src/List.svelte +++ b/packages/standard-components/src/List.svelte @@ -28,7 +28,11 @@ {#if rows.length > 0} {#each rows as row} - + {#if $component.children === 0} +

Add some components to.

+ {:else} + + {/if}
{/each} {:else} From 702be7aa1e4211bcbd57968d5f832c2a58422e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Fri, 22 Jan 2021 09:59:38 +0100 Subject: [PATCH 5/6] remove log --- packages/standard-components/src/List.svelte | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/standard-components/src/List.svelte b/packages/standard-components/src/List.svelte index 6c60c62c6f..e0c0110ffd 100644 --- a/packages/standard-components/src/List.svelte +++ b/packages/standard-components/src/List.svelte @@ -4,7 +4,6 @@ const { API, styleable, DataProvider } = getContext("sdk") const component = getContext("component") - console.log($component) const dataContext = getContext("data") export let datasource = [] From a62938ee161e3826c9b087305990bcc7cbb37078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Fri, 22 Jan 2021 10:05:49 +0100 Subject: [PATCH 6/6] fix typo --- packages/standard-components/src/List.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/standard-components/src/List.svelte b/packages/standard-components/src/List.svelte index e0c0110ffd..809abf2972 100644 --- a/packages/standard-components/src/List.svelte +++ b/packages/standard-components/src/List.svelte @@ -28,7 +28,7 @@ {#each rows as row} {#if $component.children === 0} -

Add some components to.

+

Add some components too.

{:else} {/if}