From 45aa1b54ab37d821257fb00b3be5ef5eca03ef2c Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 29 Jan 2025 15:09:10 -0500
Subject: generlized some of cardDeck ui.  showTags is under View for all
 collections.  chat popup is available for all docs, but only works for card
 views.   added clear filters button for chat popup.

---
 .../views/collections/collectionFreeForm/CollectionFreeFormView.tsx      | 1 +
 1 file changed, 1 insertion(+)

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

diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 796949378..69fdf52ff 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -1658,6 +1658,7 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
             width: _width,
             height: _height,
             transition: StrCast(childDocLayout.dataTransition),
+            showTags: BoolCast(childDocLayout.showTags) || BoolCast(this.Document.showChildTags) || BoolCast(this.Document._layout_showTags),
             pointerEvents: Cast(childDoc.pointerEvents, 'string', null),
             pair,
             replica: '',
-- 
cgit v1.2.3-70-g09d2


From deb038e6b659a1c7563ccc9df2ef51221c0492ea Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Mon, 3 Feb 2025 14:42:42 -0500
Subject: fixed pres animation of colection that's progresivized by removing
 dataTransition assignments that made no sense.

---
 .../collectionFreeForm/CollectionFreeFormView.tsx  |  2 +-
 .../views/nodes/CollectionFreeFormDocumentView.tsx |  2 +-
 src/client/views/nodes/DocumentView.tsx            | 26 ++++++++------------
 src/client/views/nodes/trails/PresBox.tsx          | 28 ++++++++++------------
 4 files changed, 25 insertions(+), 33 deletions(-)

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

diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 69fdf52ff..3c31b584e 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -232,7 +232,7 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
     }
 
     public static gotoKeyframe(timer: NodeJS.Timeout | undefined, docs: Doc[], duration: number) {
-        return DocumentView.SetViewTransition(docs, 'all', duration, timer, undefined, true);
+        return DocumentView.SetViewTransition(docs, 'all', duration, timer, true);
     }
     changeKeyFrame = (back = false) => {
         const currentFrame = Cast(this.Document._currentFrame, 'number', null);
diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
index 68105f2f1..beea6ab3c 100644
--- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
+++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
@@ -198,7 +198,7 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF
     }
 
     public static updateKeyframe(timer: NodeJS.Timeout | undefined, docs: Doc[], time: number) {
-        const newTimer = DocumentView.SetViewTransition(docs, 'all', 1000, timer, undefined, true);
+        const newTimer = DocumentView.SetViewTransition(docs, 'all', 1000, timer, true);
         const timecode = Math.round(time);
         docs.forEach(doc => {
             this.animFields.forEach(val => {
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index a60415e43..0193fd328 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -1390,8 +1390,8 @@ export class DocumentView extends DocComponent<DocumentViewProps>() {
         this.Document[Animation] = presEffect;
         this._animEffectTimer = setTimeout(() => { this.Document[Animation] = undefined; }, timeInMs); // prettier-ignore
     };
-    public setViewTransition = (transProp: string, timeInMs: number, afterTrans?: () => void, dataTrans = false) => {
-        this._viewTimer = DocumentView.SetViewTransition([this.layoutDoc], transProp, timeInMs, this._viewTimer, afterTrans, dataTrans);
+    public setViewTransition = (transProp: string, timeInMs: number, dataTrans = false) => {
+        this._viewTimer = DocumentView.SetViewTransition([this.layoutDoc], transProp, timeInMs, this._viewTimer, dataTrans);
     };
 
     public setCustomView = undoable((custom: boolean, layout: string): void => {
@@ -1590,21 +1590,15 @@ export class DocumentView extends DocComponent<DocumentViewProps>() {
         );
     }
 
-    public static SetViewTransition(docs: Doc[], transProp: string, timeInMs: number, timer?: NodeJS.Timeout | undefined, afterTrans?: () => void, dataTrans = false) {
-        docs.forEach(doc => {
-            doc._viewTransition = `${transProp} ${timeInMs}ms`;
-            dataTrans && (doc.dataTransition = `${transProp} ${timeInMs}ms`);
-        });
+    public static SetViewTransition(docs: Doc[], transProp: string, timeInMs: number, timer?: NodeJS.Timeout | undefined, dataTrans = false) {
+        const setTrans = (transition?: string) =>
+            docs.forEach(doc => {
+                doc._viewTransition = transition;
+                dataTrans && (doc.dataTransition = transition);
+            });
+        setTrans(`${transProp} ${timeInMs}ms`);
         timer && clearTimeout(timer);
-        return setTimeout(
-            () =>
-                docs.forEach(doc => {
-                    doc._viewTransition = undefined;
-                    dataTrans && (doc.dataTransition = 'inherit');
-                    afterTrans?.();
-                }),
-            timeInMs + 10
-        );
+        return setTimeout(setTrans, timeInMs + 10);
     }
 
     // shows a stacking view collection (by default, but the user can change) of all documents linked to the source
diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx
index 7ca0bbc8f..68634076d 100644
--- a/src/client/views/nodes/trails/PresBox.tsx
+++ b/src/client/views/nodes/trails/PresBox.tsx
@@ -452,27 +452,25 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
         const progressiveReveal = (first: boolean) => {
             const presIndexed = Cast(this.activeItem?.presentation_indexed, 'number', null);
             if (presIndexed !== undefined) {
-                const targetRenderedDoc = PresBox.targetRenderedDoc(this.activeItem);
-                targetRenderedDoc._dataTransition = 'all 1s';
-                targetRenderedDoc.opacity = 1;
-                setTimeout(() => {
-                    targetRenderedDoc._dataTransition = 'inherit';
-                }, 1000);
                 const listItems = this.progressivizedItems(this.activeItem);
-                if (listItems && presIndexed < listItems.length) {
+                const listItemDoc = listItems?.[presIndexed];
+                if (listItems && listItemDoc) {
                     if (!first) {
-                        const listItemDoc = listItems[presIndexed];
-                        const targetView = listItems && DocumentView.getFirstDocumentView(listItemDoc);
+                        const presBulletTiming = 500; // bcz: hardwired for now
                         Doc.linkFollowUnhighlight();
                         Doc.HighlightDoc(listItemDoc);
                         listItemDoc.presentation_effect = this.activeItem.presBulletEffect;
-                        listItemDoc.presentation_transition = 500;
-                        targetView?.setAnimEffect(listItemDoc, 500);
-                        if (targetView && this.activeItem.presBulletExpand) {
-                            targetView.setAnimateScaling(1.2, 400);
-                            Doc.AddUnHighlightWatcher(() => targetView?.setAnimateScaling(0, undefined));
-                        }
+                        listItemDoc.presentation_transition = presBulletTiming;
                         listItemDoc.opacity = undefined;
+
+                        const targetView = DocumentView.getFirstDocumentView(listItemDoc);
+                        if (targetView) {
+                            targetView.setAnimEffect(listItemDoc, presBulletTiming);
+                            if (this.activeItem.presBulletExpand) {
+                                targetView.setAnimateScaling(1.2, presBulletTiming * 0.8);
+                                Doc.AddUnHighlightWatcher(() => targetView.setAnimateScaling(0, undefined));
+                            }
+                        }
                         this.activeItem.presentation_indexed = presIndexed + 1;
                     }
                     return true;
-- 
cgit v1.2.3-70-g09d2

