From bf998f6e6c35e16d0695af61d915451e3855d708 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 23 Aug 2024 12:00:19 +0100 Subject: [PATCH] Add complete generation popover with both automation and screen generation --- packages/bbui/src/List/ListItem.svelte | 13 +- .../buttons/grid/GridAutomationsButton.svelte | 3 +- .../buttons/grid/GridGenerateButton.svelte | 152 +++++++++++------- .../buttons/grid/GridRowActionsButton.svelte | 2 +- .../buttons/grid/GridScreensButton.svelte | 20 ++- .../table/[tableId]/[viewId]/index.svelte | 7 +- .../data/table/[tableId]/index.svelte | 4 +- 7 files changed, 135 insertions(+), 66 deletions(-) diff --git a/packages/bbui/src/List/ListItem.svelte b/packages/bbui/src/List/ListItem.svelte index 0c9b796f5b..341c53a190 100644 --- a/packages/bbui/src/List/ListItem.svelte +++ b/packages/bbui/src/List/ListItem.svelte @@ -6,11 +6,18 @@ export let title = null export let subtitle = null export let url = null + export let hoverable = false + export let showArrow = false - +
{#if icon} @@ -30,7 +37,9 @@
- + {#if showArrow} + + {/if}
diff --git a/packages/builder/src/components/backend/DataTable/buttons/grid/GridAutomationsButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/grid/GridAutomationsButton.svelte index 9420ca563a..3cf6da7c24 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/grid/GridAutomationsButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/grid/GridAutomationsButton.svelte @@ -34,7 +34,7 @@ const generateAutomation = () => { popover?.hide() - dispatch("generate-automation") + dispatch("request-generate") } @@ -62,6 +62,7 @@ : "var(--spectrum-global-color-green-600)"} title={automation.name} url={`/builder/app/${$appStore.appId}/automation/${automation._id}`} + showArrow /> {/each} diff --git a/packages/builder/src/components/backend/DataTable/buttons/grid/GridGenerateButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/grid/GridGenerateButton.svelte index a54b4d51e1..84ef6102ca 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/grid/GridGenerateButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/grid/GridGenerateButton.svelte @@ -1,5 +1,5 @@ - +
@@ -88,60 +98,94 @@
-