From 2114e68737ee3add5811cf67b535cd70998aa015 Mon Sep 17 00:00:00 2001 From: yiling Date: Mon, 1 Jun 2026 16:59:43 +0800 Subject: [PATCH] feat(sidebar): add smooth transition animations for collapse/expand --- src/ui/components/folder-tree.tsx | 191 ++++++++++++++++-------------- 1 file changed, 103 insertions(+), 88 deletions(-) diff --git a/src/ui/components/folder-tree.tsx b/src/ui/components/folder-tree.tsx index 00852862..ef1dfa60 100644 --- a/src/ui/components/folder-tree.tsx +++ b/src/ui/components/folder-tree.tsx @@ -150,8 +150,8 @@ export function FolderTree({
@@ -166,60 +166,65 @@ export function FolderTree({ )}
- - {isAssetsExpanded && ( -
- -
- navigate({ - to: '/projects/$projectId/recently-deleted', - params: { projectId }, - }) - } - > -
- -
- Recently Deleted +
+ +
+ navigate({ + to: '/projects/$projectId/recently-deleted', + params: { projectId }, + }) + } + > +
+
+ Recently Deleted
- )} +
{!hideCollections && (
@@ -236,41 +241,46 @@ export function FolderTree({
- {isCollectionsExpanded && ( -
- {collectionsData?.data.map((collection) => ( -
- navigate({ - to: '/projects/$projectId/collections/$collectionId', - params: { projectId, collectionId: collection.id }, - }) - } - > -
- -
- {collection.name} +
+ {collectionsData?.data.map((collection) => ( +
+ navigate({ + to: '/projects/$projectId/collections/$collectionId', + params: { projectId, collectionId: collection.id }, + }) + } + > +
+
- ))} -
- )} + {collection.name} +
+ ))} +
)} {!hideShares && (
@@ -285,7 +295,7 @@ export function FolderTree({ )}
-
+
- {isSharesExpanded && ( -
-
-
- -
- - All Share Links ({shareLinks.length}) - +
+
+
+
- - {shareLinks.map((link) => ( - - ))} + + All Share Links ({shareLinks.length}) +
- )} + + {shareLinks.map((link) => ( + + ))} +
)}