diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index 05b30da98f..79fd83875d 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -66,12 +66,14 @@ Cypress.Commands.add("createTestTableWithData", () => { Cypress.Commands.add("createTable", tableName => { // Enter model name cy.contains("Create New Table").click() - cy.get(".menu-container") - .get("input") - .first() - .type(tableName) - - cy.contains("Save").click() + cy.get(".modal").within(() => { + cy.get("input") + .first() + .type(tableName) + cy.get(".buttons") + .contains("Create") + .click() + }) cy.contains(tableName).should("be.visible") }) diff --git a/packages/builder/package.json b/packages/builder/package.json index 74bff1b6a8..c2814824db 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -63,7 +63,7 @@ } }, "dependencies": { - "@budibase/bbui": "^1.40.1", + "@budibase/bbui": "^1.41.0", "@budibase/client": "^0.1.25", "@budibase/colorpicker": "^1.0.1", "@fortawesome/fontawesome-free": "^5.14.0", diff --git a/packages/builder/src/App.svelte b/packages/builder/src/App.svelte index 0badb1012b..a5016db114 100644 --- a/packages/builder/src/App.svelte +++ b/packages/builder/src/App.svelte @@ -4,7 +4,6 @@ import { routes } from "../routify/routes" import { initialise } from "builderStore" import NotificationDisplay from "components/common/Notification/NotificationDisplay.svelte" - import { ModalContainer } from "components/common/Modal" onMount(async () => { await initialise() @@ -15,4 +14,3 @@ - diff --git a/packages/builder/src/builderStore/fetchBindableProperties.js b/packages/builder/src/builderStore/fetchBindableProperties.js index c71c498a32..92359ae630 100644 --- a/packages/builder/src/builderStore/fetchBindableProperties.js +++ b/packages/builder/src/builderStore/fetchBindableProperties.js @@ -78,6 +78,11 @@ const contextToBindables = (models, walkResult) => context => { typeof context.model === "string" ? context.model : context.model.modelId const model = models.find(model => model._id === modelId) + // Avoid crashing whenever no data source has been selected + if (model == null) { + return [] + } + const newBindable = key => ({ type: "context", instance: context.instance, diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationList/AutomationList.svelte b/packages/builder/src/components/automation/AutomationPanel/AutomationList/AutomationList.svelte index 15c42de1fa..328c0d6122 100644 --- a/packages/builder/src/components/automation/AutomationPanel/AutomationList/AutomationList.svelte +++ b/packages/builder/src/components/automation/AutomationPanel/AutomationList/AutomationList.svelte @@ -2,10 +2,9 @@ import { onMount } from "svelte" import { automationStore } from "builderStore" import CreateAutomationModal from "./CreateAutomationModal.svelte" - import { Button } from "@budibase/bbui" - import { Modal } from "components/common/Modal" + import { Button, Modal } from "@budibase/bbui" - let modalVisible = false + let modal $: selectedAutomationId = $automationStore.selectedAutomation?.automation?._id @@ -15,9 +14,7 @@
- +
    {#each $automationStore.automations as automation}
-{#if modalVisible} - -{/if} + + + diff --git a/packages/builder/src/components/common/ConfirmDialog.svelte b/packages/builder/src/components/common/ConfirmDialog.svelte index 1c702ab532..2cd27573f4 100644 --- a/packages/builder/src/components/common/ConfirmDialog.svelte +++ b/packages/builder/src/components/common/ConfirmDialog.svelte @@ -1,33 +1,27 @@ - -
{body}
+ + +
{body}
+
diff --git a/packages/builder/src/components/common/Modal/ModalContainer.svelte b/packages/builder/src/components/common/Modal/ModalContainer.svelte deleted file mode 100644 index ed6d9e15ad..0000000000 --- a/packages/builder/src/components/common/Modal/ModalContainer.svelte +++ /dev/null @@ -1,10 +0,0 @@ -