From acd5974024a46e0e486c5555a12fec1ee2eac6bd Mon Sep 17 00:00:00 2001 From: Victor Meng Date: Wed, 7 Dec 2022 10:21:08 -0800 Subject: [PATCH] Hard code to always open old mongo shell --- src/Explorer/ContextMenuButtonFactory.tsx | 6 +----- .../Menus/CommandBar/CommandBarComponentButtonFactory.tsx | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/Explorer/ContextMenuButtonFactory.tsx b/src/Explorer/ContextMenuButtonFactory.tsx index 426287068..22e587b00 100644 --- a/src/Explorer/ContextMenuButtonFactory.tsx +++ b/src/Explorer/ContextMenuButtonFactory.tsx @@ -85,11 +85,7 @@ export const createCollectionContextMenuButton = ( iconSrc: HostedTerminalIcon, onClick: () => { const selectedCollection: ViewModels.Collection = useSelectedNode.getState().findSelectedCollection(); - if (useNotebook.getState().isShellEnabled) { - container.openNotebookTerminal(ViewModels.TerminalKind.Mongo); - } else { - selectedCollection && selectedCollection.onNewMongoShellClick(); - } + selectedCollection && selectedCollection.onNewMongoShellClick(); }, label: useNotebook.getState().isShellEnabled ? "Open Mongo Shell" : "New Shell", }); diff --git a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx index c02639f09..e1af7c56a 100644 --- a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx +++ b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx @@ -166,11 +166,7 @@ export function createContextCommandBarButtons( iconAlt: label, onCommandClick: () => { const selectedCollection: ViewModels.Collection = selectedNodeState.findSelectedCollection(); - if (useNotebook.getState().isShellEnabled) { - container.openNotebookTerminal(ViewModels.TerminalKind.Mongo); - } else { - selectedCollection && selectedCollection.onNewMongoShellClick(); - } + selectedCollection && selectedCollection.onNewMongoShellClick(); }, commandButtonLabel: label, ariaLabel: label,