From 6b062c90c235c97dede34349b56331296ae97a62 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 10 Jun 2021 10:20:59 +0100 Subject: [PATCH] Update autoscreens to be more responsive by default --- .../src/builderStore/store/screenTemplates/newRowScreen.js | 3 +++ .../src/builderStore/store/screenTemplates/rowDetailScreen.js | 3 +++ .../src/builderStore/store/screenTemplates/rowListScreen.js | 4 ++-- .../store/screenTemplates/utils/commonComponents.js | 1 - 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js b/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js index c46564b69b..23f2fd846f 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js @@ -29,6 +29,9 @@ function generateTitleContainer(table, formId) { const createScreen = table => { const screen = new Screen() .instanceName(`${table.name} - New`) + .customProps({ + hAlign: "center", + }) .route(newRowUrl(table)) const form = makeMainForm() diff --git a/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js b/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js index 4abe664e85..7e61d68f59 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js @@ -151,6 +151,9 @@ const createScreen = table => { return new Screen() .instanceName(`${table.name} - Detail`) .route(rowDetailUrl(table)) + .customProps({ + hAlign: "center", + }) .addChild(provider) .json() } diff --git a/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js b/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js index 58931d4e0c..2c9bc36d17 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js @@ -80,7 +80,8 @@ const createScreen = table => { tableId: table._id, type: "table", }, - paginate: false, + paginate: true, + limit: 8, }) const spectrumTable = new Component("@budibase/standard-components/table") @@ -127,7 +128,6 @@ const createScreen = table => { background: "white", "border-radius": "0.5rem", "box-shadow": "0 1px 2px 0 rgba(0, 0, 0, 0.05)", - margin: "auto", "margin-top": "20px", "border-width": "2px", "border-color": "rgba(0, 0, 0, 0.1)", diff --git a/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js b/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js index 579252a9dd..3771ec21b8 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js +++ b/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js @@ -40,7 +40,6 @@ export function makeMainForm() { padding: "0px", "border-radius": "0.5rem", "box-shadow": "0 1px 2px 0 rgba(0, 0, 0, 0.05)", - margin: "auto", "margin-top": "20px", "padding-top": "48px", "padding-bottom": "48px",