X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9d465addb74ffb1209dab4b86e45f933bb21c840..cc754fd92e51c7539aae05b676e8cf16d7126e6a:/src/views/workbench/workbench.tsx

diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 1e6538485e..9ae1018857 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -42,6 +42,7 @@ 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 { 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';
@@ -76,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={10} secondaryInitialSize={90} 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>
@@ -126,9 +138,10 @@ export const WorkbenchPanel =
             <ProcessCommandDialog />
             <RenameFileDialog />
             <RichTextEditorDialog />
+            <SharingDialog />
             <Snackbar />
             <UpdateCollectionDialog />
             <UpdateProcessDialog />
             <UpdateProjectDialog />
         </Grid>
-    );
+    );
\ No newline at end of file
