From 675408d8358f1373d7892d2db3e6ecb06c098948 Mon Sep 17 00:00:00 2001
From: sharkiecodes <lanyi_stroud@brown.edu>
Date: Wed, 30 Apr 2025 00:10:06 -0400
Subject: small updates

---
 src/client/views/nodes/scrapbook/ScrapbookBox.tsx | 26 ++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

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

diff --git a/src/client/views/nodes/scrapbook/ScrapbookBox.tsx b/src/client/views/nodes/scrapbook/ScrapbookBox.tsx
index dd3eed6e4..524925132 100644
--- a/src/client/views/nodes/scrapbook/ScrapbookBox.tsx
+++ b/src/client/views/nodes/scrapbook/ScrapbookBox.tsx
@@ -49,6 +49,7 @@ export class ScrapbookBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
 
             const image = Docs.Create.TextDocument('image');
             image.accepts_docType = DocumentType.IMG;
+            image.accepts_tagType = 'LANDSCAPE' //should i be writing fields on this doc? clarify diff between this and proto, original
             const placeholder = new Doc();
             placeholder.proto = image;
             placeholder.original = image;
@@ -60,7 +61,7 @@ export class ScrapbookBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
             
             const summary = Docs.Create.TextDocument('summary');
             summary.accepts_docType = DocumentType.RTF;
-            summary.accepts_textType = 'one line';
+            summary.accepts_tagType = 'caption';
             //summary.$tags_chat = new List<string>(['lengthy description']); //we need to go back and set this
             const placeholder2 = new Doc();
             placeholder2.proto = summary;
@@ -72,7 +73,7 @@ export class ScrapbookBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
             
             const sidebar = Docs.Create.TextDocument('sidebar');
             sidebar.accepts_docType = DocumentType.RTF;
-            sidebar.accepts_textType = 'sidebar';
+            sidebar.accepts_tagType = 'lengthy description'; //accepts_textType = 'lengthy description'
             const placeholder3 = new Doc();
             placeholder3.proto = sidebar;
             placeholder3.original = sidebar;
@@ -81,6 +82,23 @@ export class ScrapbookBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
             placeholder3._width = 50; 
             placeholder3._height = 200;
 
+            const collection = Docs.Create.ScrapbookDocument([]);
+            /*note-to-self
+            would doing:
+
+            const collection = Docs.Create.ScrapbookDocument([placeholder, placeholder2, placeholder3]);
+            create issues with references to the same object?*/
+
+            /*note-to-self
+            Should we consider that there are more collections than just COL type collections?
+            when spreading*/
+
+
+
+           /*note-to-self
+           difference between passing a new List<Doc> versus just the raw array?
+           */
+
             this.dataDoc[this.fieldKey] = new List<Doc>([placeholder, placeholder2, placeholder3]);
 
           
@@ -144,7 +162,9 @@ export class ScrapbookBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
                         
                             // find the first placeholder that shares *any* tag
                         const match = placeholder.find(ph =>
-                            StrListCast(ph.$tags_chat).some(tag => targetTags.has(tag))
+                            ph.accepts_tagType != null &&          // make sure it actually has one
+                            targetTags.has(StrCast(ph.accepts_tagType))     // test membership in the Set
+                            //StrListCast(ph.$tags_chat).some(tag => targetTags.has(tag))
                         );
                         if (match) {
                             match.proto = docs[0];
-- 
cgit v1.2.3-70-g09d2

