From 26c19891bb3c2dab1ed04020addff5dd75ed4a71 Mon Sep 17 00:00:00 2001 From: Dean Date: Tue, 19 Apr 2022 14:38:09 +0100 Subject: [PATCH 01/17] Unpublish refactored to stop development applications being mistakenly deleted. Minor updates to the modal content component to allow the replacement of the header. Further work to implement the publishing workflow changes --- packages/backend-core/src/context/index.js | 2 + packages/bbui/src/Modal/ModalContent.svelte | 14 +- packages/bbui/src/Popover/Popover.svelte | 5 +- packages/bbui/src/Popover/PopoverMenu.svelte | 81 +++++++++ packages/bbui/src/index.js | 1 + .../FlowChart/ResultsModal.svelte | 14 +- .../src/components/deploy/DeployModal.svelte | 87 ++++++++- .../deploy/DeploymentHistory.svelte | 37 ++-- .../builder/src/components/deploy/utils.js | 25 +++ .../src/components/start/AppRow.svelte | 53 ++++-- .../builder/app/[application]/_layout.svelte | 171 +++++++++++++++++- .../pages/builder/portal/apps/index.svelte | 5 + .../server/src/api/controllers/application.js | 18 +- .../src/api/controllers/deploy/index.js | 3 + 14 files changed, 457 insertions(+), 59 deletions(-) create mode 100644 packages/bbui/src/Popover/PopoverMenu.svelte create mode 100644 packages/builder/src/components/deploy/utils.js diff --git a/packages/backend-core/src/context/index.js b/packages/backend-core/src/context/index.js index ba9a7831db..9cb61ea8c9 100644 --- a/packages/backend-core/src/context/index.js +++ b/packages/backend-core/src/context/index.js @@ -174,9 +174,11 @@ function getDB(key, opts) { if (db && isEqual(opts, storedOpts)) { return db } + const appId = exports.getAppId() const CouchDB = getCouch() let toUseAppId + switch (key) { case ContextKeys.CURRENT_DB: toUseAppId = appId diff --git a/packages/bbui/src/Modal/ModalContent.svelte b/packages/bbui/src/Modal/ModalContent.svelte index 89c10bb625..4c608f1025 100644 --- a/packages/bbui/src/Modal/ModalContent.svelte +++ b/packages/bbui/src/Modal/ModalContent.svelte @@ -72,12 +72,20 @@ class:header-spacing={$$slots.header} > {title} + + {:else if $$slots.header} +

- {#if showDivider} - - {/if} {/if} + {#if showDivider && (title || $$slots.header)} + + {/if} +
diff --git a/packages/bbui/src/Popover/Popover.svelte b/packages/bbui/src/Popover/Popover.svelte index 6c9c6cc9a3..b7a0f08aae 100644 --- a/packages/bbui/src/Popover/Popover.svelte +++ b/packages/bbui/src/Popover/Popover.svelte @@ -11,6 +11,9 @@ export let align = "right" export let portalTarget + let clazz + export { clazz as class } + export const show = () => { dispatch("open") open = true @@ -37,7 +40,7 @@ use:positionDropdown={{ anchor, align }} use:clickOutside={hide} on:keydown={handleEscape} - class="spectrum-Popover is-open" + class={"spectrum-Popover is-open " + clazz} role="presentation" > diff --git a/packages/bbui/src/Popover/PopoverMenu.svelte b/packages/bbui/src/Popover/PopoverMenu.svelte new file mode 100644 index 0000000000..7c9d52f499 --- /dev/null +++ b/packages/bbui/src/Popover/PopoverMenu.svelte @@ -0,0 +1,81 @@ + + +
+
+ +
+ + {#if showTip} + {@html tipSvg} + {/if} + +
+
+ +
+
+
+
+ + diff --git a/packages/bbui/src/index.js b/packages/bbui/src/index.js index 2b16f32b84..6a2d3824f0 100644 --- a/packages/bbui/src/index.js +++ b/packages/bbui/src/index.js @@ -25,6 +25,7 @@ export { default as RadioGroup } from "./Form/RadioGroup.svelte" export { default as Checkbox } from "./Form/Checkbox.svelte" export { default as DetailSummary } from "./DetailSummary/DetailSummary.svelte" export { default as Popover } from "./Popover/Popover.svelte" +export { default as PopoverMenu } from "./Popover/PopoverMenu.svelte" export { default as ProgressBar } from "./ProgressBar/ProgressBar.svelte" export { default as ProgressCircle } from "./ProgressCircle/ProgressCircle.svelte" export { default as Label } from "./Label/Label.svelte" diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ResultsModal.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ResultsModal.svelte index 7dfdff20a7..7e55deb6a2 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ResultsModal.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ResultsModal.svelte @@ -10,11 +10,11 @@ -
-
+
+ Test Automation +
{#if isTrigger || testResult[0].outputs.success}
@@ -89,6 +89,14 @@ diff --git a/packages/builder/src/components/deploy/DeploymentHistory.svelte b/packages/builder/src/components/deploy/DeploymentHistory.svelte index e933142348..6b584b92e6 100644 --- a/packages/builder/src/components/deploy/DeploymentHistory.svelte +++ b/packages/builder/src/components/deploy/DeploymentHistory.svelte @@ -7,12 +7,10 @@ import { notifications } from "@budibase/bbui" import CreateWebhookDeploymentModal from "./CreateWebhookDeploymentModal.svelte" import { store } from "builderStore" - - const DeploymentStatus = { - SUCCESS: "SUCCESS", - PENDING: "PENDING", - FAILURE: "FAILURE", - } + import { + checkIncomingDeploymentStatus, + DeploymentStatus, + } from "components/deploy/utils" const DATE_OPTIONS = { fullDate: { @@ -42,30 +40,17 @@ const formatDate = (date, format) => Intl.DateTimeFormat("en-GB", DATE_OPTIONS[format]).format(date) - // Required to check any updated deployment statuses between polls - function checkIncomingDeploymentStatus(current, incoming) { - for (let incomingDeployment of incoming) { - if (incomingDeployment.status === DeploymentStatus.FAILURE) { - const currentDeployment = current.find( - deployment => deployment._id === incomingDeployment._id - ) - - // We have just been notified of an ongoing deployments failure - if ( - !currentDeployment || - currentDeployment.status === DeploymentStatus.PENDING - ) { - showErrorReasonModal(incomingDeployment.err) - } - } - } - } - async function fetchDeployments() { try { const newDeployments = await API.getAppDeployments() if (deployments.length > 0) { - checkIncomingDeploymentStatus(deployments, newDeployments) + const pendingDeployments = checkIncomingDeploymentStatus( + deployments, + newDeployments + ) + if (pendingDeployments.length) { + showErrorReasonModal(incomingDeployment.err) + } } deployments = newDeployments } catch (err) { diff --git a/packages/builder/src/components/deploy/utils.js b/packages/builder/src/components/deploy/utils.js new file mode 100644 index 0000000000..49cf7a49fa --- /dev/null +++ b/packages/builder/src/components/deploy/utils.js @@ -0,0 +1,25 @@ +export const DeploymentStatus = { + SUCCESS: "SUCCESS", + PENDING: "PENDING", + FAILURE: "FAILURE", +} + +// Required to check any updated deployment statuses between polls +export function checkIncomingDeploymentStatus(current, incoming) { + return incoming.reduce((acc, incomingDeployment) => { + if (incomingDeployment.status === DeploymentStatus.FAILURE) { + const currentDeployment = current.find( + deployment => deployment._id === incomingDeployment._id + ) + + //We have just been notified of an ongoing deployments failure + if ( + !currentDeployment || + currentDeployment.status === DeploymentStatus.PENDING + ) { + acc.push(incomingDeployment) + } + } + return acc; + }, []) +} \ No newline at end of file diff --git a/packages/builder/src/components/start/AppRow.svelte b/packages/builder/src/components/start/AppRow.svelte index d6dc4e1800..b4d73bfdc0 100644 --- a/packages/builder/src/components/start/AppRow.svelte +++ b/packages/builder/src/components/start/AppRow.svelte @@ -5,6 +5,7 @@ Icon, ActionMenu, MenuItem, + ButtonGroup, StatusLight, } from "@budibase/bbui" import { processStringSync } from "@budibase/string-templates" @@ -15,6 +16,7 @@ export let editApp export let updateApp export let deleteApp + export let previewApp export let unpublishApp export let releaseLock export let editIcon @@ -57,19 +59,36 @@
- - {#if app.deployed}Published{:else}Unpublished{/if} - +
+ {#if app.deployed} + + Published + {:else} + + Unpublished + {/if} +
- +
+ {#if app.deployed} + + {:else} + + {/if} + +
{#if app.deployed} @@ -97,6 +116,18 @@
From b3db4257f20d835d21163e8e765b74f4d6ad12af Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 25 Apr 2022 12:46:59 +0100 Subject: [PATCH 13/17] Update publish icon with normal tooltips --- .../builder/app/[application]/_layout.svelte | 38 +++++++------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/_layout.svelte index 645a2f621a..ee15226978 100644 --- a/packages/builder/src/pages/builder/app/[application]/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/_layout.svelte @@ -11,6 +11,7 @@ Layout, Button, Heading, + Body, } from "@budibase/bbui" import DeployModal from "components/deploy/DeployModal.svelte" import RevertModal from "components/deploy/RevertModal.svelte" @@ -33,7 +34,6 @@ let promise = getPackage() let unpublishModal let publishPopover - let notPublishedPopover $: enrichedApps = enrichApps($apps, $auth.user) const enrichApps = (apps, user) => { @@ -235,16 +235,17 @@
- Your app is live! -
+ Your published app + {#if isPublished} {processStringSync( - "Last Published: {{ duration time 'millisecond' }} ago", + "Last published {{ duration time 'millisecond' }} ago", { time: new Date().getTime() - @@ -252,7 +253,7 @@ } )} {/if} -
+
- +
{/if} {#if !isPublished} - -
{ - notPublishedPopover.show() - }} - on:mouseout={() => { - notPublishedPopover.hide() - }} - on:blur={() => void 0} - disabled={true} - > - -
- This app has not been published yet -
+ {/if} From 24a9656cbc7a0ca2e9882329560e865e5ae4b196 Mon Sep 17 00:00:00 2001 From: Dean Date: Tue, 26 Apr 2022 12:04:07 +0100 Subject: [PATCH 14/17] Test fixes and code review refactoring --- packages/bbui/src/Modal/ModalContent.svelte | 26 +-- packages/bbui/src/Popover/Popover.svelte | 26 ++- packages/bbui/src/Popover/PopoverMenu.svelte | 82 -------- packages/bbui/src/index.js | 1 - .../integration/appPublishWorkflow.spec.js | 14 +- .../cypress/integration/autoScreensUI.spec.js | 92 ++++----- .../integration/createAutomation.spec.js | 2 +- .../cypress/integration/createView.spec.js | 4 +- .../integration/renameAnApplication.spec.js | 2 +- .../cypress/integration/revertApp.spec.js | 6 +- .../AutomationPanel/AutomationPanel.svelte | 2 +- .../popovers/EditViewPopover.svelte | 2 +- .../src/components/deploy/DeployModal.svelte | 52 +++-- .../components/deploy/DeployNavigation.svelte | 189 ++++++++++++++++++ .../src/components/deploy/RevertModal.svelte | 7 +- .../src/components/start/AppRow.svelte | 2 +- .../builder/app/[application]/_layout.svelte | 187 +---------------- 17 files changed, 319 insertions(+), 377 deletions(-) delete mode 100644 packages/bbui/src/Popover/PopoverMenu.svelte create mode 100644 packages/builder/src/components/deploy/DeployNavigation.svelte diff --git a/packages/bbui/src/Modal/ModalContent.svelte b/packages/bbui/src/Modal/ModalContent.svelte index 830f2004ef..10cd4b10ba 100644 --- a/packages/bbui/src/Modal/ModalContent.svelte +++ b/packages/bbui/src/Modal/ModalContent.svelte @@ -67,19 +67,21 @@ data-cy={dataCy} >
-

- {#if title} - {title} - {:else if $$slots.header} - + {#if title || $$slots.header} +

+ {#if title} + {title} + {:else if $$slots.header} + + {/if} +

+ {#if showDivider} + {/if} -

- {#if showDivider && (title || $$slots.header)} - {/if} diff --git a/packages/bbui/src/Popover/Popover.svelte b/packages/bbui/src/Popover/Popover.svelte index ff59d41eff..1017ef71fc 100644 --- a/packages/bbui/src/Popover/Popover.svelte +++ b/packages/bbui/src/Popover/Popover.svelte @@ -12,8 +12,15 @@ export let portalTarget export let dataCy - let clazz - export { clazz as class } + export let direction = "bottom" + export let showTip = false + + let tipSvg = + ' ' + + $: tooltipClasses = showTip + ? `spectrum-Popover--withTip spectrum-Popover--${direction}` + : "" export const show = () => { dispatch("open") @@ -41,10 +48,14 @@ use:positionDropdown={{ anchor, align }} use:clickOutside={hide} on:keydown={handleEscape} - class={"spectrum-Popover is-open " + (clazz || "")} + class={"spectrum-Popover is-open " + (tooltipClasses || "")} role="presentation" data-cy={dataCy} > + {#if showTip} + {@html tipSvg} + {/if} +
@@ -54,4 +65,13 @@ .spectrum-Popover { min-width: var(--spectrum-global-dimension-size-2000) !important; } + .spectrum-Popover.is-open.spectrum-Popover--withTip { + margin-top: var(--spacing-xs); + margin-left: var(--spacing-xl); + } + :global(.spectrum-Popover--bottom .spectrum-Popover-tip), + :global(.spectrum-Popover--top .spectrum-Popover-tip) { + left: 90%; + margin-left: calc(var(--spectrum-global-dimension-size-150) * -1); + } diff --git a/packages/bbui/src/Popover/PopoverMenu.svelte b/packages/bbui/src/Popover/PopoverMenu.svelte deleted file mode 100644 index 11a3f4893f..0000000000 --- a/packages/bbui/src/Popover/PopoverMenu.svelte +++ /dev/null @@ -1,82 +0,0 @@ - - -
-
- -
- - {#if showTip} - {@html tipSvg} - {/if} - -
-
- -
-
-
-
- - diff --git a/packages/bbui/src/index.js b/packages/bbui/src/index.js index 6a2d3824f0..2b16f32b84 100644 --- a/packages/bbui/src/index.js +++ b/packages/bbui/src/index.js @@ -25,7 +25,6 @@ export { default as RadioGroup } from "./Form/RadioGroup.svelte" export { default as Checkbox } from "./Form/Checkbox.svelte" export { default as DetailSummary } from "./DetailSummary/DetailSummary.svelte" export { default as Popover } from "./Popover/Popover.svelte" -export { default as PopoverMenu } from "./Popover/PopoverMenu.svelte" export { default as ProgressBar } from "./ProgressBar/ProgressBar.svelte" export { default as ProgressCircle } from "./ProgressCircle/ProgressCircle.svelte" export { default as Label } from "./Label/Label.svelte" diff --git a/packages/builder/cypress/integration/appPublishWorkflow.spec.js b/packages/builder/cypress/integration/appPublishWorkflow.spec.js index efcd6c0a53..d18233e0e7 100644 --- a/packages/builder/cypress/integration/appPublishWorkflow.spec.js +++ b/packages/builder/cypress/integration/appPublishWorkflow.spec.js @@ -23,8 +23,8 @@ filterTests(['all'], () => { cy.get(".spectrum-Button").contains("Edit").click({ force: true }) }) - cy.get(".app-status-icon svg[aria-label='GlobeStrike']").should("exist") - cy.get(".app-status-icon svg[aria-label='Globe']").should("not.exist") + cy.get(".deployment-top-nav svg[aria-label='GlobeStrike']").should("exist") + cy.get(".deployment-top-nav svg[aria-label='Globe']").should("not.exist") }) it("Should publish an application and correctly reflect that", () => { @@ -61,13 +61,13 @@ filterTests(['all'], () => { cy.get(".spectrum-Button").contains("Edit").click({ force: true }) }) - cy.get(".app-status-icon svg[aria-label='Globe']").should("exist").click({ force: true }) + cy.get(".deployment-top-nav svg[aria-label='Globe']").should("exist").click({ force: true }) cy.get("[data-cy='publish-popover-menu']").should("be.visible") .within(() => { cy.get("[data-cy='publish-popover-action']").should("exist") - cy.get("button").contains("View App").should("exist") - cy.get(".publish-popover-message").should("have.text", "Last Published: a few seconds ago") + cy.get("button").contains("View app").should("exist") + cy.get(".publish-popover-message").should("have.text", "Last published a few seconds ago") }) }) @@ -89,7 +89,7 @@ filterTests(['all'], () => { }) //The published status - cy.get(".app-status-icon svg[aria-label='Globe']").should("exist") + cy.get(".deployment-top-nav svg[aria-label='Globe']").should("exist") .click({ force: true }) cy.get("[data-cy='publish-popover-menu']").should("be.visible") @@ -101,7 +101,7 @@ filterTests(['all'], () => { cy.get(".confirm-wrap button").click({ force: true } )}) - cy.get(".app-status-icon svg[aria-label='GlobeStrike']").should("exist") + cy.get(".deployment-top-nav svg[aria-label='GlobeStrike']").should("exist") cy.visit(`${Cypress.config().baseUrl}/builder`) diff --git a/packages/builder/cypress/integration/autoScreensUI.spec.js b/packages/builder/cypress/integration/autoScreensUI.spec.js index ab65e6561f..2997bd052a 100644 --- a/packages/builder/cypress/integration/autoScreensUI.spec.js +++ b/packages/builder/cypress/integration/autoScreensUI.spec.js @@ -1,51 +1,51 @@ import filterTests from "../support/filterTests" filterTests(['smoke', 'all'], () => { - context("Auto Screens UI", () => { - before(() => { - cy.login() - cy.createTestApp() - }) - - it("should generate internal table screens", () => { - // Create autogenerated screens from the internal table - cy.createAutogeneratedScreens(["Cypress Tests"]) - // Confirm screens have been auto generated - cy.get(".nav-items-container").contains("cypress-tests").click({ force: true }) - cy.get(".nav-items-container").should('contain', 'cypress-tests/:id') - .and('contain', 'cypress-tests/new/row') - }) - - it("should generate multiple internal table screens at once", () => { - // Create a second internal table - const initialTable = "Cypress Tests" - const secondTable = "Table Two" - cy.createTable(secondTable) - // Create autogenerated screens from the internal tables - cy.createAutogeneratedScreens([initialTable, secondTable]) - // Confirm screens have been auto generated - cy.get(".nav-items-container").contains("cypress-tests").click({ force: true }) - // Previously generated tables are suffixed with numbers - as expected - cy.get(".nav-items-container").should('contain', 'cypress-tests-2/:id') - .and('contain', 'cypress-tests-2/new/row') - cy.get(".nav-items-container").contains("table-two").click() - cy.get(".nav-items-container").should('contain', 'table-two/:id') - .and('contain', 'table-two/new/row') - }) - - if (Cypress.env("TEST_ENV")) { - it("should generate data source screens", () => { - // Using MySQL data source for testing this - const datasource = "MySQL" - // Select & configure MySQL data source - cy.selectExternalDatasource(datasource) - cy.addDatasourceConfig(datasource) - // Create autogenerated screens from a MySQL table - MySQL contains books table - cy.createAutogeneratedScreens(["books"]) - cy.get(".nav-items-container").contains("books").click() - cy.get(".nav-items-container").should('contain', 'books/:id') - .and('contain', 'books/new/row') - }) - } + context("Auto Screens UI", () => { + before(() => { + cy.login() + cy.createTestApp() }) + + it("should generate internal table screens", () => { + // Create autogenerated screens from the internal table + cy.createAutogeneratedScreens(["Cypress Tests"]) + // Confirm screens have been auto generated + cy.get(".nav-items-container").contains("cypress-tests").click({ force: true }) + cy.get(".nav-items-container").should('contain', 'cypress-tests/:id') + .and('contain', 'cypress-tests/new/row') + }) + + it("should generate multiple internal table screens at once", () => { + // Create a second internal table + const initialTable = "Cypress Tests" + const secondTable = "Table Two" + cy.createTable(secondTable) + // Create autogenerated screens from the internal tables + cy.createAutogeneratedScreens([initialTable, secondTable]) + // Confirm screens have been auto generated + cy.get(".nav-items-container").contains("cypress-tests").click({ force: true }) + // Previously generated tables are suffixed with numbers - as expected + cy.get(".nav-items-container").should('contain', 'cypress-tests-2/:id') + .and('contain', 'cypress-tests-2/new/row') + cy.get(".nav-items-container").contains("table-two").click() + cy.get(".nav-items-container").should('contain', 'table-two/:id') + .and('contain', 'table-two/new/row') + }) + + if (Cypress.env("TEST_ENV")) { + it("should generate data source screens", () => { + // Using MySQL data source for testing this + const datasource = "MySQL" + // Select & configure MySQL data source + cy.selectExternalDatasource(datasource) + cy.addDatasourceConfig(datasource) + // Create autogenerated screens from a MySQL table - MySQL contains books table + cy.createAutogeneratedScreens(["books"]) + cy.get(".nav-items-container").contains("books").click() + cy.get(".nav-items-container").should('contain', 'books/:id') + .and('contain', 'books/new/row') + }) + } + }) }) diff --git a/packages/builder/cypress/integration/createAutomation.spec.js b/packages/builder/cypress/integration/createAutomation.spec.js index ff8065f544..69ef3f98a3 100644 --- a/packages/builder/cypress/integration/createAutomation.spec.js +++ b/packages/builder/cypress/integration/createAutomation.spec.js @@ -11,7 +11,7 @@ filterTests(['smoke', 'all'], () => { cy.createTestTableWithData() cy.wait(2000) cy.contains("Automate").click() - cy.get("[data-cy='new-screen'] > .spectrum-Icon").click() + cy.get(".add-button .spectrum-Icon").click() cy.get(".modal-inner-wrapper").within(() => { cy.get("input").type("Add Row") cy.contains("Row Created").click({ force: true }) diff --git a/packages/builder/cypress/integration/createView.spec.js b/packages/builder/cypress/integration/createView.spec.js index a8c3b03cee..feaf1c3b5f 100644 --- a/packages/builder/cypress/integration/createView.spec.js +++ b/packages/builder/cypress/integration/createView.spec.js @@ -125,7 +125,7 @@ filterTests(['smoke', 'all'], () => { it("renames a view", () => { cy.contains(".nav-item", "Test View") - .find(".actions .icon") + .find(".actions .icon.open-popover") .click({ force: true }) cy.get(".spectrum-Menu-itemLabel").contains("Edit").click() cy.get(".modal-inner-wrapper").within(() => { @@ -138,7 +138,7 @@ filterTests(['smoke', 'all'], () => { it("deletes a view", () => { cy.contains(".nav-item", "Test View Updated") - .find(".actions .icon") + .find(".actions .icon.open-popover") .click({ force: true }) cy.contains("Delete").click() cy.contains("Delete View").click() diff --git a/packages/builder/cypress/integration/renameAnApplication.spec.js b/packages/builder/cypress/integration/renameAnApplication.spec.js index 73e682cce0..120c0d54d7 100644 --- a/packages/builder/cypress/integration/renameAnApplication.spec.js +++ b/packages/builder/cypress/integration/renameAnApplication.spec.js @@ -99,7 +99,7 @@ filterTests(['all'], () => { cy.searchForApplication(originalName) cy.get(".appTable") .within(() => { - cy.get("[data-cy='app-row-actions-menu']").eq(0).click() + cy.get("[aria-label='More']").eq(0).click() }) // Check for when an app is published if (published == true) { diff --git a/packages/builder/cypress/integration/revertApp.spec.js b/packages/builder/cypress/integration/revertApp.spec.js index aeb1847b46..71dd93a4cf 100644 --- a/packages/builder/cypress/integration/revertApp.spec.js +++ b/packages/builder/cypress/integration/revertApp.spec.js @@ -10,7 +10,7 @@ filterTests(['smoke', 'all'], () => { it("should try to revert an unpublished app", () => { // Click revert icon cy.get(".toprightnav").within(() => { - cy.get("[data-cy='revert-application-topnav']").click({ force: true }) + cy.get("[aria-label='Revert']").click({ force: true }) }) cy.get(".spectrum-Dialog-grid").within(() => { // Enter app name before revert @@ -41,7 +41,7 @@ filterTests(['smoke', 'all'], () => { cy.addComponent("Elements", "Button") // Click Revert cy.get(".toprightnav").within(() => { - cy.get("[data-cy='revert-application-topnav']").click({ force: true }) + cy.get("[aria-label='Revert']").click({ force: true }) }) cy.get(".spectrum-Dialog-grid").within(() => { // Click Revert @@ -58,7 +58,7 @@ filterTests(['smoke', 'all'], () => { it("should enter incorrect app name when reverting", () => { // Click Revert cy.get(".toprightnav").within(() => { - cy.get("[data-cy='revert-application-topnav']").click({ force: true }) + cy.get("[aria-label='Revert']").click({ force: true }) }) // Enter incorrect app name cy.get(".spectrum-Dialog-grid").within(() => { diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte b/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte index 2c67a3966c..2f57767863 100644 --- a/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte +++ b/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte @@ -16,7 +16,7 @@ -
+
diff --git a/packages/builder/src/components/backend/TableNavigator/popovers/EditViewPopover.svelte b/packages/builder/src/components/backend/TableNavigator/popovers/EditViewPopover.svelte index 0ab5d4326f..6eba5070fc 100644 --- a/packages/builder/src/components/backend/TableNavigator/popovers/EditViewPopover.svelte +++ b/packages/builder/src/components/backend/TableNavigator/popovers/EditViewPopover.svelte @@ -40,7 +40,7 @@ -
+
Edit diff --git a/packages/builder/src/components/deploy/DeployModal.svelte b/packages/builder/src/components/deploy/DeployModal.svelte index ffda399440..0d9bfb7539 100644 --- a/packages/builder/src/components/deploy/DeployModal.svelte +++ b/packages/builder/src/components/deploy/DeployModal.svelte @@ -96,33 +96,31 @@ - - - -
- - - - App Published! -
- -
-
-
+ + +
+ + + + App Published! +
+ +
+
diff --git a/packages/builder/src/components/deploy/RevertModal.svelte b/packages/builder/src/components/deploy/RevertModal.svelte index fabd97fbca..717c55f05e 100644 --- a/packages/builder/src/components/deploy/RevertModal.svelte +++ b/packages/builder/src/components/deploy/RevertModal.svelte @@ -28,12 +28,7 @@ } - +
- + {#if app.lockedYou} releaseLock(app)} icon="LockOpen"> Release lock diff --git a/packages/builder/src/pages/builder/app/[application]/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/_layout.svelte index ee15226978..ebe5e32653 100644 --- a/packages/builder/src/pages/builder/app/[application]/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/_layout.svelte @@ -1,67 +1,22 @@ {#await promise} @@ -223,84 +112,16 @@ - - {#if isPublished} - -
- -
- - Your published app - - {#if isPublished} - {processStringSync( - "Last published {{ duration time 'millisecond' }} ago", - { - time: - new Date().getTime() - - new Date(latestDeployments[0].updatedAt).getTime(), - } - )} - {/if} - -
- - -
-
-
- {/if} - - {#if !isPublished} - - {/if} - - +
- - Are you sure you want to unpublish the app {selectedApp?.name}? -
{:catch error}

Something went wrong: {error.message}

{/await}