[ARVADOS-WORKBENCH2] updated: 1.2.0-306-ge6079cd

Git user git at public.curoverse.com
Thu Sep 6 11:08:45 EDT 2018


Summary of changes:
 .../details-panel/details-panel.tsx                |  33 ++---
 .../main-content-bar/main-content-bar.tsx          |  18 +--
 src/views-components/side-panel/side-panel.tsx     |  23 ++--
 src/views/workbench/workbench.tsx                  | 134 +++++++++++----------
 4 files changed, 111 insertions(+), 97 deletions(-)

       via  e6079cd17a140bb75d4b104161902d487823aa36 (commit)
      from  335bd7cfdc7f978089613a3f4a991f05229c1365 (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 e6079cd17a140bb75d4b104161902d487823aa36
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Thu Sep 6 17:07:50 2018 +0200

    Create main-content-bar, update workbench layout
    
    Feature #14149
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/views-components/details-panel/details-panel.tsx b/src/views-components/details-panel/details-panel.tsx
index 7aae786..c0d4797 100644
--- a/src/views-components/details-panel/details-panel.tsx
+++ b/src/views-components/details-panel/details-panel.tsx
@@ -22,20 +22,24 @@ import { DetailsData } from "./details-data";
 import { DetailsResource } from "~/models/details";
 import { getResource } from '../../store/resources/resources';
 
-type CssRules = 'drawerPaper' | 'container' | 'opened' | 'headerContainer' | 'headerIcon' | 'headerTitle' | 'tabContainer';
+type CssRules = 'root' | 'container' | 'opened' | 'headerContainer' | 'headerIcon' | 'headerTitle' | 'tabContainer';
 
 const drawerWidth = 320;
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
-    container: {
+    root: {
         width: 0,
-        position: 'relative',
-        height: 'auto',
+        overflowX: 'hidden',
         transition: 'width 0.5s ease',
-        '&$opened': {
-            width: drawerWidth
-        }
+        background: theme.palette.background.paper,
+        borderLeft: `1px solid ${theme.palette.divider}`,
+        height: '100%',
+    },
+    opened: {
+        width: drawerWidth,
+    },
+    container: {
+        width: drawerWidth,
     },
-    opened: {},
     drawerPaper: {
         position: 'relative',
         width: drawerWidth
@@ -113,10 +117,9 @@ export const DetailsPanel = withStyles(styles)(
                 const { classes, onCloseDrawer, isOpened, item } = this.props;
                 const { tabsValue } = this.state;
                 return (
-                    <Typography component="div"
-                        className={classnames([classes.container, { [classes.opened]: isOpened }])}>
-                        <Drawer variant="permanent" anchor="right" classes={{ paper: classes.drawerPaper }}>
-                            <Typography component="div" className={classes.headerContainer}>
+                    <div className={classnames([classes.root, { [classes.opened]: isOpened }])}>
+                        <div className={classes.container}>
+                            <div className={classes.headerContainer}>
                                 <Grid container alignItems='center' justify='space-around'>
                                     <Grid item xs={2}>
                                         {item.getIcon(classes.headerIcon)}
@@ -132,7 +135,7 @@ export const DetailsPanel = withStyles(styles)(
                                         </IconButton>
                                     </Grid>
                                 </Grid>
-                            </Typography>
+                            </div>
                             <Tabs value={tabsValue} onChange={this.handleChange}>
                                 <Tab disableRipple label="Details" />
                                 <Tab disableRipple label="Activity" disabled />
@@ -145,8 +148,8 @@ export const DetailsPanel = withStyles(styles)(
                             {tabsValue === 1 && this.renderTabContainer(
                                 <Grid container direction="column" />
                             )}
-                        </Drawer>
-                    </Typography>
+                        </div>
+                    </div>
                 );
             }
         }
diff --git a/src/views-components/main-content-bar/main-content-bar.tsx b/src/views-components/main-content-bar/main-content-bar.tsx
index 7506974..ae86fe5 100644
--- a/src/views-components/main-content-bar/main-content-bar.tsx
+++ b/src/views-components/main-content-bar/main-content-bar.tsx
@@ -17,12 +17,16 @@ export const MainContentBar = connect(undefined, {
     onDetailsPanelToggle: detailsPanelActions.TOGGLE_DETAILS_PANEL
 })((props: MainContentBarProps) =>
     <Toolbar>
-        <Grid justify="space-between">
-            <Breadcrumbs />
-            <IconButton color="inherit" onClick={props.onDetailsPanelToggle}>
-                <Tooltip title="Additional Info">
-                    <DetailsIcon />
-                </Tooltip>
-            </IconButton>
+        <Grid container>
+            <Grid container item xs alignItems="center">
+                <Breadcrumbs />
+            </Grid>
+            <Grid item>
+                <IconButton color="inherit" onClick={props.onDetailsPanelToggle}>
+                    <Tooltip title="Additional Info">
+                        <DetailsIcon />
+                    </Tooltip>
+                </IconButton>
+            </Grid>
         </Grid>
     </Toolbar>);
diff --git a/src/views-components/side-panel/side-panel.tsx b/src/views-components/side-panel/side-panel.tsx
index b81f39e..70bc92b 100644
--- a/src/views-components/side-panel/side-panel.tsx
+++ b/src/views-components/side-panel/side-panel.tsx
@@ -13,18 +13,16 @@ import { navigateFromSidePanel } from '../../store/side-panel/side-panel-action'
 
 const DRAWER_WITDH = 240;
 
-type CssRules = 'drawerPaper' | 'toolbar';
+type CssRules = 'root';
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
-    drawerPaper: {
-        position: 'relative',
+    root: {
+        background: theme.palette.background.paper,
+        borderRight: `1px solid ${theme.palette.divider}`,
+        height: '100%',
+        overflowX: 'auto',
         width: DRAWER_WITDH,
-        display: 'flex',
-        flexDirection: 'column',
-        paddingTop: 58,
-        overflow: 'auto',
-    },
-    toolbar: theme.mixins.toolbar
+    }
 });
 
 const mapDispatchToProps = (dispatch: Dispatch): SidePanelTreeProps => ({
@@ -37,9 +35,6 @@ export const SidePanel = compose(
     withStyles(styles),
     connect(undefined, mapDispatchToProps)
 )(({ classes, ...props }: WithStyles<CssRules> & SidePanelTreeProps) =>
-    <Drawer
-        variant="permanent"
-        classes={{ paper: classes.drawerPaper }}>
-        <div className={classes.toolbar} />
+    <div className={classes.root}>
         <SidePanelTree {...props} />
-    </Drawer>);
+    </div>);
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index c7c3d42..94ef7db 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -39,39 +39,29 @@ import { PartialCopyCollectionDialog } from '~/views-components/dialog-forms/par
 
 import { TrashPanel } from "~/views/trash-panel/trash-panel";
 import { MainContentBar } from '../../views-components/main-content-bar/main-content-bar';
+import { Grid } from '@material-ui/core';
 
-const APP_BAR_HEIGHT = 100;
-
-type CssRules = 'root' | 'appBar' | 'content' | 'contentWrapper';
+type CssRules = 'root' | 'contentWrapper' | 'content' | 'appBar';
 
 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%"
-    },
     contentWrapper: {
-        backgroundColor: theme.palette.background.default,
-        display: "flex",
-        flexGrow: 1,
+        background: theme.palette.background.default,
         minWidth: 0,
-        paddingTop: APP_BAR_HEIGHT
     },
     content: {
-        padding: `${theme.spacing.unit}px ${theme.spacing.unit * 3}px`,
-        overflowY: "auto",
-        flexGrow: 1,
-        position: 'relative'
+        minWidth: 0,
+        overflow: 'auto',
+        paddingLeft: theme.spacing.unit * 3,
+        paddingRight: theme.spacing.unit * 3,
     },
+    appBar: {
+        zIndex: 1,
+    }
 });
 
 interface WorkbenchDataProps {
@@ -107,51 +97,73 @@ export const Workbench = withStyles(styles)(
             };
 
             render() {
-                const { classes, user } = this.props;
-                return (
-                    <div className={classes.root}>
-                        <div className={classes.appBar}>
+                return <>
+                    <Grid
+                        container
+                        direction="column"
+                        className={this.props.classes.root}>
+                        <Grid className={this.props.classes.appBar}>
                             <MainAppBar
                                 searchText={this.state.searchText}
                                 user={this.props.user}
                                 onSearch={this.onSearch} />
-                        </div>
-                        {user && <SidePanel />}
-                        <main className={classes.contentWrapper}>
-                            {this.props.user && <MainContentBar />}
-                            <div className={classes.content}>
-                                <Switch>
-                                    <Route path={Routes.PROJECTS} component={ProjectPanel} />
-                                    <Route path={Routes.COLLECTIONS} component={CollectionPanel} />
-                                    <Route path={Routes.FAVORITES} component={FavoritePanel} />
-                                    <Route path={Routes.PROCESSES} component={ProcessPanel} />
-                                    <Route path={Routes.TRASH} component={TrashPanel} />
-                                    <Route path={Routes.PROCESS_LOGS} component={ProcessLogPanel} />
-                                </Switch>
-                            </div>
-                            {user && <DetailsPanel />}
-                        </main>
-                        <ContextMenu />
-                        <Snackbar />
-                        <CreateProjectDialog />
-                        <CreateCollectionDialog />
-                        <RenameFileDialog />
-                        <PartialCopyCollectionDialog />
-                        <FileRemoveDialog />
-                        <CopyCollectionDialog />
-                        <FileRemoveDialog />
-                        <MultipleFilesRemoveDialog />
-                        <UpdateCollectionDialog />
-                        <FilesUploadCollectionDialog />
-                        <UpdateProjectDialog />
-                        <MoveCollectionDialog />
-                        <MoveProjectDialog />
-                        <CurrentTokenDialog
-                            currentToken={this.props.currentToken}
-                            open={this.state.isCurrentTokenDialogOpen}
-                            handleClose={this.toggleCurrentTokenModal} />
-                    </div>
-                );
+                        </Grid>
+                        {this.props.user &&
+                            <Grid
+                                container
+                                item
+                                xs
+                                alignItems="stretch"
+                                wrap="nowrap">
+                                <Grid item>
+                                    <SidePanel />
+                                </Grid>
+                                <Grid
+                                    container
+                                    item
+                                    xs
+                                    component="main"
+                                    direction="column"
+                                    className={this.props.classes.contentWrapper}>
+                                    <Grid item>
+                                        <MainContentBar />
+                                    </Grid>
+                                    <Grid xs className={this.props.classes.content}>
+                                        <Switch>
+                                            <Route path={Routes.PROJECTS} component={ProjectPanel} />
+                                            <Route path={Routes.COLLECTIONS} component={CollectionPanel} />
+                                            <Route path={Routes.FAVORITES} component={FavoritePanel} />
+                                            <Route path={Routes.PROCESSES} component={ProcessPanel} />
+                                            <Route path={Routes.TRASH} component={TrashPanel} />
+                                            <Route path={Routes.PROCESS_LOGS} component={ProcessLogPanel} />
+                                        </Switch>
+                                    </Grid>
+                                </Grid>
+                                <Grid item>
+                                    <DetailsPanel />
+                                </Grid>
+                            </Grid>}
+                    </Grid>
+                    <ContextMenu />
+                    <Snackbar />
+                    <CreateProjectDialog />
+                    <CreateCollectionDialog />
+                    <RenameFileDialog />
+                    <PartialCopyCollectionDialog />
+                    <FileRemoveDialog />
+                    <CopyCollectionDialog />
+                    <FileRemoveDialog />
+                    <MultipleFilesRemoveDialog />
+                    <UpdateCollectionDialog />
+                    <FilesUploadCollectionDialog />
+                    <UpdateProjectDialog />
+                    <MoveCollectionDialog />
+                    <MoveProjectDialog />
+                    <CurrentTokenDialog
+                        currentToken={this.props.currentToken}
+                        open={this.state.isCurrentTokenDialogOpen}
+                        handleClose={this.toggleCurrentTokenModal} />
+                </>;
             }
 
             onSearch = (searchText: string) => {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list