From 9196581524f79a8a8d40d95015c9efd146d63b30 Mon Sep 17 00:00:00 2001 From: Maarten Draijer Date: Tue, 7 Jul 2026 13:30:14 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(frontend)=20show=20the=20user's=20wor?= =?UTF-8?q?kspaces=20in=20the=20sidebar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sidebar tree seeded only the Favorites node, so a user's workspaces — the personal main workspace and any shared/team drive — never appeared as top-level entries (only inside the My files / Shared with me content views). Seed the tree with the root items too, so each workspace is a first-class, lazily-expandable sidebar entry (the main workspace already renders as "Espace de stockage" via getItemTitle). Matches docs/assets/Drive_screenshot.png. --- CHANGELOG.md | 1 + .../explorer/components/GlobalExplorerContext.tsx | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf354c789..04eb791d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to ### Added +- ✨(frontend) show the user's workspaces (personal + shared/team drives) in the sidebar - ✨(backend) allow converting a file while it is being analyzed - ✨(frontend) add file type, contact and modification date topbar filters - ✨(frontend) add location, file type, contact and date search filters diff --git a/src/frontend/apps/drive/src/features/explorer/components/GlobalExplorerContext.tsx b/src/frontend/apps/drive/src/features/explorer/components/GlobalExplorerContext.tsx index 718f54c02..02ef28c3f 100644 --- a/src/frontend/apps/drive/src/features/explorer/components/GlobalExplorerContext.tsx +++ b/src/frontend/apps/drive/src/features/explorer/components/GlobalExplorerContext.tsx @@ -331,6 +331,18 @@ const TreeProviderInitializer = ({ }; items.push(favoritesNode); + + // The user's workspaces (root items) as top-level sidebar entries: the + // personal main workspace ("Espace de stockage") plus every shared/team + // drive they can access. Each node is lazily expandable through the tree's + // onLoadChildren handler, like any other item. + const workspaces = await getDriver().getItems({ type: ItemType.FOLDER }); + items.push( + ...(itemsToTreeItems( + workspaces.children, + ) as TreeViewDataType[]), + ); + treeContext?.treeData.resetTree(items); setTreeIsInitialized(true); };