diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 544c24c003..eb9e9a0b73 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -145,7 +145,7 @@ The HTML and CSS for your apps runtime pages, as well as the budibase client lib #### Backend -The backend schema, tables and records are stored using PouchDB when developing locally, and in [CouchDB](https://pouchdb.com/) when running in production. +/he backend schema, tables and rows are stored using PouchDB when developing locally, and in [CouchDB](https://pouchdb.com/) when running in production. ### Publishing Budibase to NPM diff --git a/packages/builder/cypress/integration/createAutomation.spec.js b/packages/builder/cypress/integration/createAutomation.spec.js index 26af4fac71..67132c736b 100644 --- a/packages/builder/cypress/integration/createAutomation.spec.js +++ b/packages/builder/cypress/integration/createAutomation.spec.js @@ -16,7 +16,7 @@ context("Create a automation", () => { cy.contains("automate").click() cy.contains("Create New Automation").click() cy.get(".modal").within(() => { - cy.get("input").type("Add Record") + cy.get("input").type("Add Row") cy.get(".buttons") .contains("Create") .click() @@ -24,7 +24,7 @@ context("Create a automation", () => { // Add trigger cy.get("[data-cy=add-automation-component]").click() - cy.get("[data-cy=RECORD_SAVED]").click() + cy.get("[data-cy=ROW_SAVED]").click() cy.get("[data-cy=automation-block-setup]").within(() => { cy.get("select") .first() @@ -32,7 +32,7 @@ context("Create a automation", () => { }) // Create action - cy.get("[data-cy=CREATE_RECORD]").click() + cy.get("[data-cy=CREATE_ROW]").click() cy.get("[data-cy=automation-block-setup]").within(() => { cy.get("select") .first() @@ -53,9 +53,9 @@ context("Create a automation", () => { cy.get(".stop-button.highlighted").should("be.visible") }) - it("should add record when a new record is added", () => { + it("should add row when a new row is added", () => { cy.contains("backend").click() - cy.addRecord(["Rover", 15]) + cy.addRow(["Rover", 15]) cy.reload() cy.contains("goodboy").should("have.text", "goodboy") }) diff --git a/packages/builder/cypress/integration/createComponents.spec.js b/packages/builder/cypress/integration/createComponents.spec.js index 2e247f7110..f2035bf16b 100644 --- a/packages/builder/cypress/integration/createComponents.spec.js +++ b/packages/builder/cypress/integration/createComponents.spec.js @@ -6,7 +6,7 @@ xcontext('Create Components', () => { // https://on.cypress.io/type cy.createApp('Model App', 'Model App Description') cy.createTable('dog', 'name', 'age') - cy.addRecord('bob', '15') + cy.addRow('bob', '15') }) // https://on.cypress.io/interacting-with-elements diff --git a/packages/builder/cypress/integration/createTable.spec.js b/packages/builder/cypress/integration/createTable.spec.js index d7ae805b27..36aed6e058 100644 --- a/packages/builder/cypress/integration/createTable.spec.js +++ b/packages/builder/cypress/integration/createTable.spec.js @@ -16,8 +16,8 @@ context("Create a Table", () => { cy.contains("name").should("be.visible") }) - it("creates a record in the table", () => { - cy.addRecord(["Rover"]) + it("creates a row in the table", () => { + cy.addRow(["Rover"]) cy.contains("Rover").should("be.visible") }) @@ -32,7 +32,7 @@ context("Create a Table", () => { cy.contains("nameupdated").should("have.text", "nameupdated") }) - it("edits a record", () => { + it("edits a row", () => { cy.get("tbody .ri-more-line").click() cy.get("[data-cy=edit-row]").click() cy.get(".modal input").type("Updated") @@ -40,7 +40,7 @@ context("Create a Table", () => { cy.contains("RoverUpdated").should("have.text", "RoverUpdated") }) - it("deletes a record", () => { + it("deletes a row", () => { cy.get("tbody .ri-more-line").click() cy.get("[data-cy=delete-row]").click() cy.contains("Delete Row").click() diff --git a/packages/builder/cypress/integration/createView.spec.js b/packages/builder/cypress/integration/createView.spec.js index c224b8af42..e35688c813 100644 --- a/packages/builder/cypress/integration/createView.spec.js +++ b/packages/builder/cypress/integration/createView.spec.js @@ -7,13 +7,13 @@ context("Create a View", () => { cy.addColumn("data", "age", "Number") cy.addColumn("data", "rating", "Number") - // 6 Records - cy.addRecord(["Students", 25, 1]) - cy.addRecord(["Students", 20, 3]) - cy.addRecord(["Students", 18, 6]) - cy.addRecord(["Students", 25, 2]) - cy.addRecord(["Teachers", 49, 5]) - cy.addRecord(["Teachers", 36, 3]) + // 6 Rows + cy.addRow(["Students", 25, 1]) + cy.addRow(["Students", 20, 3]) + cy.addRow(["Students", 18, 6]) + cy.addRow(["Students", 25, 2]) + cy.addRow(["Teachers", 49, 5]) + cy.addRow(["Teachers", 36, 3]) }) it("creates a view", () => { diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index bcc82a0396..cf47051d38 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -92,7 +92,7 @@ Cypress.Commands.add("addColumn", (tableName, columnName, type) => { }) }) -Cypress.Commands.add("addRecord", values => { +Cypress.Commands.add("addRow", values => { cy.contains("Create New Row").click() cy.get(".modal").within(() => { diff --git a/packages/builder/src/builderStore/store/automation/tests/testAutomation.js b/packages/builder/src/builderStore/store/automation/tests/testAutomation.js index 8f714bdead..3fafbaf1d0 100644 --- a/packages/builder/src/builderStore/store/automation/tests/testAutomation.js +++ b/packages/builder/src/builderStore/store/automation/tests/testAutomation.js @@ -26,11 +26,11 @@ export default { ], trigger: { id: "iRzYMOqND", - name: "Record Saved", - event: "record:save", + name: "Row Saved", + event: "row:save", icon: "ri-save-line", - tagline: "Record is added to {{table.name}}", - description: "Fired when a record is saved to your database.", + tagline: "Row is added to {{table.name}}", + description: "Fired when a row is saved to your database.", params: { table: "table" }, type: "TRIGGER", args: { @@ -65,7 +65,7 @@ export default { _rev: "7-b8aa1ce0b53e88928bb88fc11bdc0aff", }, }, - stepId: "RECORD_SAVED", + stepId: "ROW_SAVED", }, }, type: "automation", diff --git a/packages/builder/src/builderStore/store/backend.js b/packages/builder/src/builderStore/store/backend.js index a5d7afcbb5..d89796f9cc 100644 --- a/packages/builder/src/builderStore/store/backend.js +++ b/packages/builder/src/builderStore/store/backend.js @@ -27,7 +27,7 @@ export const getBackendUiStore = () => { }) }, }, - records: { + rows: { save: () => store.update(state => { state.selectedView = state.selectedView @@ -38,9 +38,9 @@ export const getBackendUiStore = () => { state.selectedView = state.selectedView return state }), - select: record => + select: row => store.update(state => { - state.selectedRecord = record + state.selectedRow = row return state }), }, diff --git a/packages/builder/src/components/automation/AutomationBuilder/flowchart/AutomationBlockTagline.svelte b/packages/builder/src/components/automation/AutomationBuilder/flowchart/AutomationBlockTagline.svelte index b0a588314f..aca1e7f90d 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/flowchart/AutomationBlockTagline.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/flowchart/AutomationBlockTagline.svelte @@ -13,7 +13,7 @@ function enrichInputs(inputs) { let enrichedInputs = { ...inputs, enriched: {} } - const tableId = inputs.tableId || inputs.record?.tableId + const tableId = inputs.tableId || inputs.row?.tableId if (tableId) { enrichedInputs.enriched.table = $backendUiStore.tables.find( table => table._id === tableId diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index a43126afbb..896652dbb7 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -1,6 +1,6 @@ -{#if record && record._id === recordId} +{#if row && row._id === rowId}