From 471a5838a340f927bad256946f5340ca88be233b Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 31 Aug 2023 08:50:06 +0100 Subject: [PATCH 1/3] Ensure null IDs are pruned from draggable list to avoid crashing --- .../settings/controls/DraggableList.svelte | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/builder/src/components/design/settings/controls/DraggableList.svelte b/packages/builder/src/components/design/settings/controls/DraggableList.svelte index b1f0e83654..c8395b2a1f 100644 --- a/packages/builder/src/components/design/settings/controls/DraggableList.svelte +++ b/packages/builder/src/components/design/settings/controls/DraggableList.svelte @@ -33,17 +33,19 @@ let anchors = {} let draggableItems = [] - const buildDragable = items => { - return items.map(item => { - return { - id: listItemKey ? item[listItemKey] : generate(), - item, - } - }) + const buildDraggable = items => { + return items + .map(item => { + return { + id: listItemKey ? item[listItemKey] : generate(), + item, + } + }) + .filter(item => item.id) } $: if (items) { - draggableItems = buildDragable(items) + draggableItems = buildDraggable(items) } const updateRowOrder = e => { From 8c889b873ca33944b5cb3203888adba1afa6f136 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 31 Aug 2023 08:50:36 +0100 Subject: [PATCH 2/3] Filter out invalid fields from fieldconfiguration (we don't allow formula and nested JSON fields in forms) --- .../controls/FieldConfiguration/FieldConfiguration.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldConfiguration.svelte b/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldConfiguration.svelte index 255f46ec7b..f12e8d27ae 100644 --- a/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldConfiguration.svelte +++ b/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldConfiguration.svelte @@ -99,6 +99,9 @@ } const type = getComponentForField(instance.field, schema) + if (!type) { + return null + } instance._component = `@budibase/standard-components/${type}` const pseudoComponentInstance = store.actions.components.createInstance( @@ -116,7 +119,9 @@ } $: if (sanitisedFields) { - fieldList = [...sanitisedFields, ...unconfigured].map(buildSudoInstance) + fieldList = [...sanitisedFields, ...unconfigured] + .map(buildSudoInstance) + .filter(x => x != null) } const processItemUpdate = e => { From d47bb4f191e3de3dc8cbd403def6e1bbb384b191 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 1 Sep 2023 10:07:37 +0100 Subject: [PATCH 3/3] Show tooltip when initially applying filters to a table --- packages/bbui/src/Tooltip/TempTooltip.svelte | 2 +- .../buttons/grid/GridCreateViewButton.svelte | 22 ++++++++++++++----- .../modals/grid/GridCreateViewModal.svelte | 6 ++--- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/packages/bbui/src/Tooltip/TempTooltip.svelte b/packages/bbui/src/Tooltip/TempTooltip.svelte index 0d590b1ec6..6da01a2bfc 100644 --- a/packages/bbui/src/Tooltip/TempTooltip.svelte +++ b/packages/bbui/src/Tooltip/TempTooltip.svelte @@ -4,7 +4,7 @@ export let text = null export let condition = true - export let duration = 3000 + export let duration = 5000 export let position export let type diff --git a/packages/builder/src/components/backend/DataTable/buttons/grid/GridCreateViewButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/grid/GridCreateViewButton.svelte index 3244ce3277..3441d8de17 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/grid/GridCreateViewButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/grid/GridCreateViewButton.svelte @@ -1,18 +1,30 @@ - - Add view - + + + Create view + + diff --git a/packages/builder/src/components/backend/DataTable/modals/grid/GridCreateViewModal.svelte b/packages/builder/src/components/backend/DataTable/modals/grid/GridCreateViewModal.svelte index f698a8cb97..2f96a3d82a 100644 --- a/packages/builder/src/components/backend/DataTable/modals/grid/GridCreateViewModal.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/grid/GridCreateViewModal.svelte @@ -46,13 +46,13 @@