From 7889b2946c77867e3bfed76ec787bb36be67f3e2 Mon Sep 17 00:00:00 2001 From: Lisa Knox Date: Fri, 1 Mar 2024 15:24:01 -0500 Subject: [PATCH] 21412: viewing another users home project now displays that users name Arvados-DCO-1.1-Signed-off-by: Lisa Knox --- .../src/store/breadcrumbs/breadcrumbs-actions.ts | 8 ++++++++ .../workbench2/src/store/workbench/workbench-actions.ts | 1 + 2 files changed, 9 insertions(+) diff --git a/services/workbench2/src/store/breadcrumbs/breadcrumbs-actions.ts b/services/workbench2/src/store/breadcrumbs/breadcrumbs-actions.ts index 69554676e7..a374fd1a24 100644 --- a/services/workbench2/src/store/breadcrumbs/breadcrumbs-actions.ts +++ b/services/workbench2/src/store/breadcrumbs/breadcrumbs-actions.ts @@ -79,6 +79,14 @@ export const setSidePanelBreadcrumbs = (uuid: string) => uuid: SidePanelTreeCategory.PROJECTS, icon: getSidePanelIcon(SidePanelTreeCategory.PROJECTS) }); + } else if (uuidKind === ResourceKind.USER) { + // Handle another user root project + const user = getResource(uuid)(getState().resources); + breadcrumbs.push({ + label: (user as any)?.fullName || SidePanelTreeCategory.PROJECTS, + uuid: user?.uuid || uuid, + icon: getSidePanelIcon(SidePanelTreeCategory.PROJECTS) + }); } else if (Object.values(SidePanelTreeCategory).includes(uuid as SidePanelTreeCategory)) { // Handle SidePanelTreeCategory root breadcrumbs.push({ diff --git a/services/workbench2/src/store/workbench/workbench-actions.ts b/services/workbench2/src/store/workbench/workbench-actions.ts index 42a1033dde..83c457f94d 100644 --- a/services/workbench2/src/store/workbench/workbench-actions.ts +++ b/services/workbench2/src/store/workbench/workbench-actions.ts @@ -247,6 +247,7 @@ export const loadProject = (uuid: string) => if (extractUuidKind(uuid) === ResourceKind.USER && userUuid !== uuid) { // Load another users home projects dispatch(finishLoadingProject(uuid)); + dispatch(setSidePanelBreadcrumbs(uuid)); } else if (userUuid !== uuid) { await dispatch(finishLoadingProject(uuid)); const match = await loadGroupContentsResource({ -- 2.30.2