From e364e8697dff2661ca386f14c38af9040af9fc8e Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Fri, 10 Jul 2020 14:51:41 -0300 Subject: [PATCH] 15610: Clears the collection's files panel before loading the UI. This avoids flickering on the files panel. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- src/store/collection-panel/collection-panel-action.ts | 3 --- src/store/workbench/workbench-actions.ts | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/store/collection-panel/collection-panel-action.ts b/src/store/collection-panel/collection-panel-action.ts index 35c3c3d3..13943665 100644 --- a/src/store/collection-panel/collection-panel-action.ts +++ b/src/store/collection-panel/collection-panel-action.ts @@ -5,8 +5,6 @@ import { Dispatch } from "redux"; import { loadCollectionFiles, COLLECTION_PANEL_LOAD_FILES_THRESHOLD } from "./collection-panel-files/collection-panel-files-actions"; import { CollectionResource } from '~/models/collection'; -import { collectionPanelFilesAction } from "./collection-panel-files/collection-panel-files-actions"; -import { createTree } from "~/models/tree"; import { RootState } from "~/store/store"; import { ServiceRepository } from "~/services/services"; import { TagProperty } from "~/models/tag"; @@ -32,7 +30,6 @@ export const COLLECTION_TAG_FORM_NAME = 'collectionTagForm'; export const loadCollectionPanel = (uuid: string) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { dispatch(collectionPanelActions.LOAD_COLLECTION({ uuid })); - dispatch(collectionPanelFilesAction.SET_COLLECTION_FILES({ files: createTree() })); const collection = await services.collectionService.get(uuid); dispatch(loadDetailsPanel(collection.uuid)); dispatch(collectionPanelActions.LOAD_COLLECTION_SUCCESS({ item: collection })); diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts index e2ff01f7..944c48cf 100644 --- a/src/store/workbench/workbench-actions.ts +++ b/src/store/workbench/workbench-actions.ts @@ -101,6 +101,8 @@ import { subprocessPanelActions } from '~/store/subprocess-panel/subprocess-pane import { subprocessPanelColumns } from '~/views/subprocess-panel/subprocess-panel-root'; import { loadAllProcessesPanel, allProcessesPanelActions } from '../all-processes-panel/all-processes-panel-action'; import { allProcessesPanelColumns } from '~/views/all-processes-panel/all-processes-panel'; +import { collectionPanelFilesAction } from '../collection-panel/collection-panel-files/collection-panel-files-actions'; +import { createTree } from '~/models/tree'; export const WORKBENCH_LOADING_SCREEN = 'workbenchLoadingScreen'; @@ -278,6 +280,8 @@ export const loadCollection = (uuid: string) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { const userUuid = getUserUuid(getState()); if (userUuid) { + // Clear collection files panel + dispatch(collectionPanelFilesAction.SET_COLLECTION_FILES({ files: createTree() })); const match = await loadGroupContentsResource({ uuid, userUuid, services }); match({ OWNED: async collection => { -- 2.30.2