From c8382596eb4f4b295c232a57875c3aac01e177c8 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 25 Aug 2021 09:53:43 +0100 Subject: [PATCH 1/3] Add size option back to forms --- packages/standard-components/manifest.json | 15 +++++++++++++++ .../src/forms/InnerForm.svelte | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/standard-components/manifest.json b/packages/standard-components/manifest.json index 95f41a85ef..f6eb99a02d 100644 --- a/packages/standard-components/manifest.json +++ b/packages/standard-components/manifest.json @@ -1725,6 +1725,21 @@ "label": "Custom" } }, + { + "type": "select", + "label": "Size", + "key": "size", + "options": [ + { + "label": "Medium", + "value": "spectrum--medium" + }, { + "label": "Large", + "value": "spectrum--large" + } + ], + "defaultValue": "spectrum--medium" + }, { "type": "boolean", "label": "Disabled", diff --git a/packages/standard-components/src/forms/InnerForm.svelte b/packages/standard-components/src/forms/InnerForm.svelte index eea2e6ebf0..b35b5bfcfa 100644 --- a/packages/standard-components/src/forms/InnerForm.svelte +++ b/packages/standard-components/src/forms/InnerForm.svelte @@ -7,6 +7,7 @@ export let dataSource export let disabled = false export let initialValues + export let size const component = getContext("component") const { styleable, API, Provider, ActionTypes } = getContext("sdk") @@ -231,7 +232,7 @@ {actions} data={{ ...$formState.values, tableId: dataSource?.tableId }} > -
+
{#if loaded} {/if} From 1733e54a25a78056ec6c7b40f97bdd8d1e319a29 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 25 Aug 2021 09:56:42 +0100 Subject: [PATCH 2/3] Add size setting back to table --- packages/standard-components/manifest.json | 16 ++++++++++++++++ .../standard-components/src/table/Table.svelte | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/packages/standard-components/manifest.json b/packages/standard-components/manifest.json index f6eb99a02d..1a8bbf5f90 100644 --- a/packages/standard-components/manifest.json +++ b/packages/standard-components/manifest.json @@ -2325,6 +2325,22 @@ "dependsOn": "dataProvider", "placeholder": "All columns" }, + { + "type": "select", + "label": "Size", + "key": "size", + "defaultValue": "spectrum--medium", + "options": [ + { + "label": "Medium", + "value": "spectrum--medium" + }, + { + "label": "Large", + "value": "spectrum--large" + } + ] + }, { "type": "boolean", "label": "Quiet", diff --git a/packages/standard-components/src/table/Table.svelte b/packages/standard-components/src/table/Table.svelte index 3620146ced..ba9f3aae97 100644 --- a/packages/standard-components/src/table/Table.svelte +++ b/packages/standard-components/src/table/Table.svelte @@ -8,6 +8,7 @@ export let showAutoColumns export let rowCount export let quiet + export let size const component = getContext("component") const { styleable } = getContext("sdk") @@ -71,7 +72,7 @@ } -
+
Date: Wed, 25 Aug 2021 09:57:53 +0100 Subject: [PATCH 3/3] Update autoscreens to have size settings again --- .../src/builderStore/store/screenTemplates/newRowScreen.js | 1 + .../src/builderStore/store/screenTemplates/rowDetailScreen.js | 1 - .../src/builderStore/store/screenTemplates/rowListScreen.js | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js b/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js index b890d42d54..c2dffef4b6 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js @@ -43,6 +43,7 @@ const createScreen = table => { tableId: table._id, type: "table", }, + size: "spectrum--medium", }) const fieldGroup = new Component("@budibase/standard-components/fieldgroup") diff --git a/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js b/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js index a1a1e17fd5..6065d938f1 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js @@ -100,7 +100,6 @@ const createScreen = table => { .instanceName("Form") .customProps({ actionType: "Update", - theme: "spectrum--lightest", size: "spectrum--medium", dataSource: { label: table.name, diff --git a/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js b/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js index ccf1fceb29..188682ed3f 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js @@ -65,6 +65,7 @@ const createScreen = table => { tableId: table._id, type: "table", }, + size: "spectrum--medium", paginate: true, limit: 8, })