[ARVADOS-WORKBENCH2] updated: 1.2.0-133-gef64966

Git user git at public.curoverse.com
Sat Aug 25 17:15:55 EDT 2018


Summary of changes:
 .../side-panel-tree/side-panel-tree-actions.ts     | 23 ++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

       via  ef649661d35999d3d6847861185172fac3e92db1 (commit)
      from  1e32e6134cd53c30cd8a9410572a443b37f76f2e (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 ef649661d35999d3d6847861185172fac3e92db1
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Sat Aug 25 23:15:41 2018 +0200

    Fix side panel item double collapsing
    
    Feature #14102
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index 2fe5aba..377f420 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -102,9 +102,7 @@ export const activateSidePanelTreeProject = (nodeId: string) =>
         const node = getSidePanelTreeNode(nodeId)(getState());
         if (node && node.status !== TreeItemStatus.LOADED) {
             await dispatch<any>(loadSidePanelTreeProjects(nodeId));
-            if (node.collapsed) {
-                dispatch<any>(toggleSidePanelTreeItemCollapse(nodeId));
-            }
+            dispatch<any>(expandSidePanelTreeItem(nodeId));
         } else if (node === undefined) {
             await dispatch<any>(activateSidePanelTreeBranch(nodeId));
         }
@@ -117,11 +115,24 @@ export const activateSidePanelTreeBranch = (nodeId: string) =>
             await dispatch<any>(loadSidePanelTreeProjects(ancestor.uuid));
         }
         for (const ancestor of ancestors) {
-            dispatch<any>(toggleSidePanelTreeItemCollapse(ancestor.uuid));
+            dispatch<any>(expandSidePanelTreeItem(ancestor.uuid));
         }
         dispatch(treePickerActions.TOGGLE_TREE_PICKER_NODE_SELECT({ nodeId, pickerId: SIDE_PANEL_TREE }));
     };
 
+export const toggleSidePanelTreeItemCollapse = (nodeId: string) =>
+    async (dispatch: Dispatch, getState: () => RootState) => {
+        dispatch(treePickerActions.TOGGLE_TREE_PICKER_NODE_COLLAPSE({ nodeId, pickerId: SIDE_PANEL_TREE }));
+    };
+
+export const expandSidePanelTreeItem = (nodeId: string) =>
+    async (dispatch: Dispatch, getState: () => RootState) => {
+        const node = getSidePanelTreeNode(nodeId)(getState());
+        if (node && node.collapsed) {
+            dispatch(treePickerActions.TOGGLE_TREE_PICKER_NODE_COLLAPSE({ nodeId, pickerId: SIDE_PANEL_TREE }));
+        }
+    };
+
 const getSidePanelTreeNode = (nodeId: string) => (state: RootState) => {
     const sidePanelTree = getTreePicker(SIDE_PANEL_TREE)(state.treePicker);
     return sidePanelTree
@@ -129,7 +140,3 @@ const getSidePanelTreeNode = (nodeId: string) => (state: RootState) => {
         : undefined;
 };
 
-export const toggleSidePanelTreeItemCollapse = (nodeId: string) =>
-    async (dispatch: Dispatch, getState: () => RootState) => {
-        dispatch(treePickerActions.TOGGLE_TREE_PICKER_NODE_COLLAPSE({ nodeId, pickerId: SIDE_PANEL_TREE }));
-    };

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list