From 8e143637a34e1766b5993e1c494c8d5a9d881698 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Mon, 28 Aug 2023 22:33:54 -0400
Subject: adjusted placement of new Node in schema to not hide behind undo/redo

---
 .../collectionSchema/CollectionSchemaView.tsx        | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

(limited to 'src/client/views/collections/collectionSchema/CollectionSchemaView.tsx')

diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index babe5c810..513bbc3fe 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -63,7 +63,7 @@ export class CollectionSchemaView extends CollectionSubView() {
     public static _minColWidth: number = 25;
     public static _rowMenuWidth: number = 60;
     public static _previewDividerWidth: number = 4;
-    public static _newNodeInputHeight: number = 30;
+    public static _newNodeInputHeight: number = 20;
     public fieldInfos = new ObservableMap<string, FInfo>();
 
     @observable _menuKeys: string[] = [];
@@ -869,14 +869,16 @@ export class CollectionSchemaView extends CollectionSubView() {
                     {this._columnMenuIndex !== undefined && this.renderColumnMenu}
                     {this._filterColumnIndex !== undefined && this.renderFilterMenu}
                     <CollectionSchemaViewDocs schema={this} childDocs={this.sortedDocsFunc} rowHeight={this.rowHeightFunc} setRef={(ref: HTMLDivElement | null) => (this._tableContentRef = ref)} />
-                    <EditableView
-                        GetValue={returnEmptyString}
-                        SetValue={undoable(value => (value ? this.addRow(Docs.Create.TextDocument(value, { title: value, _layout_autoHeight: true })) : false), 'add text doc')}
-                        placeholder={"Type ':' for commands"}
-                        contents={'+ New Node'}
-                        menuCallback={this.menuCallback}
-                        height={CollectionSchemaView._newNodeInputHeight}
-                    />
+                    <div className="schema-add">
+                        <EditableView
+                            GetValue={returnEmptyString}
+                            SetValue={undoable(value => (value ? this.addRow(Docs.Create.TextDocument(value, { title: value, _layout_autoHeight: true })) : false), 'add text doc')}
+                            placeholder={"Type text to create note or ':' to create specific type"}
+                            contents={'+ New Node'}
+                            menuCallback={this.menuCallback}
+                            height={CollectionSchemaView._newNodeInputHeight}
+                        />
+                    </div>
                 </div>
                 {this.previewWidth > 0 && <div className="schema-preview-divider" style={{ width: CollectionSchemaView._previewDividerWidth }} onPointerDown={this.onDividerDown}></div>}
                 {this.previewWidth > 0 && (
-- 
cgit v1.2.3-70-g09d2

