From 69f3064489c7370936c29f1ba8930f91baf93af4 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 12 Oct 2020 21:21:23 +0100 Subject: [PATCH 1/6] replace list template screen with datagrid --- .../builderStore/store/screenTemplates/recordListScreen.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/builder/src/builderStore/store/screenTemplates/recordListScreen.js b/packages/builder/src/builderStore/store/screenTemplates/recordListScreen.js index 32f4d0696b..0210e7a85e 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/recordListScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/recordListScreen.js @@ -86,7 +86,7 @@ const createScreen = model => ({ }, { _id: "", - _component: "@budibase/standard-components/datatable", + _component: "@budibase/standard-components/datagrid", _styles: { normal: {}, hover: {}, @@ -100,10 +100,6 @@ const createScreen = model => ({ modelId: model._id, isModel: true, }, - stripeColor: "", - borderColor: "", - backgroundColor: "", - color: "", _instanceName: `${model.name} Table`, _children: [], }, From bf9efc7102af02588ae2c0d05c9d49c68fad4f1e Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 12 Oct 2020 21:22:23 +0100 Subject: [PATCH 2/6] remove screen1 from dummy data --- .../appDirectoryTemplate/pages/main/page.json | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/packages/server/src/utilities/appDirectoryTemplate/pages/main/page.json b/packages/server/src/utilities/appDirectoryTemplate/pages/main/page.json index 9e2c3c8e64..916ad5d224 100644 --- a/packages/server/src/utilities/appDirectoryTemplate/pages/main/page.json +++ b/packages/server/src/utilities/appDirectoryTemplate/pages/main/page.json @@ -54,34 +54,6 @@ "_instanceId": "inst_cf8ace4_69efc0d72e6f443db2d4c902c14d9394", "_instanceName": "Home Link", "_children": [] - }, - { - "_id": "d3325634-0945-4387-8bb3-d9d9be186c1c", - "_component": "@budibase/standard-components/link", - "_styles": { - "normal": { - "font-family": "Inter", - "font-weight": "400", - "color": "#000000", - "text-decoration-line": "none", - "font-size": "16px" - }, - "hover": {}, - "active": {}, - "selected": {} - }, - "_code": "", - "url": "/screen1", - "openInNewTab": false, - "text": "Screen 1", - "color": "", - "hoverColor": "", - "underline": false, - "fontSize": "", - "fontFamily": "initial", - "_instanceId": "inst_cf8ace4_69efc0d72e6f443db2d4c902c14d9394", - "_instanceName": "Screen 1 Link", - "_children": [] } ] }, From 2f5ee277f32188aeb9c50a7c7947d6c0ed2c7ab1 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Mon, 12 Oct 2020 21:35:10 +0100 Subject: [PATCH 3/6] analytics - missing await, causing event not to be logged --- packages/builder/src/builderStore/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/builderStore/index.js b/packages/builder/src/builderStore/index.js index c040403592..101f875e96 100644 --- a/packages/builder/src/builderStore/index.js +++ b/packages/builder/src/builderStore/index.js @@ -9,7 +9,7 @@ export const automationStore = getAutomationStore() export const initialise = async () => { try { - analytics.activate() + await analytics.activate() analytics.captureEvent("Builder Started") } catch (err) { console.log(err) From 4ad2fb47d52ad8a93860c97cbc2044ba6da0c2c8 Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Tue, 13 Oct 2020 09:13:56 +0200 Subject: [PATCH 4/6] adds height option to grid component --- .../src/components/userInterface/temporaryPanelStructure.js | 6 ++++++ packages/standard-components/components.json | 3 ++- packages/standard-components/src/DataGrid/Component.svelte | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/userInterface/temporaryPanelStructure.js b/packages/builder/src/components/userInterface/temporaryPanelStructure.js index e7033f1c8e..aaac780afd 100644 --- a/packages/builder/src/components/userInterface/temporaryPanelStructure.js +++ b/packages/builder/src/components/userInterface/temporaryPanelStructure.js @@ -346,6 +346,12 @@ export default { ], placeholder: "alpine", }, + { + label: "Height", + key: "height", + defaultValue: "500", + control: Input + }, ], }, children: [], diff --git a/packages/standard-components/components.json b/packages/standard-components/components.json index 76675ac63b..4650d63e00 100644 --- a/packages/standard-components/components.json +++ b/packages/standard-components/components.json @@ -237,7 +237,8 @@ "balham-dark", "material" ] - } + }, + "height": "number" } }, "dataform": { diff --git a/packages/standard-components/src/DataGrid/Component.svelte b/packages/standard-components/src/DataGrid/Component.svelte index 01ed620a5c..727037b434 100644 --- a/packages/standard-components/src/DataGrid/Component.svelte +++ b/packages/standard-components/src/DataGrid/Component.svelte @@ -18,6 +18,7 @@ export let datasource = {} export let editable export let theme = 'alpine' + export let height; let dataLoaded = false let data @@ -110,7 +111,7 @@ href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css" /> -
+
{#if dataLoaded} {#if editable}
From 6ac9c59bbb50398d55e3d78ed0d09fd49ef68aa1 Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Tue, 13 Oct 2020 09:51:01 +0200 Subject: [PATCH 5/6] adds pagination option --- .../src/components/userInterface/temporaryPanelStructure.js | 6 ++++++ packages/standard-components/components.json | 3 ++- packages/standard-components/src/DataGrid/Component.svelte | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/userInterface/temporaryPanelStructure.js b/packages/builder/src/components/userInterface/temporaryPanelStructure.js index aaac780afd..5d60008760 100644 --- a/packages/builder/src/components/userInterface/temporaryPanelStructure.js +++ b/packages/builder/src/components/userInterface/temporaryPanelStructure.js @@ -352,6 +352,12 @@ export default { defaultValue: "500", control: Input }, + { + label: "Pagination", + key: "pagination", + valueKey: "checked", + control: Checkbox, + }, ], }, children: [], diff --git a/packages/standard-components/components.json b/packages/standard-components/components.json index 4650d63e00..8464729993 100644 --- a/packages/standard-components/components.json +++ b/packages/standard-components/components.json @@ -238,7 +238,8 @@ "material" ] }, - "height": "number" + "height": "number", + "pagination": "bool" } }, "dataform": { diff --git a/packages/standard-components/src/DataGrid/Component.svelte b/packages/standard-components/src/DataGrid/Component.svelte index 727037b434..d7cc2d2e5f 100644 --- a/packages/standard-components/src/DataGrid/Component.svelte +++ b/packages/standard-components/src/DataGrid/Component.svelte @@ -19,6 +19,7 @@ export let editable export let theme = 'alpine' export let height; + export let pagination let dataLoaded = false let data @@ -33,6 +34,8 @@ }, rowSelection: editable ? "multiple" : false, suppressRowClickSelection: !editable, + paginationAutoPageSize: true, + pagination } onMount(async () => { From 9ffde6af35b73234dbfccec32eb7eaa0b320894d Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Tue, 13 Oct 2020 09:54:10 +0200 Subject: [PATCH 6/6] lint fix --- .../src/components/userInterface/temporaryPanelStructure.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/userInterface/temporaryPanelStructure.js b/packages/builder/src/components/userInterface/temporaryPanelStructure.js index 5d60008760..50799581f8 100644 --- a/packages/builder/src/components/userInterface/temporaryPanelStructure.js +++ b/packages/builder/src/components/userInterface/temporaryPanelStructure.js @@ -350,7 +350,7 @@ export default { label: "Height", key: "height", defaultValue: "500", - control: Input + control: Input, }, { label: "Pagination",