From 5b2ee61fd04f18478e3b5355ae19cd06a0840fa5 Mon Sep 17 00:00:00 2001
From: Sam Wilkins <35748010+samwilkins333@users.noreply.github.com>
Date: Thu, 27 Jun 2019 12:39:36 -0400
Subject: templating workflow improvements

---
 src/client/views/nodes/KeyValueBox.tsx | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

(limited to 'src/client/views/nodes/KeyValueBox.tsx')

diff --git a/src/client/views/nodes/KeyValueBox.tsx b/src/client/views/nodes/KeyValueBox.tsx
index 4beb70284..af22f0a48 100644
--- a/src/client/views/nodes/KeyValueBox.tsx
+++ b/src/client/views/nodes/KeyValueBox.tsx
@@ -145,7 +145,9 @@ export class KeyValueBox extends React.Component<FieldViewProps> {
     }
 
     getTemplate = async () => {
-        let parent = Docs.FreeformDocument([], { width: 800, height: 800, title: "Template" });
+        let parent = Docs.StackingDocument([], { width: 800, height: 800, title: "Template" });
+        parent.singleColumn = false;
+        parent.columnWidth = 50;
         for (let row of this.rows.filter(row => row.isChecked)) {
             await this.createTemplateField(parent, row);
             row.uncheck();
@@ -167,8 +169,8 @@ export class KeyValueBox extends React.Component<FieldViewProps> {
         let template = Doc.MakeAlias(target);
         template.proto = parent;
         template.title = metaKey;
-        template.nativeWidth = 300;
-        template.nativeHeight = 300;
+        template.nativeWidth = 0;
+        template.nativeHeight = 0;
         template.embed = true;
         template.isTemplate = true;
         template.templates = new List<string>([Templates.TitleBar(metaKey)]);
@@ -187,7 +189,7 @@ export class KeyValueBox extends React.Component<FieldViewProps> {
     inferType = (field: FieldResult, metaKey: string) => {
         let options = { width: 300, height: 300, title: metaKey };
         if (field instanceof RichTextField || typeof field === "string" || typeof field === "number") {
-            return Docs.TextDocument(options);
+            return Docs.StackingDocument(options);
         } else if (field instanceof List) {
             return Docs.FreeformDocument([], options);
         } else if (field instanceof ImageField) {
@@ -218,4 +220,4 @@ export class KeyValueBox extends React.Component<FieldViewProps> {
             {dividerDragger}
         </div>);
     }
-}
\ No newline at end of file
+}
-- 
cgit v1.2.3-70-g09d2

