From fd61b191ec2cd1306dc1cdf8cb95cc60e920dbe2 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Thu, 25 Nov 2021 14:45:36 +0000 Subject: [PATCH 1/4] remove initial screen creation --- packages/server/src/api/controllers/application.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/server/src/api/controllers/application.js b/packages/server/src/api/controllers/application.js index ef2913e812..6f55834a49 100644 --- a/packages/server/src/api/controllers/application.js +++ b/packages/server/src/api/controllers/application.js @@ -15,14 +15,12 @@ const { generateAppID, getLayoutParams, getScreenParams, - generateScreenID, generateDevAppID, DocumentTypes, AppStatus, } = require("../../db/utils") const { BUILTIN_ROLE_IDS, AccessController } = require("@budibase/auth/roles") const { BASE_LAYOUTS } = require("../../constants/layouts") -const { createHomeScreen } = require("../../constants/screens") const { cloneDeep } = require("lodash/fp") const { processObject } = require("@budibase/string-templates") const { @@ -409,9 +407,5 @@ const createEmptyAppPackage = async (ctx, app) => { screensAndLayouts.push(await processObject(cloned, app)) } - const homeScreen = createHomeScreen(app) - homeScreen._id = generateScreenID() - screensAndLayouts.push(homeScreen) - await db.bulkDocs(screensAndLayouts) } From 571954c1977acc2e17fa708d3df40b491e7e76b3 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Thu, 25 Nov 2021 15:29:35 +0000 Subject: [PATCH 2/4] fix appPackage unit tests --- packages/server/src/api/routes/tests/application.spec.js | 2 -- packages/server/src/api/routes/tests/screen.spec.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/server/src/api/routes/tests/application.spec.js b/packages/server/src/api/routes/tests/application.spec.js index 05e0bc231b..ce1cb80435 100644 --- a/packages/server/src/api/routes/tests/application.spec.js +++ b/packages/server/src/api/routes/tests/application.spec.js @@ -75,7 +75,6 @@ describe("/applications", () => { .expect("Content-Type", /json/) .expect(200) // should have empty packages - expect(res.body.screens.length).toEqual(1) expect(res.body.layouts.length).toEqual(2) }) }) @@ -88,7 +87,6 @@ describe("/applications", () => { .expect("Content-Type", /json/) .expect(200) expect(res.body.application).toBeDefined() - expect(res.body.screens.length).toEqual(1) expect(res.body.layouts.length).toEqual(2) }) }) diff --git a/packages/server/src/api/routes/tests/screen.spec.js b/packages/server/src/api/routes/tests/screen.spec.js index 6a47b78853..c2d60ec006 100644 --- a/packages/server/src/api/routes/tests/screen.spec.js +++ b/packages/server/src/api/routes/tests/screen.spec.js @@ -21,7 +21,7 @@ describe("/screens", () => { .set(config.defaultHeaders()) .expect("Content-Type", /json/) .expect(200) - expect(res.body.length).toEqual(2) + expect(res.body.length).toEqual(1) expect(res.body.some(s => s._id === screen._id)).toEqual(true) }) From 7831ce223abec7b344afde0483f8d6493388361d Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Thu, 25 Nov 2021 21:48:07 +0000 Subject: [PATCH 3/4] update cypress to account for no default screen --- packages/builder/cypress/support/commands.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index 1b1cc0c2b0..0870ceac7a 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -182,7 +182,9 @@ Cypress.Commands.add("navigateToFrontend", () => { cy.wait(1000) cy.contains("Design").click() cy.get(".spectrum-Search").type("/") - cy.get(".nav-item").contains("Home").click() + cy.createScreen("home", "home") + cy.addComponent("Elements", "Headline") + cy.get(".nav-item").contains("home").click() }) Cypress.Commands.add("createScreen", (screenName, route) => { From 9aa44dddfe7f9181eaaec6255aa246345d5efd17 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Thu, 25 Nov 2021 21:57:27 +0000 Subject: [PATCH 4/4] change colour of autoscreen selection --- .../src/components/design/NavigationPanel/NewScreenModal.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/design/NavigationPanel/NewScreenModal.svelte b/packages/builder/src/components/design/NavigationPanel/NewScreenModal.svelte index 57a40b9081..fbd1fc9256 100644 --- a/packages/builder/src/components/design/NavigationPanel/NewScreenModal.svelte +++ b/packages/builder/src/components/design/NavigationPanel/NewScreenModal.svelte @@ -132,7 +132,7 @@ padding: var(--spectrum-alias-item-padding-s); background: var(--spectrum-alias-background-color-primary); transition: 0.3s all; - border: 1px solid #e7e7e7; + border: 1px solid var(--spectrum-global-color-gray-300); border-radius: 4px; box-sizing: border-box; border-width: 1px;