From f63b6946ecc422c82684f2fdbcce313aad88a67f Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 23 Dec 2020 08:54:09 +0000 Subject: [PATCH 01/22] Fix empty screen list when navigating between roles --- .../ComponentsPaneSwitcher.svelte | 82 ------------------- .../design/[assetType]/_layout.svelte | 10 ++- 2 files changed, 7 insertions(+), 85 deletions(-) delete mode 100644 packages/builder/src/components/userInterface/ComponentsPaneSwitcher.svelte diff --git a/packages/builder/src/components/userInterface/ComponentsPaneSwitcher.svelte b/packages/builder/src/components/userInterface/ComponentsPaneSwitcher.svelte deleted file mode 100644 index beae2d7e3f..0000000000 --- a/packages/builder/src/components/userInterface/ComponentsPaneSwitcher.svelte +++ /dev/null @@ -1,82 +0,0 @@ - - -
- {#if $store.currentFrontEndType === FrontendTypes.LAYOUT || $allScreens.length} -
- - - -
- -
- {#if selected === PROPERTIES_TAB} - - {/if} - - {#if selected === COMPONENT_SELECTION_TAB} - - {/if} -
- {/if} -
- - diff --git a/packages/builder/src/pages/[application]/design/[assetType]/_layout.svelte b/packages/builder/src/pages/[application]/design/[assetType]/_layout.svelte index b797a18dc4..df013f2abe 100644 --- a/packages/builder/src/pages/[application]/design/[assetType]/_layout.svelte +++ b/packages/builder/src/pages/[application]/design/[assetType]/_layout.svelte @@ -1,7 +1,11 @@ -
- {#each properties as props} - onStyleChanged(styleCategory, key, value)} - props={{ ...excludeProps(props, ['control', 'label']) }} /> - {/each} -
+ {#if open} +
+ {#each properties as props} + onStyleChanged(styleCategory, key, value)} + props={{ ...excludeProps(props, ['control', 'label']) }} /> + {/each} +
+ {/if}
diff --git a/packages/client/src/utils/styleable.js b/packages/client/src/utils/styleable.js index 1953139714..4c6f8ca3b7 100644 --- a/packages/client/src/utils/styleable.js +++ b/packages/client/src/utils/styleable.js @@ -1,16 +1,17 @@ /** * Helper to build a CSS string from a style object */ -const buildStyleString = (styles, selected) => { +const buildStyleString = (styleObject, customStyles, selected) => { let str = "" - if (selected) { - styles.border = "2px solid #0055ff !important" - } - Object.entries(styles).forEach(([style, value]) => { + Object.entries(styleObject).forEach(([style, value]) => { if (style && value != null) { str += `${style}: ${value}; ` } }) + str += customStyles || "" + if (selected) { + str += ";border: 2px solid #0055ff !important;" + } return str } @@ -24,6 +25,7 @@ export const styleable = (node, styles = {}) => { // Creates event listeners and applies initial styles const setupStyles = newStyles => { const selected = newStyles.selected + const customStyles = newStyles.custom const normalStyles = newStyles.normal || {} const hoverStyles = { ...normalStyles, @@ -31,11 +33,11 @@ export const styleable = (node, styles = {}) => { } applyNormalStyles = () => { - node.style = buildStyleString(normalStyles, selected) + node.style = buildStyleString(normalStyles, customStyles, selected) } applyHoverStyles = () => { - node.style = buildStyleString(hoverStyles, selected) + node.style = buildStyleString(hoverStyles, customStyles, selected) } // Add listeners to toggle hover styles From 5867ba09ac44b7e5a168e357c5e0cb5ac9bb3ab1 Mon Sep 17 00:00:00 2001 From: Joe <49767913+joebudi@users.noreply.github.com> Date: Tue, 5 Jan 2021 11:24:28 +0000 Subject: [PATCH 05/22] Fix for: Small Typo in Data Binding textbox #962 --- .../builder/src/components/userInterface/BindingDropdown.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/userInterface/BindingDropdown.svelte b/packages/builder/src/components/userInterface/BindingDropdown.svelte index e62f76e4b7..afbad79f96 100644 --- a/packages/builder/src/components/userInterface/BindingDropdown.svelte +++ b/packages/builder/src/components/userInterface/BindingDropdown.svelte @@ -62,7 +62,7 @@