From 1313e9c9a5f250b71aa8136c077176c38b8db902 Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Fri, 4 Feb 2022 12:43:44 -0300 Subject: [PATCH] 18661: Loads project contents first to clear the screen earlier. This will probably also avoid flaky tests when right-clicking on project's items soon to be removed from the listing. (see #16951) Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- .../project-panel/project-panel-middleware-service.ts | 1 - src/store/workbench/workbench-actions.ts | 10 ++++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/store/project-panel/project-panel-middleware-service.ts b/src/store/project-panel/project-panel-middleware-service.ts index 45650843..be569b49 100644 --- a/src/store/project-panel/project-panel-middleware-service.ts +++ b/src/store/project-panel/project-panel-middleware-service.ts @@ -50,7 +50,6 @@ export class ProjectPanelMiddlewareService extends DataExplorerMiddlewareService try { api.dispatch(progressIndicatorActions.START_WORKING(this.getId())); const response = await this.services.groupsService.contents(projectUuid, getParams(dataExplorer, !!isProjectTrashed)); - api.dispatch(progressIndicatorActions.PERSIST_STOP_WORKING(this.getId())); const resourceUuids = response.items.map(item => item.uuid); api.dispatch(updateFavorites(resourceUuids)); api.dispatch(updatePublicFavorites(resourceUuids)); diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts index 2de90644..7a477376 100644 --- a/src/store/workbench/workbench-actions.ts +++ b/src/store/workbench/workbench-actions.ts @@ -201,20 +201,18 @@ export const loadProject = (uuid: string) => // Load another users home projects dispatch(finishLoadingProject(uuid)); } else if (userUuid !== uuid) { + await dispatch(finishLoadingProject(uuid)); const match = await loadGroupContentsResource({ uuid, userUuid, services }); match({ - OWNED: async project => { - await dispatch(finishLoadingProject(project)); + OWNED: async () => { await dispatch(activateSidePanelTreeItem(uuid)); dispatch(setSidePanelBreadcrumbs(uuid)); }, - SHARED: async project => { - await dispatch(finishLoadingProject(project)); + SHARED: async () => { await dispatch(activateSidePanelTreeItem(uuid)); dispatch(setSharedWithMeBreadcrumbs(uuid)); }, - TRASHED: async project => { - await dispatch(finishLoadingProject(project)); + TRASHED: async () => { await dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.TRASH)); dispatch(setTrashBreadcrumbs(uuid)); dispatch(setIsProjectPanelTrashed(true)); -- 2.30.2