[ARVADOS-WORKBENCH2] updated: 1.1.4-170-gd42292e

Git user git at public.curoverse.com
Sat Jun 30 09:54:40 EDT 2018


Summary of changes:
 src/store/navigation/navigation-action.ts | 7 ++++++-
 src/views/workbench/workbench.tsx         | 8 +-------
 2 files changed, 7 insertions(+), 8 deletions(-)

       via  d42292e596bd6fa2185e15a09790521a93e26a64 (commit)
      from  789dabb5b8554237e5caa62a41a61f1793e8353e (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 d42292e596bd6fa2185e15a09790521a93e26a64
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Sat Jun 30 15:54:24 2018 +0200

    Fix incorrect projets item toggling
    
    Feature #13678
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/store/navigation/navigation-action.ts b/src/store/navigation/navigation-action.ts
index a4b9a8f..daeb26f 100644
--- a/src/store/navigation/navigation-action.ts
+++ b/src/store/navigation/navigation-action.ts
@@ -14,6 +14,7 @@ import dataExplorerActions from "../data-explorer/data-explorer-action";
 import { PROJECT_PANEL_ID } from "../../views/project-panel/project-panel";
 import { projectPanelItems } from "../../views/project-panel/project-panel-selectors";
 import { RootState } from "../store";
+import { sidePanelData } from "../side-panel/side-panel-reducer";
 
 export const getResourceUrl = (resource: Resource): string => {
     switch (resource.kind) {
@@ -31,12 +32,16 @@ export enum ItemMode {
 
 export const setProjectItem = (itemId: string, itemMode: ItemMode) =>
     (dispatch: Dispatch, getState: () => RootState) => {
-        const { projects, router } = getState();
+        const { projects, router, sidePanel } = getState();
         const treeItem = findTreeItem(projects.items, itemId);
 
         if (treeItem) {
 
             dispatch(sidePanelActions.RESET_SIDE_PANEL_ACTIVITY());
+            const projectsItem = sidePanelData[0];
+            if(sidePanel.some(item => item.id === projectsItem.id && !item.open)){
+                dispatch(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_OPEN(projectsItem.id));
+            }
 
             if (itemMode === ItemMode.OPEN || itemMode === ItemMode.BOTH) {
                 dispatch(projectActions.TOGGLE_PROJECT_TREE_ITEM_OPEN(treeItem.data.uuid));
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 85ed90c..b8baead 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -202,16 +202,10 @@ class Workbench extends React.Component<WorkbenchProps, WorkbenchState> {
     }
 
     renderProjectPanel = (props: RouteComponentProps<{ id: string }>) => <ProjectPanel
-        onItemRouteChange={this.handleItemRouteChange}
+        onItemRouteChange={itemId => this.props.dispatch<any>(setProjectItem(itemId, ItemMode.ACTIVE))}
         onItemClick={item => this.props.dispatch<any>(setProjectItem(item.uuid, ItemMode.ACTIVE))}
         {...props} />
 
-    handleItemRouteChange = (itemId: string) => {
-        this.props.dispatch<any>(sidePanelActions.RESET_SIDE_PANEL_ACTIVITY());
-        this.props.dispatch<any>(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_OPEN(sidePanelData[0].id));
-        this.props.dispatch<any>(setProjectItem(itemId, ItemMode.ACTIVE));
-    }
-
 }
 
 export default connect<WorkbenchDataProps>(

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list