From e847215964bc02cf402eace30d6c9e19f5f0f0cf Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 7 Sep 2023 01:28:27 -0400
Subject: truncate link descriptions over link lines.  Fix schema view issues
 with multiline inputs.  fix '#' field assignment for title bar of docs. 
 fixed dashFieldView to read fields from texstbox by fixing FindDocByTitle to
 not match undefind.  Don't end link_description input on Enter to allow
 multiline inputs.

---
 .../collections/collectionFreeForm/CollectionFreeFormLinkView.tsx     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx')

diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx
index f940eb4bf..ea225e52f 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx
@@ -256,7 +256,7 @@ export class CollectionFreeFormLinkView extends React.Component<CollectionFreeFo
         const linkColorList = Doc.UserDoc().link_ColorList as List<string>;
         const linkRelationshipSizes = Doc.UserDoc().link_relationshipSizes as List<number>;
         const currRelationshipIndex = linkRelationshipList.indexOf(linkRelationship);
-        const linkDescription = Field.toString(link.link_description as any as Field);
+        const linkDescription = Field.toString(link.link_description as any as Field).split('\n')[0];
 
         const linkSize = Doc.noviceMode || currRelationshipIndex === -1 || currRelationshipIndex >= linkRelationshipSizes.length ? -1 : linkRelationshipSizes[currRelationshipIndex];
 
@@ -306,7 +306,7 @@ export class CollectionFreeFormLinkView extends React.Component<CollectionFreeFo
                 {textX === undefined || !linkDescription ? null : (
                     <text filter={`url(#${link[Id] + 'background'})`} className="collectionfreeformlinkview-linkText" x={textX} y={textY} onPointerDown={this.pointerDown}>
                         <tspan>&nbsp;</tspan>
-                        <tspan dy="2">{linkDescription}</tspan>
+                        <tspan dy="2">{linkDescription.substring(0, 50) + (linkDescription.length > 50 ? '...' : '')}</tspan>
                         <tspan dy="2">&nbsp;</tspan>
                     </text>
                 )}
-- 
cgit v1.2.3-70-g09d2

