From 05c46464ba69e889145d8a32320cd7f130665ee1 Mon Sep 17 00:00:00 2001
From: anika-ahluwalia <anika.ahluwalia@gmail.com>
Date: Thu, 23 Jul 2020 13:25:42 -0500
Subject: selection changes

---
 src/client/views/MainView.tsx | 45 +++----------------------------------------
 1 file changed, 3 insertions(+), 42 deletions(-)

(limited to 'src/client/views/MainView.tsx')

diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 9e8fa545f..8113ad698 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -456,48 +456,11 @@ export class MainView extends React.Component {
             {this.docButtons}</div>;
     }
 
-    menuBtnDescriptions(): {
-        title: string, icon: string, click: string, backgroundColor?: string,
-    }[] {
-        return [
-            { title: "Workspace", icon: "desktop", click: 'this.selectPanel("workspace")' },
-            { title: "Catalog", icon: "file", click: 'this.selectPanel("catalog")' },
-            { title: "Recently Deleted", icon: "trash-alt", click: 'this.selectPanel("deleted")' },
-            { title: "Import", icon: "upload", click: 'this.selectPanel("upload")' },
-            { title: "Sharing", icon: "users", click: 'GroupManager.Instance.open()' },
-            { title: "Tools", icon: "wrench", click: 'this.selectPanel("tools")' },
-            { title: "Search", icon: "search", click: 'this.selectPanel("search")' },
-            { title: "Help", icon: "question-circle", click: 'this.selectPanel("help")' },
-            { title: "Settings", icon: "cog", click: 'SettingsManager.Instance.open()' },
-        ];
-    }
-
-    setupMenuButtons() {
-        const buttons = this.menuBtnDescriptions();
-        const menuBtns = buttons.map(({ title, icon, click, backgroundColor }) => Docs.Create.FontIconDocument({
-            _width: 100, _height: 100,
-            icon,
-            title,
-            onClick: click ? ScriptField.MakeScript(click) : undefined,
-            backgroundColor,
-        }));
-
-        const btnStack = new PrefetchProxy(Docs.Create.MasonryDocument(menuBtns, {
-            _xMargin: 0, _autoHeight: true, _width: 100, _columnWidth: 60, ignoreClick: true, lockedPosition: true, _chromeStatus: "disabled",
-        }));
-        return btnStack as unknown as Doc;
-    }
-
-    @computed get setupMenuPanel() {
-        const menuBtns = this.setupMenuButtons();
-        const menuStack = new PrefetchProxy(Docs.Create.StackingDocument([menuBtns], {
-            title: "all Creators", _yMargin: 0, _autoHeight: true, _xMargin: 0,
-            _width: 100, ignoreClick: true, lockedPosition: true, _chromeStatus: "disabled",
-        })) as any as Doc;
+    @computed get menuPanel() {
 
         return <div className="mainView-menuPanel">
             <DocumentView
-                Document={menuStack}
+                Document={Doc.UserDoc().menuStack as Doc}
                 DataDoc={undefined}
                 LibraryPath={emptyPath}
                 addDocument={undefined}
@@ -524,8 +487,6 @@ export class MainView extends React.Component {
         </div>;
     }
 
-    @observable menuPanel: any;
-
     // @computed get menuPanel() {
     //     return <div className="mainView-menuPanel">
     //         <button className="mainView-menuPanel-button"
@@ -690,7 +651,7 @@ export class MainView extends React.Component {
                 height,
                 width: (FormatShapePane.Instance?.Pinned) ? `calc(100% - 200px)` : "100%"
             }} >
-                {this.setupMenuPanel}
+                {this.menuPanel}
                 <div style={{ display: "contents", flexDirection: "row", position: "relative" }}>
                     <div className="mainView-flyoutContainer" onPointerLeave={this.pointerLeaveDragger} style={{ width: this.flyoutWidth }}>
                         {this.flyoutWidth !== 0 ? <div className="mainView-libraryHandle"
-- 
cgit v1.2.3-70-g09d2

