[ARVADOS-WORKBENCH2] updated: 2.1.0-219-gf82ac87b
Git user
git at public.arvados.org
Sat Feb 27 22:20:40 UTC 2021
Summary of changes:
src/plugins/example/index.tsx | 8 ++++++--
src/store/workbench/workbench-actions.ts | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
via f82ac87b7f774992dfba72a5b4f401b8fc037c9f (commit)
from ddaff5cb9937340eed1c8f3b59053146dcefa3b8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit f82ac87b7f774992dfba72a5b4f401b8fc037c9f
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Sat Feb 27 17:20:26 2021 -0500
17426: Fix stuck on loading screen.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/src/plugins/example/index.tsx b/src/plugins/example/index.tsx
index b8bfcb0f..6e2b1dee 100644
--- a/src/plugins/example/index.tsx
+++ b/src/plugins/example/index.tsx
@@ -18,6 +18,7 @@ import { DispatchProp, connect } from 'react-redux';
import { MenuItem } from "@material-ui/core";
import { propertiesActions } from '~/store/properties/properties-actions';
import { Location } from 'history';
+import { handleFirstTimeLoad } from '~/store/workbench/workbench-actions';
const categoryName = "Plugin Example";
export const routePath = "/examplePlugin";
@@ -73,8 +74,11 @@ export const register = (pluginConfig: PluginConfig) => {
pluginConfig.locationChangeHandlers.push((store: RootStore, pathname: string): boolean => {
if (matchPath(pathname, { path: routePath, exact: true })) {
- store.dispatch(activateSidePanelTreeItem(categoryName));
- store.dispatch<any>(setSidePanelBreadcrumbs(categoryName));
+ store.dispatch(handleFirstTimeLoad(
+ (dispatch: Dispatch) => {
+ dispatch<any>(activateSidePanelTreeItem(categoryName));
+ dispatch<any>(setSidePanelBreadcrumbs(categoryName));
+ }));
return true;
}
return false;
diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts
index 217c8524..8ea19a14 100644
--- a/src/store/workbench/workbench-actions.ts
+++ b/src/store/workbench/workbench-actions.ts
@@ -110,7 +110,7 @@ export const isWorkbenchLoading = (state: RootState) => {
return progress ? progress.working : false;
};
-const handleFirstTimeLoad = (action: any) =>
+export const handleFirstTimeLoad = (action: any) =>
async (dispatch: Dispatch<any>, getState: () => RootState) => {
try {
await dispatch(action);
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list