[ARVADOS-WORKBENCH2] updated: 1.1.4-519-g4a24786

Git user git at public.curoverse.com
Fri Aug 3 07:01:54 EDT 2018


Summary of changes:
 src/models/tree.ts                                                    | 2 +-
 src/store/collection-panel/collection-panel-action.ts                 | 2 +-
 .../collection-panel-files/collection-panel-files-actions.ts          | 3 +--
 .../collection-panel-files/collection-panel-files-reducer.test.ts     | 4 ++--
 ...tions-panel-files-reducer.ts => collection-panel-files-reducer.ts} | 2 +-
 src/store/store.ts                                                    | 2 +-
 6 files changed, 7 insertions(+), 8 deletions(-)
 rename src/store/collection-panel/collection-panel-files/{collections-panel-files-reducer.ts => collection-panel-files-reducer.ts} (98%)

       via  4a24786b1ab2199d3841226eed83be56a83645fc (commit)
      from  9438812a13875c06996ed7190f8faf21011910bd (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 4a24786b1ab2199d3841226eed83be56a83645fc
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Fri Aug 3 13:01:38 2018 +0200

    Fix CR comments
    
    Feature #13855
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/models/tree.ts b/src/models/tree.ts
index b9ef772..8b66e50 100644
--- a/src/models/tree.ts
+++ b/src/models/tree.ts
@@ -21,7 +21,7 @@ export const setNode = <T>(node: TreeNode<T>) => (tree: Tree<T>): Tree<T> => {
     const [newTree] = [tree]
         .map(tree => getNode(node.id)(tree) === node
             ? tree
-            : Object.assign({}, tree, { [node.id]: node }))
+            : {...tree, [node.id]: node})
         .map(addChild(node.parent, node.id));
     return newTree;
 };
diff --git a/src/store/collection-panel/collection-panel-action.ts b/src/store/collection-panel/collection-panel-action.ts
index 419f040..ee95590 100644
--- a/src/store/collection-panel/collection-panel-action.ts
+++ b/src/store/collection-panel/collection-panel-action.ts
@@ -29,7 +29,7 @@ export const loadCollection = (uuid: string, kind: ResourceKind) =>
                 return services.collectionFilesService.getFiles(item.uuid);
             })
             .then(files => {
-                dispatch(collectionPanelFilesAction.SET_COLLECTION_FILES({ files }));
+                dispatch(collectionPanelFilesAction.SET_COLLECTION_FILES(files));
             });
     };
 
diff --git a/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts b/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
index 7423c49..463d49c 100644
--- a/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
+++ b/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
@@ -3,11 +3,10 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { default as unionize, ofType, UnionOf } from "unionize";
-import { KeepManifest } from "../../../models/keep-manifest";
 import { CollectionFilesTree } from "../../../models/collection-file";
 
 export const collectionPanelFilesAction = unionize({
-    SET_COLLECTION_FILES: ofType<{ files: CollectionFilesTree }>(),
+    SET_COLLECTION_FILES: ofType<CollectionFilesTree>(),
     TOGGLE_COLLECTION_FILE_COLLAPSE: ofType<{ id: string }>(),
     TOGGLE_COLLECTION_FILE_SELECTION: ofType<{ id: string }>(),
     SELECT_ALL_COLLECTION_FILES: ofType<{}>(),
diff --git a/src/store/collection-panel/collection-panel-files/collection-panel-files-reducer.test.ts b/src/store/collection-panel/collection-panel-files/collection-panel-files-reducer.test.ts
index 636b592..1a6bb7d 100644
--- a/src/store/collection-panel/collection-panel-files/collection-panel-files-reducer.test.ts
+++ b/src/store/collection-panel/collection-panel-files/collection-panel-files-reducer.test.ts
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { collectionPanelFilesReducer } from "./collections-panel-files-reducer";
+import { collectionPanelFilesReducer } from "./collection-panel-files-reducer";
 import { collectionPanelFilesAction } from "./collection-panel-files-actions";
 import { CollectionFile, CollectionDirectory, createCollectionFile, createCollectionDirectory } from "../../../models/collection-file";
 import { createTree, setNode, getNodeValue, mapTreeValues, Tree } from "../../../models/tree";
@@ -31,7 +31,7 @@ describe('CollectionPanelFilesReducer', () => {
 
     const collectionPanelFilesTree = collectionPanelFilesReducer(
         createTree<CollectionPanelFile | CollectionPanelDirectory>(),
-        collectionPanelFilesAction.SET_COLLECTION_FILES({ files: collectionFilesTree }));
+        collectionPanelFilesAction.SET_COLLECTION_FILES(collectionFilesTree));
 
     it('SET_COLLECTION_FILES', () => {
         expect(getNodeValue('Directory 1')(collectionPanelFilesTree)).toEqual({
diff --git a/src/store/collection-panel/collection-panel-files/collections-panel-files-reducer.ts b/src/store/collection-panel/collection-panel-files/collection-panel-files-reducer.ts
similarity index 98%
rename from src/store/collection-panel/collection-panel-files/collections-panel-files-reducer.ts
rename to src/store/collection-panel/collection-panel-files/collection-panel-files-reducer.ts
index c27000e..ca518f0 100644
--- a/src/store/collection-panel/collection-panel-files/collections-panel-files-reducer.ts
+++ b/src/store/collection-panel/collection-panel-files/collection-panel-files-reducer.ts
@@ -9,7 +9,7 @@ import { CollectionFileType } from "../../../models/collection-file";
 
 export const collectionPanelFilesReducer = (state: CollectionPanelFilesState = createTree(), action: CollectionPanelFilesAction) => {
     return collectionPanelFilesAction.match(action, {
-        SET_COLLECTION_FILES: ({ files }) =>
+        SET_COLLECTION_FILES: files =>
             mapTree(mapCollectionFileToCollectionPanelFile)(files),
 
         TOGGLE_COLLECTION_FILE_COLLAPSE: data =>
diff --git a/src/store/store.ts b/src/store/store.ts
index 6e57465..aeb6a09 100644
--- a/src/store/store.ts
+++ b/src/store/store.ts
@@ -17,7 +17,7 @@ import { reducer as formReducer } from 'redux-form';
 import { FavoritesState, favoritesReducer } from './favorites/favorites-reducer';
 import { snackbarReducer, SnackbarState } from './snackbar/snackbar-reducer';
 import { CollectionPanelFilesState } from './collection-panel/collection-panel-files/collection-panel-files-state';
-import { collectionPanelFilesReducer } from './collection-panel/collection-panel-files/collections-panel-files-reducer';
+import { collectionPanelFilesReducer } from './collection-panel/collection-panel-files/collection-panel-files-reducer';
 import { dataExplorerMiddleware } from "./data-explorer/data-explorer-middleware";
 import { FAVORITE_PANEL_ID } from "./favorite-panel/favorite-panel-action";
 import { PROJECT_PANEL_ID } from "./project-panel/project-panel-action";

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list