X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2f39812f57c2acbc20a6292964b0a6b3512a9870..cc754fd92e51c7539aae05b676e8cf16d7126e6a:/src/views/workbench/workbench.tsx?ds=sidebyside

diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 407488b6d6..9ae1018857 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -41,10 +41,9 @@ import { SharedWithMePanel } from '~/views/shared-with-me-panel/shared-with-me-p
 import { RunProcessPanel } from '~/views/run-process-panel/run-process-panel';
 import SplitterLayout from 'react-splitter-layout';
 import { WorkflowPanel } from '~/views/workflow-panel/workflow-panel';
-import { TreePicker } from '../../views-components/tree-picker/tree-picker';
-import { noop } from 'lodash';
-import { TreeItem } from '~/components/tree/tree';
-import { GroupContentsResource } from '~/services/groups-service/groups-service';
+import { SearchResultsPanel } from '~/views/search-results-panel/search-results-panel';
+import { SharingDialog } from '~/views-components/sharing-dialog/sharing-dialog';
+import { AdvancedTabDialog } from '~/views-components/advanced-tab-dialog/advanced-tab-dialog';
 
 type CssRules = 'root' | 'container' | 'splitter' | 'asidePanel' | 'contentWrapper' | 'content';
 
@@ -78,12 +77,23 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
 
 type WorkbenchPanelProps = WithStyles<CssRules>;
 
+const defaultSplitterSize = 90;
+
+const getSplitterInitialSize = () => {
+    const splitterSize = localStorage.getItem('splitterSize');
+    return splitterSize ? Number(splitterSize) : defaultSplitterSize;
+};
+
+const saveSplitterSize = (size: number) => localStorage.setItem('splitterSize', size.toString());
+
 export const WorkbenchPanel =
     withStyles(styles)(({ classes }: WorkbenchPanelProps) =>
         <Grid container item xs className={classes.root}>
             <Grid container item xs className={classes.container}>
                 <SplitterLayout customClassName={classes.splitter} percentage={true}
-                    primaryIndex={0} primaryMinSize={15} secondaryInitialSize={85} secondaryMinSize={40}>
+                                primaryIndex={0} primaryMinSize={10}
+                                secondaryInitialSize={getSplitterInitialSize()} secondaryMinSize={40}
+                                onSecondaryPaneSizeChange={saveSplitterSize}>
                     <Grid container item xs component='aside' direction='column' className={classes.asidePanel}>
                         <SidePanel />
                     </Grid>
@@ -92,14 +102,6 @@ export const WorkbenchPanel =
                             <MainContentBar />
                         </Grid>
                         <Grid item xs className={classes.content}>
-                            <TreePicker
-                                render={({ data }: TreeItem<GroupContentsResource>) =>
-                                    <p>{JSON.stringify(data.name)}</p>}
-                                pickerId='testPicker'
-                                onContextMenu={noop}
-                                toggleItemOpen={noop}
-                                toggleItemActive={item => console.log(item)}
-                                toggleItemSelection={noop} />
                             <Switch>
                                 <Route path={Routes.PROJECTS} component={ProjectPanel} />
                                 <Route path={Routes.COLLECTIONS} component={CollectionPanel} />
@@ -110,6 +112,7 @@ export const WorkbenchPanel =
                                 <Route path={Routes.SHARED_WITH_ME} component={SharedWithMePanel} />
                                 <Route path={Routes.RUN_PROCESS} component={RunProcessPanel} />
                                 <Route path={Routes.WORKFLOWS} component={WorkflowPanel} />
+                                <Route path={Routes.SEARCH_RESULTS} component={SearchResultsPanel} />
                             </Switch>
                         </Grid>
                     </Grid>
@@ -118,6 +121,7 @@ export const WorkbenchPanel =
             <Grid item>
                 <DetailsPanel />
             </Grid>
+            <AdvancedTabDialog />
             <ContextMenu />
             <CopyCollectionDialog />
             <CopyProcessDialog />
@@ -134,9 +138,10 @@ export const WorkbenchPanel =
             <ProcessCommandDialog />
             <RenameFileDialog />
             <RichTextEditorDialog />
+            <SharingDialog />
             <Snackbar />
             <UpdateCollectionDialog />
             <UpdateProcessDialog />
             <UpdateProjectDialog />
         </Grid>
-    );
+    );
\ No newline at end of file
