18661: Loads project contents first to clear the screen earlier.
authorLucas Di Pentima <lucas.dipentima@curii.com>
Fri, 4 Feb 2022 15:43:44 +0000 (12:43 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Fri, 4 Feb 2022 15:43:44 +0000 (12:43 -0300)
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 <lucas.dipentima@curii.com>

src/store/project-panel/project-panel-middleware-service.ts
src/store/workbench/workbench-actions.ts

index 456508437c9beb10bee2c04fa9cfebc6cdaba6d6..be569b49ff0276aa031f1467aec896d08c32989b 100644 (file)
@@ -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<any>(updateFavorites(resourceUuids));
                 api.dispatch<any>(updatePublicFavorites(resourceUuids));
index 2de90644bbb0a29c78276576e8b5fdcc77dad4e7..7a477376dbcd124a59e98764b198f76b1cc94553 100644 (file)
@@ -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<any>(setSidePanelBreadcrumbs(uuid));
                     },
-                    SHARED: async project => {
-                        await dispatch(finishLoadingProject(project));
+                    SHARED: async () => {
                         await dispatch(activateSidePanelTreeItem(uuid));
                         dispatch<any>(setSharedWithMeBreadcrumbs(uuid));
                     },
-                    TRASHED: async project => {
-                        await dispatch(finishLoadingProject(project));
+                    TRASHED: async () => {
                         await dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.TRASH));
                         dispatch<any>(setTrashBreadcrumbs(uuid));
                         dispatch(setIsProjectPanelTrashed(true));