From 2e3b83df9b0cb69db6f5febae70a2e36a0a90822 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 2 Sep 2020 10:46:29 -0400
Subject: made highlight colors more obvious.  fixed tags to update when #key
 is set in textdoc.

---
 src/client/views/PropertiesView.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/client/views/PropertiesView.tsx')

diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index ddc76d373..6e029188a 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -243,10 +243,10 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
                 return true;
             } else if (value[0] === "#") {
                 const newVal = value + `:'${value}'`;
-                KeyValueBox.SetField(doc, value, `'${value}'`, true);
+                doc[DataSym][value] = value;
                 const tags = StrCast(doc.tags, ":");
-                if (!tags.includes(`#${value}:`)) {
-                    KeyValueBox.SetField(doc, "tags", `"${tags + value + ':'}"`, true);
+                if (!tags.includes(`${value}:`)) {
+                    doc[DataSym].tags = `${tags + value + ':'}`;
                 }
                 return true;
             }
-- 
cgit v1.2.3-70-g09d2


From eb13fea97b85771b67a69a657309dd45a9a3febf Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 3 Sep 2020 11:32:43 -0400
Subject: prevented dashboards from being the selectedDocument to avoid issues
 with the tab layout getting corrupted.

---
 src/client/util/SelectionManager.ts | 3 ++-
 src/client/views/PropertiesView.tsx | 8 +++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

(limited to 'src/client/views/PropertiesView.tsx')

diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts
index 6d4f2c190..730db4f29 100644
--- a/src/client/util/SelectionManager.ts
+++ b/src/client/util/SelectionManager.ts
@@ -4,6 +4,7 @@ import { DocumentView } from "../views/nodes/DocumentView";
 import { computedFn } from "mobx-utils";
 import { List } from "../../fields/List";
 import { CollectionSchemaView } from "../views/collections/CollectionSchemaView";
+import { CollectionViewType } from "../views/collections/CollectionView";
 
 export namespace SelectionManager {
 
@@ -93,7 +94,7 @@ export namespace SelectionManager {
     }
 
     export function SelectedDocuments(): Array<DocumentView> {
-        return Array.from(manager.SelectedDocuments.keys());
+        return Array.from(manager.SelectedDocuments.keys()).filter(dv => dv.props.Document._viewType !== CollectionViewType.Docking);
     }
     export function SelectedSchemaDoc(): Doc | undefined {
         return manager.SelectedSchemaDocument;
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index 6e029188a..5c83eabd1 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -45,11 +45,9 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
 
     @computed get selectedDoc() { return SelectionManager.SelectedSchemaDoc() || this.selectedDocumentView?.rootDoc; }
     @computed get selectedDocumentView() {
-        if (SelectionManager.SelectedDocuments().length) {
-            return SelectionManager.SelectedDocuments()[0];
-        } else if (PresBox.Instance && PresBox.Instance._selectedArray.length) {
-            return DocumentManager.Instance.getDocumentView(PresBox.Instance.rootDoc);
-        } else { return undefined; }
+        if (SelectionManager.SelectedDocuments().length) return SelectionManager.SelectedDocuments()[0];
+        if (PresBox.Instance && PresBox.Instance._selectedArray.length) return DocumentManager.Instance.getDocumentView(PresBox.Instance.rootDoc);
+        return undefined;
     }
     @computed get isPres(): boolean {
         if (this.selectedDoc?.type === DocumentType.PRES) return true;
-- 
cgit v1.2.3-70-g09d2

