From 128411a61bb8bfd1814e3789661b8478528bc2f6 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 25 Apr 2023 08:58:41 +0100 Subject: [PATCH 1/7] Fix legacy delete button in edit row modal not doing anything --- .../modals/grid/GridCreateEditRowModal.svelte | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/grid/GridCreateEditRowModal.svelte b/packages/builder/src/components/backend/DataTable/modals/grid/GridCreateEditRowModal.svelte index e45ffc586e..12ca61722f 100644 --- a/packages/builder/src/components/backend/DataTable/modals/grid/GridCreateEditRowModal.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/grid/GridCreateEditRowModal.svelte @@ -1,7 +1,7 @@ - rows.actions.refreshRow(e.detail)} /> + rows.actions.refreshRow(e.detail)} + on:deleteRows={deleteRow} + /> From 45ac7d185019c284b6f434cc066dd4df5eeed3d6 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 25 Apr 2023 09:04:51 +0100 Subject: [PATCH 2/7] Add hide column option to header cell menu --- .../src/components/grid/cells/HeaderCell.svelte | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/frontend-core/src/components/grid/cells/HeaderCell.svelte b/packages/frontend-core/src/components/grid/cells/HeaderCell.svelte index 3979e1114a..165711c51f 100644 --- a/packages/frontend-core/src/components/grid/cells/HeaderCell.svelte +++ b/packages/frontend-core/src/components/grid/cells/HeaderCell.svelte @@ -93,6 +93,16 @@ columns.actions.changePrimaryDisplay(column.name) open = false } + + const hideColumn = () => { + columns.update(state => { + const index = state.findIndex(col => col.name === column.name) + state[index].visible = false + return state.slice() + }) + columns.actions.saveChanges() + open = false + }
Move right + Hide column From 6c154717781fadb4ed2ed2177e0636da94effa62 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 25 Apr 2023 09:05:00 +0100 Subject: [PATCH 3/7] Fix tab browser behaviour --- .../src/components/grid/overlays/KeyboardManager.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/frontend-core/src/components/grid/overlays/KeyboardManager.svelte b/packages/frontend-core/src/components/grid/overlays/KeyboardManager.svelte index 4b6d611757..e0e842dc16 100644 --- a/packages/frontend-core/src/components/grid/overlays/KeyboardManager.svelte +++ b/packages/frontend-core/src/components/grid/overlays/KeyboardManager.svelte @@ -46,6 +46,7 @@ } return } else if (e.key === "Tab") { + e.preventDefault() api?.blur?.() changeFocusedColumn(1) return From 6ab03289c51da248bc38af4eed5fc75387f6af76 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 25 Apr 2023 09:13:42 +0100 Subject: [PATCH 4/7] Fix checkbox not having a blur method --- .../frontend-core/src/components/grid/cells/DataCell.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend-core/src/components/grid/cells/DataCell.svelte b/packages/frontend-core/src/components/grid/cells/DataCell.svelte index f205c0a74a..5a2e02340f 100644 --- a/packages/frontend-core/src/components/grid/cells/DataCell.svelte +++ b/packages/frontend-core/src/components/grid/cells/DataCell.svelte @@ -48,8 +48,8 @@ } const cellAPI = { - focus: () => api?.focus(), - blur: () => api?.blur(), + focus: () => api?.focus?.(), + blur: () => api?.blur?.(), isActive: () => api?.isActive?.() ?? false, onKeyDown: (...params) => api?.onKeyDown(...params), isReadonly: () => readonly, From 8d21345d554633214d31b7e75e23daec0225c5fe Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 25 Apr 2023 09:22:30 +0100 Subject: [PATCH 5/7] Add sticky columns as a permanent, disabled option in hide columns buttons --- .../src/components/grid/controls/HideColumnsButton.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/frontend-core/src/components/grid/controls/HideColumnsButton.svelte b/packages/frontend-core/src/components/grid/controls/HideColumnsButton.svelte index 7d7c4664b6..1d5db3691b 100644 --- a/packages/frontend-core/src/components/grid/controls/HideColumnsButton.svelte +++ b/packages/frontend-core/src/components/grid/controls/HideColumnsButton.svelte @@ -2,7 +2,7 @@ import { getContext } from "svelte" import { ActionButton, Popover, Toggle } from "@budibase/bbui" - const { columns } = getContext("grid") + const { columns, stickyColumn } = getContext("grid") let open = false let anchor @@ -55,6 +55,10 @@
+ {#if $stickyColumn} + + {$stickyColumn.name} + {/if} {#each $columns as column} Date: Tue, 25 Apr 2023 09:23:16 +0100 Subject: [PATCH 6/7] Use friendly name where possible when configuring column visibility --- .../src/components/grid/controls/HideColumnsButton.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend-core/src/components/grid/controls/HideColumnsButton.svelte b/packages/frontend-core/src/components/grid/controls/HideColumnsButton.svelte index 1d5db3691b..30904fbebc 100644 --- a/packages/frontend-core/src/components/grid/controls/HideColumnsButton.svelte +++ b/packages/frontend-core/src/components/grid/controls/HideColumnsButton.svelte @@ -57,7 +57,7 @@
{#if $stickyColumn} - {$stickyColumn.name} + {$stickyColumn.label} {/if} {#each $columns as column} toggleVisibility(column, e.detail)} /> - {column.name} + {column.label} {/each}
From 2f97787dfb79d6c47cf8967253b654970aeadf0a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 25 Apr 2023 09:32:06 +0100 Subject: [PATCH 7/7] Fix hidden gutter cell expand icons still having a tooltip --- .../src/components/grid/cells/GutterCell.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/frontend-core/src/components/grid/cells/GutterCell.svelte b/packages/frontend-core/src/components/grid/cells/GutterCell.svelte index d7d197758d..d9fd09fb6c 100644 --- a/packages/frontend-core/src/components/grid/cells/GutterCell.svelte +++ b/packages/frontend-core/src/components/grid/cells/GutterCell.svelte @@ -113,11 +113,15 @@ } .expand { opacity: 0; - pointer-events: none; margin-right: 4px; } + .expand :global(.spectrum-Icon) { + pointer-events: none; + } .expand.visible { opacity: 1; + } + .expand.visible :global(.spectrum-Icon) { pointer-events: all; }