From d248060d3076cb0cb9e110dc72bff476fe6ff2b0 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 9 Nov 2020 08:32:44 +0000 Subject: [PATCH 1/4] Fix alphabetical sorting of screens --- .../src/components/userInterface/ComponentsHierarchy.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte index a9140e2978..1b1ddbb759 100644 --- a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte +++ b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte @@ -10,8 +10,8 @@ export let screens = [] - $: sortedScreens = screens.sort( - (s1, s2) => s1.props._instanceName > s2.props._instanceName + $: sortedScreens = screens.sort((s1, s2) => + s1.props._instanceName > s2.props._instanceName ? 1 : -1 ) /* Using a store here seems odd.... From 8fecebf435725b405163f63ae03426a9134b0608 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 9 Nov 2020 08:33:22 +0000 Subject: [PATCH 2/4] Fix new screens and autoscreens not displaying properly --- packages/builder/src/builderStore/store/frontend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js index ee0c98ed8d..1089e260a9 100644 --- a/packages/builder/src/builderStore/store/frontend.js +++ b/packages/builder/src/builderStore/store/frontend.js @@ -177,7 +177,7 @@ export const getFrontendStore = () => { const foundScreen = currentPageScreens.findIndex( el => el._id === screen._id ) - if (currentPageScreens !== -1) { + if (foundScreen !== -1) { currentPageScreens.splice(foundScreen, 1) } currentPageScreens.push(screen) From 2ccd8fe4014c9d7547e8913e4187cf47926748d7 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 9 Nov 2020 08:40:47 +0000 Subject: [PATCH 3/4] Fix autoscreens sometimes created in public rather than private page --- .../backend/TableNavigator/modals/CreateTableModal.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte b/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte index 0fe19f9bc0..9c42c0413e 100644 --- a/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte +++ b/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte @@ -1,5 +1,5 @@