From 27b07f24515dfbfc84722761a6adae6b306cd2e0 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 20 Aug 2020 17:04:54 +0100 Subject: [PATCH 1/5] renaming bug --- packages/builder/src/builderStore/store/backend.js | 8 +++++++- .../components/database/DataTable/ModelDataTable.svelte | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/builderStore/store/backend.js b/packages/builder/src/builderStore/store/backend.js index 80f931686b..6e75323b6d 100644 --- a/packages/builder/src/builderStore/store/backend.js +++ b/packages/builder/src/builderStore/store/backend.js @@ -93,7 +93,13 @@ export const getBackendUiStore = () => { saveField: ({ originalName, field }) => { store.update(state => { // delete the original if renaming - delete state.draftModel.schema[originalName] + if (originalName) { + delete state.draftModel.schema[originalName] + state.draftModel._rename = { + old: originalName, + updated: field.name, + } + } state.draftModel.schema[field.name] = cloneDeep(field) diff --git a/packages/builder/src/components/database/DataTable/ModelDataTable.svelte b/packages/builder/src/components/database/DataTable/ModelDataTable.svelte index 6233e8cc19..25340818e2 100644 --- a/packages/builder/src/components/database/DataTable/ModelDataTable.svelte +++ b/packages/builder/src/components/database/DataTable/ModelDataTable.svelte @@ -45,9 +45,9 @@ $: sort = $backendUiStore.sort $: sorted = sort ? fsort(data)[sort.direction](sort.column) : data - $: headers = Object.keys($backendUiStore.selectedModel.schema).filter( - id => !INTERNAL_HEADERS.includes(id) - ) + $: headers = Object.keys($backendUiStore.selectedModel.schema) + .sort() + .filter(id => !INTERNAL_HEADERS.includes(id)) $: schema = $backendUiStore.selectedModel.schema From 066e32ad35e47d373255797cdcd84f4b20fa4c94 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 21 Aug 2020 10:11:17 +0100 Subject: [PATCH 2/5] fix cypress test --- packages/builder/cypress/integration/createTable.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/builder/cypress/integration/createTable.spec.js b/packages/builder/cypress/integration/createTable.spec.js index c744eb7e4f..214727ab7d 100644 --- a/packages/builder/cypress/integration/createTable.spec.js +++ b/packages/builder/cypress/integration/createTable.spec.js @@ -38,10 +38,10 @@ context('Create a Table', () => { it('edits a record', () => { cy.get("tbody .ri-more-line").click() cy.get("[data-cy=edit-row]").click() - cy.get(".actions input").type("updatedRecord") + cy.get(".actions input").type("Updated") cy.contains("Save").click() - cy.contains('updatedRecord').should('have.text', 'updatedRecord') + cy.contains('RoverUpdated').should('have.text', 'RoverUpdated') }) it('deletes a record', () => { @@ -49,7 +49,7 @@ context('Create a Table', () => { cy.get("[data-cy=delete-row]").click() cy.get(".modal-actions").contains("Delete").click() - cy.contains('updatedRecord').should('not.exist') + cy.contains('RoverUpdated').should('not.exist') }) it('deletes a column', () => { From 1b93c9227738eae95fa31b2c9fdc238c94ddbefe Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 21 Aug 2020 10:19:54 +0100 Subject: [PATCH 3/5] v0.1.18 --- lerna.json | 2 +- packages/builder/package.json | 4 ++-- packages/cli/package.json | 4 ++-- packages/client/package.json | 2 +- packages/server/package.json | 4 ++-- packages/standard-components/package.json | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lerna.json b/lerna.json index c6a99591de..47a1d9b64b 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.1.17", + "version": "0.1.18", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/builder/package.json b/packages/builder/package.json index e223397508..bd63275fb7 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.1.17", + "version": "0.1.18", "license": "AGPL-3.0", "private": true, "scripts": { @@ -58,7 +58,7 @@ }, "dependencies": { "@budibase/bbui": "^1.24.1", - "@budibase/client": "^0.1.17", + "@budibase/client": "^0.1.18", "@budibase/colorpicker": "^1.0.1", "@sentry/browser": "5.19.1", "@svelteschool/svelte-forms": "^0.7.0", diff --git a/packages/cli/package.json b/packages/cli/package.json index bad7db76d8..ffd5474ccd 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "budibase", - "version": "0.1.17", + "version": "0.1.18", "description": "Budibase CLI", "repository": "https://github.com/Budibase/Budibase", "homepage": "https://www.budibase.com", @@ -17,7 +17,7 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/server": "^0.1.17", + "@budibase/server": "^0.1.18", "@inquirer/password": "^0.0.6-alpha.0", "chalk": "^2.4.2", "dotenv": "^8.2.0", diff --git a/packages/client/package.json b/packages/client/package.json index 49d598fb03..740993146b 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "0.1.17", + "version": "0.1.18", "license": "MPL-2.0", "main": "dist/budibase-client.js", "module": "dist/budibase-client.esm.mjs", diff --git a/packages/server/package.json b/packages/server/package.json index 448bff00d7..92ce1008e4 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/server", - "version": "0.1.17", + "version": "0.1.18", "description": "Budibase Web Server", "main": "src/electron.js", "repository": { @@ -42,7 +42,7 @@ "author": "Michael Shanks", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/client": "^0.1.17", + "@budibase/client": "^0.1.18", "@koa/router": "^8.0.0", "@sendgrid/mail": "^7.1.1", "@sentry/node": "^5.19.2", diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index 99c92d042c..5435605d98 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -13,7 +13,7 @@ "dev:builder": "rollup -cw" }, "devDependencies": { - "@budibase/client": "^0.1.17", + "@budibase/client": "^0.1.18", "@rollup/plugin-commonjs": "^11.1.0", "lodash": "^4.17.15", "rollup": "^1.11.0", @@ -31,7 +31,7 @@ "keywords": [ "svelte" ], - "version": "0.1.17", + "version": "0.1.18", "license": "MIT", "gitHead": "284cceb9b703c38566c6e6363c022f79a08d5691", "dependencies": { From 4e07773031869c840bc69b241600f24249e47970 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 21 Aug 2020 11:20:50 +0100 Subject: [PATCH 4/5] gap not supported in electron --- .../src/components/database/DataTable/ModelDataTable.svelte | 1 - .../builder/src/components/database/DataTable/Table.svelte | 5 ++++- .../src/components/database/DataTable/popovers/View.svelte | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/database/DataTable/ModelDataTable.svelte b/packages/builder/src/components/database/DataTable/ModelDataTable.svelte index 25340818e2..25f9c1e78e 100644 --- a/packages/builder/src/components/database/DataTable/ModelDataTable.svelte +++ b/packages/builder/src/components/database/DataTable/ModelDataTable.svelte @@ -178,7 +178,6 @@ .popovers { display: flex; - gap: var(--spacing-m); } .no-data { diff --git a/packages/builder/src/components/database/DataTable/Table.svelte b/packages/builder/src/components/database/DataTable/Table.svelte index 8068a270cb..bbed4a6be3 100644 --- a/packages/builder/src/components/database/DataTable/Table.svelte +++ b/packages/builder/src/components/database/DataTable/Table.svelte @@ -132,7 +132,10 @@ .popovers { display: flex; - gap: var(--spacing-l); + } + + :global(.popovers > div) { + margin-right: var(--spacing-m); } .no-data { diff --git a/packages/builder/src/components/database/DataTable/popovers/View.svelte b/packages/builder/src/components/database/DataTable/popovers/View.svelte index fce61c9859..40d685d771 100644 --- a/packages/builder/src/components/database/DataTable/popovers/View.svelte +++ b/packages/builder/src/components/database/DataTable/popovers/View.svelte @@ -43,7 +43,7 @@
- + Create New View
From ae4b02cb69a6f0c9bc2860b40a952b172a58b620 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 21 Aug 2020 11:31:53 +0100 Subject: [PATCH 5/5] v0.1.19 --- lerna.json | 2 +- packages/builder/package.json | 4 ++-- packages/cli/package.json | 4 ++-- packages/client/package.json | 2 +- packages/server/package.json | 4 ++-- packages/standard-components/package.json | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lerna.json b/lerna.json index 47a1d9b64b..5d5fb16e81 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.1.18", + "version": "0.1.19", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/builder/package.json b/packages/builder/package.json index bd63275fb7..07b3287f18 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.1.18", + "version": "0.1.19", "license": "AGPL-3.0", "private": true, "scripts": { @@ -58,7 +58,7 @@ }, "dependencies": { "@budibase/bbui": "^1.24.1", - "@budibase/client": "^0.1.18", + "@budibase/client": "^0.1.19", "@budibase/colorpicker": "^1.0.1", "@sentry/browser": "5.19.1", "@svelteschool/svelte-forms": "^0.7.0", diff --git a/packages/cli/package.json b/packages/cli/package.json index ffd5474ccd..45aafc54a8 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "budibase", - "version": "0.1.18", + "version": "0.1.19", "description": "Budibase CLI", "repository": "https://github.com/Budibase/Budibase", "homepage": "https://www.budibase.com", @@ -17,7 +17,7 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/server": "^0.1.18", + "@budibase/server": "^0.1.19", "@inquirer/password": "^0.0.6-alpha.0", "chalk": "^2.4.2", "dotenv": "^8.2.0", diff --git a/packages/client/package.json b/packages/client/package.json index 740993146b..7ee809f47e 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "0.1.18", + "version": "0.1.19", "license": "MPL-2.0", "main": "dist/budibase-client.js", "module": "dist/budibase-client.esm.mjs", diff --git a/packages/server/package.json b/packages/server/package.json index 92ce1008e4..b3baaf7852 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/server", - "version": "0.1.18", + "version": "0.1.19", "description": "Budibase Web Server", "main": "src/electron.js", "repository": { @@ -42,7 +42,7 @@ "author": "Michael Shanks", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/client": "^0.1.18", + "@budibase/client": "^0.1.19", "@koa/router": "^8.0.0", "@sendgrid/mail": "^7.1.1", "@sentry/node": "^5.19.2", diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index 5435605d98..b42f3edeee 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -13,7 +13,7 @@ "dev:builder": "rollup -cw" }, "devDependencies": { - "@budibase/client": "^0.1.18", + "@budibase/client": "^0.1.19", "@rollup/plugin-commonjs": "^11.1.0", "lodash": "^4.17.15", "rollup": "^1.11.0", @@ -31,7 +31,7 @@ "keywords": [ "svelte" ], - "version": "0.1.18", + "version": "0.1.19", "license": "MIT", "gitHead": "284cceb9b703c38566c6e6363c022f79a08d5691", "dependencies": {