[ARVADOS-WORKBENCH2] updated: 1.1.4-296-g2bacdd6

Git user git at public.curoverse.com
Fri Jul 13 10:44:53 EDT 2018


Summary of changes:
 .../context-menu/context-menu-item-set.ts                           | 2 +-
 src/components/context-menu/context-menu.tsx                        | 6 ++++--
 src/views-components/context-menu/context-menu.tsx                  | 6 +++---
 src/views-components/context-menu/item-sets/empty-item-set.ts       | 2 +-
 src/views-components/context-menu/item-sets/project-item-set.ts     | 2 +-
 .../context-menu/item-sets/root-project-item-set.ts                 | 2 +-
 6 files changed, 11 insertions(+), 9 deletions(-)
 rename src/{views-components => components}/context-menu/context-menu-item-set.ts (80%)

       via  2bacdd68aa91e8b982b4d320f60135962de692b8 (commit)
      from  87dad7df1d3e32afccf7357df1b1d39af5a98154 (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 2bacdd68aa91e8b982b4d320f60135962de692b8
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Fri Jul 13 16:44:38 2018 +0200

    Move ContextMenuItemSet type to components
    
    Feature #13805
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/views-components/context-menu/context-menu-item-set.ts b/src/components/context-menu/context-menu-item-set.ts
similarity index 80%
rename from src/views-components/context-menu/context-menu-item-set.ts
rename to src/components/context-menu/context-menu-item-set.ts
index 0b207ad..8ff2334 100644
--- a/src/views-components/context-menu/context-menu-item-set.ts
+++ b/src/components/context-menu/context-menu-item-set.ts
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { Dispatch } from "redux";
-import { ContextMenuItemGroup, ContextMenuItem } from "../../components/context-menu/context-menu";
+import { ContextMenuItemGroup, ContextMenuItem } from "./context-menu";
 import { ContextMenuResource } from "../../store/context-menu/context-menu-reducer";
 
 export interface ContextMenuItemSet {
diff --git a/src/components/context-menu/context-menu.tsx b/src/components/context-menu/context-menu.tsx
index a7b83bc..8da8975 100644
--- a/src/components/context-menu/context-menu.tsx
+++ b/src/components/context-menu/context-menu.tsx
@@ -5,6 +5,7 @@ import * as React from "react";
 import { Popover, List, ListItem, ListItemIcon, ListItemText, Divider } from "@material-ui/core";
 import { DefaultTransformOrigin } from "../popover/helpers";
 import IconBase, { IconTypes } from "../icon/icon";
+import { ContextMenuItemSet } from "./context-menu-item-set";
 
 export interface ContextMenuItem {
     name: string;
@@ -15,14 +16,15 @@ export type ContextMenuItemGroup = ContextMenuItem[];
 
 export interface ContextMenuProps {
     anchorEl?: HTMLElement;
-    items: ContextMenuItemGroup[];
+    itemSet: ContextMenuItemSet;
     onItemClick: (action: ContextMenuItem) => void;
     onClose: () => void;
 }
 
 export default class ContextMenu extends React.PureComponent<ContextMenuProps> {
     render() {
-        const { anchorEl, items, onClose, onItemClick } = this.props;
+        const { anchorEl, itemSet, onClose, onItemClick } = this.props;
+        const items = itemSet.getItems();
         return <Popover
             anchorEl={anchorEl}
             open={!!anchorEl}
diff --git a/src/views-components/context-menu/context-menu.tsx b/src/views-components/context-menu/context-menu.tsx
index b7654f8..f64321d 100644
--- a/src/views-components/context-menu/context-menu.tsx
+++ b/src/views-components/context-menu/context-menu.tsx
@@ -8,15 +8,15 @@ import actions from "../../store/context-menu/context-menu-actions";
 import ContextMenu, { ContextMenuProps, ContextMenuItem } from "../../components/context-menu/context-menu";
 import { createAnchorAt } from "../../components/popover/helpers";
 import { ContextMenuResource } from "../../store/context-menu/context-menu-reducer";
-import { ContextMenuItemSet } from "./context-menu-item-set";
+import { ContextMenuItemSet } from "../../components/context-menu/context-menu-item-set";
 import { emptyItemSet } from "./item-sets/empty-item-set";
 
-type DataProps = Pick<ContextMenuProps, "anchorEl" | "items"> & { resource?: ContextMenuResource };
+type DataProps = Pick<ContextMenuProps, "anchorEl" | "itemSet"> & { resource?: ContextMenuResource };
 const mapStateToProps = (state: RootState): DataProps => {
     const { position, resource } = state.contextMenu;
     return {
         anchorEl: resource ? createAnchorAt(position) : undefined,
-        items: getMenuItemSet(resource).getItems(),
+        itemSet: getMenuItemSet(resource),
         resource
     };
 };
diff --git a/src/views-components/context-menu/item-sets/empty-item-set.ts b/src/views-components/context-menu/item-sets/empty-item-set.ts
index 9ebf065..f7ca27e 100644
--- a/src/views-components/context-menu/item-sets/empty-item-set.ts
+++ b/src/views-components/context-menu/item-sets/empty-item-set.ts
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { ContextMenuItemGroup } from "../../../components/context-menu/context-menu";
-import { ContextMenuItemSet } from "../context-menu-item-set";
+import { ContextMenuItemSet } from "../../../components/context-menu/context-menu-item-set";
 
 export const emptyItemSet: ContextMenuItemSet = {
     getItems: () => items,
diff --git a/src/views-components/context-menu/item-sets/project-item-set.ts b/src/views-components/context-menu/item-sets/project-item-set.ts
index 9cda327..d28542d 100644
--- a/src/views-components/context-menu/item-sets/project-item-set.ts
+++ b/src/views-components/context-menu/item-sets/project-item-set.ts
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { ContextMenuItemGroup } from "../../../components/context-menu/context-menu";
-import { ContextMenuItemSet } from "../context-menu-item-set";
+import { ContextMenuItemSet } from "../../../components/context-menu/context-menu-item-set";
 import actions from "../../../store/project/project-action";
 import { IconTypes } from "../../../components/icon/icon";
 
diff --git a/src/views-components/context-menu/item-sets/root-project-item-set.ts b/src/views-components/context-menu/item-sets/root-project-item-set.ts
index 906424a..113102a 100644
--- a/src/views-components/context-menu/item-sets/root-project-item-set.ts
+++ b/src/views-components/context-menu/item-sets/root-project-item-set.ts
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { ContextMenuItemGroup } from "../../../components/context-menu/context-menu";
-import { ContextMenuItemSet } from "../context-menu-item-set";
+import { ContextMenuItemSet } from "../../../components/context-menu/context-menu-item-set";
 import actions from "../../../store/project/project-action";
 import { IconTypes } from "../../../components/icon/icon";
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list