[ARVADOS-WORKBENCH2] updated: 1.1.4-304-g9320734
Git user
git at public.curoverse.com
Tue Jul 17 05:13:47 EDT 2018
Summary of changes:
src/components/breadcrumbs/breadcrumbs.tsx | 5 +-
.../dialog-create/dialog-project-create.tsx | 4 +-
.../main-app-bar/main-app-bar.test.tsx | 4 +
src/views-components/project-list/project-list.tsx | 61 --------
src/views/project-panel/project-panel.tsx | 18 ++-
src/views/workbench/workbench.tsx | 168 +++++++++++----------
6 files changed, 103 insertions(+), 157 deletions(-)
delete mode 100644 src/views-components/project-list/project-list.tsx
via 9320734bb358e7148918da13e81ebba59ecf16e8 (commit)
via e046567a3f6fd8bec3113cec513d4a125054caf0 (commit)
via 4d124b29e9f45d674c1cb784a4789ec980125bd1 (commit)
via b323a94f313671b44a066a2f91dea562e9464d10 (commit)
via 5be1434f78d6dbcf2949918f7f042cab994ab0c5 (commit)
via 2d35cbd012daca122052739564120863fefebfce (commit)
from 090241b266abe8558664a85b7e8e1b93c9ad60d0 (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 9320734bb358e7148918da13e81ebba59ecf16e8
Merge: 090241b e046567
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Tue Jul 17 11:11:06 2018 +0200
Merge branch 'master'
Feature #13805
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --cc src/views/workbench/workbench.tsx
index 13e22d8,c9b5b67..c7bfc8b
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@@ -250,8 -179,132 +167,93 @@@ class Workbench extends React.Component
this.props.dispatch<any>(loadDetails(item.uuid, ResourceKind.Project));
}}
{...props} />
+
+ mainAppBarActions: MainAppBarActionProps = {
+ onBreadcrumbClick: ({ itemId }: NavBreadcrumb) => {
+ this.props.dispatch<any>(setProjectItem(itemId, ItemMode.BOTH));
+ this.props.dispatch<any>(loadDetails(itemId, ResourceKind.Project));
+ },
+ onSearch: searchText => {
+ this.setState({ searchText });
+ this.props.dispatch(push(`/search?q=${searchText}`));
+ },
+ onMenuItemClick: (menuItem: NavMenuItem) => menuItem.action(),
+ onDetailsPanelToggle: () => {
+ this.props.dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
+ },
+ onContextMenu: (event: React.MouseEvent<HTMLElement>, breadcrumb: NavBreadcrumb) => {
- this.openContextMenu(event, breadcrumb.itemId);
++ this.openContextMenu(event, breadcrumb.itemId, ContextMenuKind.Project);
+ }
+ };
+
+ toggleSidePanelOpen = (itemId: string) => {
+ this.props.dispatch(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_OPEN(itemId));
+ }
+
+ toggleSidePanelActive = (itemId: string) => {
+ this.props.dispatch(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_ACTIVE(itemId));
+ this.props.dispatch(projectActions.RESET_PROJECT_TREE_ACTIVITY(itemId));
+ this.props.dispatch(push("/"));
+ }
+
+ handleCreationDialogOpen = (itemUuid: string) => {
- this.closeContextMenu();
+ this.props.dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: itemUuid }));
+ }
+
-
- openContextMenu = (event: React.MouseEvent<HTMLElement>, itemUuid: string) => {
++ openContextMenu = (event: React.MouseEvent<HTMLElement>, itemUuid: string, kind: ContextMenuKind) => {
+ event.preventDefault();
- this.setState({
- contextMenu: {
- anchorEl: mockAnchorFromMouseEvent(event),
- itemUuid
- }
- });
- }
-
- closeContextMenu = () => {
- this.setState({ contextMenu: {} });
++ this.props.dispatch(
++ contextMenuActions.OPEN_CONTEXT_MENU({
++ position: { x: event.clientX, y: event.clientY },
++ resource: { uuid: itemUuid, kind }
++ })
++ );
+ }
+
- openCreateDialog = (item: ContextMenuAction) => {
- const { itemUuid } = this.state.contextMenu;
- if (item.openCreateDialog && itemUuid) {
- this.handleCreationDialogOpen(itemUuid);
- }
- }
-}
+
-const contextMenuActions = [[{
- icon: "fas fa-plus fa-fw",
- name: "New project",
- openCreateDialog: true
-}, {
- icon: "fas fa-users fa-fw",
- name: "Share"
-}, {
- icon: "fas fa-sign-out-alt fa-fw",
- name: "Move to"
-}, {
- icon: "fas fa-star fa-fw",
- name: "Add to favourite"
-}, {
- icon: "fas fa-edit fa-fw",
- name: "Rename"
-}, {
- icon: "fas fa-copy fa-fw",
- name: "Make a copy"
-}, {
- icon: "fas fa-download fa-fw",
- name: "Download"
-}], [{
- icon: "fas fa-trash-alt fa-fw",
- name: "Remove"
}
-]];
+ const drawerWidth = 240;
+ const appBarHeight = 100;
+
+ type CssRules = 'root' | 'appBar' | 'drawerPaper' | 'content' | 'contentWrapper' | 'toolbar';
+
+ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
+ root: {
+ flexGrow: 1,
+ zIndex: 1,
+ overflow: 'hidden',
+ position: 'relative',
+ display: 'flex',
+ width: '100vw',
+ height: '100vh'
+ },
+ appBar: {
+ zIndex: theme.zIndex.drawer + 1,
+ position: "absolute",
+ width: "100%"
+ },
+ drawerPaper: {
+ position: 'relative',
+ width: drawerWidth,
+ display: 'flex',
+ flexDirection: 'column',
+ },
+ contentWrapper: {
+ backgroundColor: theme.palette.background.default,
+ display: "flex",
+ flexGrow: 1,
+ minWidth: 0,
+ paddingTop: appBarHeight
+ },
+ content: {
+ padding: `${theme.spacing.unit}px ${theme.spacing.unit * 3}px`,
+ overflowY: "auto",
+ flexGrow: 1
+ },
+ toolbar: theme.mixins.toolbar
+ });
+
export default connect<WorkbenchDataProps>(
(state: RootState) => ({
projects: state.projects.items,
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list