From e0ca7976f458678975fd35f845d1b5025446a3f3 Mon Sep 17 00:00:00 2001 From: Conor_Mack Date: Tue, 2 Jun 2020 15:00:24 +0100 Subject: [PATCH 1/5] Allowing auto values for inputs --- packages/builder/src/components/common/Input.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/common/Input.svelte b/packages/builder/src/components/common/Input.svelte index 49f3c356de..1dfdfa517f 100644 --- a/packages/builder/src/components/common/Input.svelte +++ b/packages/builder/src/components/common/Input.svelte @@ -14,7 +14,8 @@ function handleChange(val) { value = val - onChange(value) + let _value = value + suffix + onChange(_value) } $: displayValue = suffix && value.endsWith(suffix) ? value.replace(new RegExp(`${suffix}$`), "") : value From bb512a9bb26ee3130445b5a3dd81019c627ea68f Mon Sep 17 00:00:00 2001 From: Conor_Mack Date: Tue, 2 Jun 2020 15:00:31 +0100 Subject: [PATCH 2/5] Allowing auto values for inputs --- packages/builder/src/components/common/Input.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/common/Input.svelte b/packages/builder/src/components/common/Input.svelte index 1dfdfa517f..b3c21360c2 100644 --- a/packages/builder/src/components/common/Input.svelte +++ b/packages/builder/src/components/common/Input.svelte @@ -14,7 +14,7 @@ function handleChange(val) { value = val - let _value = value + suffix + let _value = value !== "auto" ? value + suffix : value onChange(_value) } From ef1d7587b67bf599026f5a2d439c964f79e4b47a Mon Sep 17 00:00:00 2001 From: Conor_Mack Date: Tue, 2 Jun 2020 15:09:31 +0100 Subject: [PATCH 3/5] Updating input group for auto values --- .../builder/src/components/common/Inputs/InputGroup.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/common/Inputs/InputGroup.svelte b/packages/builder/src/components/common/Inputs/InputGroup.svelte index 886d1def6f..36ebeb7d08 100644 --- a/packages/builder/src/components/common/Inputs/InputGroup.svelte +++ b/packages/builder/src/components/common/Inputs/InputGroup.svelte @@ -10,9 +10,10 @@ export let onChange = () => {} function handleChange(val, idx) { - value.splice(idx, 1, suffix ? val + suffix : val) + value.splice(idx, 1, val !== "auto" ? value + suffix : val) + value = value - let _value = value.map(v => (!v.endsWith(suffix) ? v + suffix : v)) + let _value = value.map(v => (!v.endsWith(suffix) && v !== "auto" ? v + suffix : v)) onChange(_value) } From 459f97baa5a730b9e28c981cfebad6b1e48547f6 Mon Sep 17 00:00:00 2001 From: Conor_Mack Date: Tue, 2 Jun 2020 15:26:03 +0100 Subject: [PATCH 4/5] Changing value to val in handleChange --- packages/builder/src/components/common/Inputs/InputGroup.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/common/Inputs/InputGroup.svelte b/packages/builder/src/components/common/Inputs/InputGroup.svelte index 36ebeb7d08..41f184975c 100644 --- a/packages/builder/src/components/common/Inputs/InputGroup.svelte +++ b/packages/builder/src/components/common/Inputs/InputGroup.svelte @@ -10,7 +10,7 @@ export let onChange = () => {} function handleChange(val, idx) { - value.splice(idx, 1, val !== "auto" ? value + suffix : val) + value.splice(idx, 1, val !== "auto" ? val + suffix : val) value = value let _value = value.map(v => (!v.endsWith(suffix) && v !== "auto" ? v + suffix : v)) From 0743a52587cced489e66b726512eeba089032cc0 Mon Sep 17 00:00:00 2001 From: Conor_Mack Date: Tue, 2 Jun 2020 15:42:19 +0100 Subject: [PATCH 5/5] Font Weights, Color Label and Input Widths --- .../builder/src/components/common/Inputs/InputGroup.svelte | 2 +- .../src/components/userInterface/propertyCategories.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/common/Inputs/InputGroup.svelte b/packages/builder/src/components/common/Inputs/InputGroup.svelte index 41f184975c..a1cab5a50f 100644 --- a/packages/builder/src/components/common/Inputs/InputGroup.svelte +++ b/packages/builder/src/components/common/Inputs/InputGroup.svelte @@ -27,7 +27,7 @@
{#each meta as m, i}