From 2f9944aa4bc56e762bea5bbb0e0e319fef3e964c Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 18 May 2020 14:06:14 +0100 Subject: [PATCH 1/4] fix builder component library loading issue --- packages/builder/src/builderStore/store/index.js | 2 +- .../userInterface/AppPreview/CurrentItemPreview.svelte | 2 +- .../src/components/userInterface/ComponentsHierarchy.svelte | 6 +----- .../builder/src/components/userInterface/PageLayout.svelte | 5 ----- .../src/components/userInterface/StateBindingControl.svelte | 2 -- 5 files changed, 3 insertions(+), 14 deletions(-) diff --git a/packages/builder/src/builderStore/store/index.js b/packages/builder/src/builderStore/store/index.js index ae6fee5345..3c4678d3ef 100644 --- a/packages/builder/src/builderStore/store/index.js +++ b/packages/builder/src/builderStore/store/index.js @@ -93,7 +93,7 @@ const setPackage = (store, initial) => async pkg => { }, } - initial.libraries = await fetchComponentLibModules(pkg.application) + initial.libraries = pkg.application.componentLibraries; initial.components = await fetchComponentLibDefinitions(pkg.application._id) initial.appname = pkg.application.name initial.appId = pkg.application._id diff --git a/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte b/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte index 5e68f2e4f0..a1ceac9eeb 100644 --- a/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte +++ b/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte @@ -46,7 +46,7 @@ $: frontendDefinition = { appId: $store.appId, - libraries: Object.keys($store.libraries), + libraries: $store.libraries, page: $store.currentPreviewItem, screens: screensExist ? $store.currentPreviewItem._screens diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte index da4834a429..eb066175ae 100644 --- a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte +++ b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte @@ -36,11 +36,6 @@ sortBy("title"), ]) - const isScreenSelected = component => - component.component && - $store.currentPreviewItem && - component.component.name === $store.currentPreviewItem.name - const confirmDeleteComponent = component => { componentToDelete = component confirmDeleteDialog.show() @@ -54,6 +49,7 @@
+ {#each _screens as screen}
- component.component && - $store.currentPreviewItem && - component.component.name === $store.currentPreviewItem.name - const confirmDeleteComponent = async component => { componentToDelete = component confirmDeleteDialog.show() diff --git a/packages/builder/src/components/userInterface/StateBindingControl.svelte b/packages/builder/src/components/userInterface/StateBindingControl.svelte index 15ea705812..01adfeeac3 100644 --- a/packages/builder/src/components/userInterface/StateBindingControl.svelte +++ b/packages/builder/src/components/userInterface/StateBindingControl.svelte @@ -49,8 +49,6 @@ {/if} {/each} - {:else if type === 'colour'} - {:else} {/if} From 661084a97f94d65fb4518999724375a3e3e7ba67 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 18 May 2020 14:08:32 +0100 Subject: [PATCH 2/4] fixing lint errors --- packages/builder/src/builderStore/store/index.js | 7 ++----- .../components/userInterface/ComponentsHierarchy.svelte | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/builder/src/builderStore/store/index.js b/packages/builder/src/builderStore/store/index.js index 3c4678d3ef..a8315918ba 100644 --- a/packages/builder/src/builderStore/store/index.js +++ b/packages/builder/src/builderStore/store/index.js @@ -11,10 +11,7 @@ import { makePropsSafe, getBuiltin, } from "components/userInterface/pagesParsing/createProps" -import { - fetchComponentLibModules, - fetchComponentLibDefinitions, -} from "../loadComponentLibraries" +import { fetchComponentLibDefinitions } from "../loadComponentLibraries" import { buildCodeForScreens } from "../buildCodeForScreens" import { generate_screen_css } from "../generate_css" import { insertCodeMetadata } from "../insertCodeMetadata" @@ -93,7 +90,7 @@ const setPackage = (store, initial) => async pkg => { }, } - initial.libraries = pkg.application.componentLibraries; + initial.libraries = pkg.application.componentLibraries initial.components = await fetchComponentLibDefinitions(pkg.application._id) initial.appname = pkg.application.name initial.appId = pkg.application._id diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte index eb066175ae..10628b09a1 100644 --- a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte +++ b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte @@ -49,7 +49,6 @@
- {#each _screens as screen}
Date: Mon, 18 May 2020 14:36:42 +0100 Subject: [PATCH 3/4] disable brotli --- packages/server/src/api/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/server/src/api/index.js b/packages/server/src/api/index.js index 2e3cd87b45..b7d5b55b7d 100644 --- a/packages/server/src/api/index.js +++ b/packages/server/src/api/index.js @@ -30,6 +30,7 @@ router deflate: { flush: zlib.Z_SYNC_FLUSH, }, + br: false }) ) .use(async (ctx, next) => { From e21c40e6d08c447343c4dbbca70d97c2fd2324f7 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 18 May 2020 14:58:39 +0100 Subject: [PATCH 4/4] brotli lint --- packages/server/src/api/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/api/index.js b/packages/server/src/api/index.js index b7d5b55b7d..86b885bdcd 100644 --- a/packages/server/src/api/index.js +++ b/packages/server/src/api/index.js @@ -30,7 +30,7 @@ router deflate: { flush: zlib.Z_SYNC_FLUSH, }, - br: false + br: false, }) ) .use(async (ctx, next) => {