review: better naming of screen templates

This commit is contained in:
Michael Shanks 2020-10-12 10:50:19 +01:00
parent 52f6c73be8
commit 67b99ec5d8
8 changed files with 12 additions and 12 deletions

View File

@ -1,5 +1,5 @@
export default {
name: `Create from Scratch`,
name: `Create from scratch`,
create: () => createScreen(),
}

View File

@ -1,5 +1,5 @@
export default {
name: `New Record (Empty)`,
name: `New Row (Empty)`,
create: () => createScreen(),
}

View File

@ -1,5 +1,5 @@
export default {
name: `Record Detail (Empty)`,
name: `Row Detail (Empty)`,
create: () => createScreen(),
}

View File

@ -10,10 +10,10 @@ import { uuid } from "builderStore/uuid"
const allTemplates = models => [
emptyContainerScreen,
...newRecordScreen(models),
emptyNewRecordScreen,
...recordDetailScreen(models),
emptyRecordDetailScreen,
...recordListScreen(models),
emptyNewRecordScreen,
emptyRecordDetailScreen,
]
// allows us to apply common behaviour to all create() functions

View File

@ -3,7 +3,7 @@ export default function(models) {
const fields = Object.keys(model.schema)
const heading = fields.length > 0 ? `{{ data.${fields[0]} }}` : "Add Row"
return {
name: `New Row - ${model.name}`,
name: `${model.name} - New`,
create: () => createScreen(model, heading),
id: NEW_RECORD_TEMPLATE,
}

View File

@ -3,7 +3,7 @@ export default function(models) {
const fields = Object.keys(model.schema)
const heading = fields.length > 0 ? `{{ data.${fields[0]} }}` : "Detail"
return {
name: `Row Detail - ${model.name}`,
name: `${model.name} - Detail`,
create: () => createScreen(model, heading),
id: RECORD_DETAIL_TEMPLATE,
}
@ -127,7 +127,7 @@ const createScreen = (model, heading) => ({
],
},
],
_instanceName: `${model.name} Detail`,
_instanceName: `${model.name} - Detail`,
_code: "",
},
route: `/${model.name.toLowerCase()}/:id`,

View File

@ -1,7 +1,7 @@
export default function(models) {
return models.map(model => {
return {
name: `List - ${model.name}`,
name: `${model.name} - List`,
create: () => createScreen(model),
id: RECORD_LIST_TEMPLATE,
}
@ -108,7 +108,7 @@ const createScreen = model => ({
_children: [],
},
],
_instanceName: `${model.name} List`,
_instanceName: `${model.name} - List`,
_code: "",
className: "",
onLoad: [],

View File

@ -1093,7 +1093,7 @@ export default {
// children: [],
// },
{
name: "Record Detail",
name: "Row Detail",
_component: "@budibase/standard-components/rowdetail",
description:
"Loads a record, using an id from the URL, which can be used with {{ context }}, in children",
@ -1105,7 +1105,7 @@ export default {
children: [],
},
{
name: "Record Detail",
name: "New Row",
_component: "@budibase/standard-components/newrow",
description:
"Sets up a new record for creation, which can be used with {{ context }}, in children",