From 3945bc59ae1da5cbeb19a43bcc707ca09e564254 Mon Sep 17 00:00:00 2001 From: Aaron Munger Date: Wed, 7 Aug 2024 11:07:54 -0700 Subject: [PATCH] remove config toolbar for IW execution setting (#224999) --- .../browser/interactive.contribution.ts | 20 ------------- .../interactive/browser/interactiveEditor.ts | 30 ------------------- .../contrib/notebook/browser/notebookIcons.ts | 1 - 3 files changed, 51 deletions(-) diff --git a/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts b/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts index 07d8ed71ffb1d..aa279f42006d3 100644 --- a/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts +++ b/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts @@ -23,7 +23,6 @@ import { Context as SuggestContext } from 'vs/editor/contrib/suggest/browser/sug import { localize, localize2 } from 'vs/nls'; import { ILocalizedString } from 'vs/platform/action/common/action'; import { Action2, MenuId, registerAction2 } from 'vs/platform/actions/common/actions'; -import { ICommandService } from 'vs/platform/commands/common/commands'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; @@ -448,25 +447,6 @@ registerAction2(class extends Action2 { } }); -registerAction2(class extends Action2 { - constructor() { - super({ - id: 'interactive.configure', - title: localize2('interactive.configExecute', 'Configure input box behavior'), - category: interactiveWindowCategory, - f1: false, - icon: icons.configIcon, - menu: { - id: MenuId.InteractiveInputConfig - } - }); - } - - override run(accessor: ServicesAccessor, ...args: any[]): void { - accessor.get(ICommandService).executeCommand('workbench.action.openSettings', '@tag:replExecute'); - } -}); - registerAction2(class extends Action2 { constructor() { super({ diff --git a/src/vs/workbench/contrib/interactive/browser/interactiveEditor.ts b/src/vs/workbench/contrib/interactive/browser/interactiveEditor.ts index a6b48582111b2..d272234b138b4 100644 --- a/src/vs/workbench/contrib/interactive/browser/interactiveEditor.ts +++ b/src/vs/workbench/contrib/interactive/browser/interactiveEditor.ts @@ -88,7 +88,6 @@ export class InteractiveEditor extends EditorPane implements IEditorPaneWithScro private _inputCellContainer!: HTMLElement; private _inputFocusIndicator!: HTMLElement; private _inputRunButtonContainer!: HTMLElement; - private _inputConfigContainer!: HTMLElement; private _inputEditorContainer!: HTMLElement; private _codeEditorWidget!: CodeEditorWidget; private _notebookWidgetService: INotebookEditorService; @@ -199,36 +198,9 @@ export class InteractiveEditor extends EditorPane implements IEditorPaneWithScro this._inputRunButtonContainer = DOM.append(this._inputCellContainer, DOM.$('.run-button-container')); this._setupRunButtonToolbar(this._inputRunButtonContainer); this._inputEditorContainer = DOM.append(this._inputCellContainer, DOM.$('.input-editor-container')); - this._setupConfigButtonToolbar(); this._createLayoutStyles(); } - private _setupConfigButtonToolbar() { - this._inputConfigContainer = DOM.append(this._inputEditorContainer, DOM.$('.input-toolbar-container')); - this._inputConfigContainer.style.position = 'absolute'; - this._inputConfigContainer.style.right = '0'; - this._inputConfigContainer.style.marginTop = '6px'; - this._inputConfigContainer.style.marginRight = '12px'; - this._inputConfigContainer.style.zIndex = '1'; - this._inputConfigContainer.style.display = 'none'; - - const menu = this._register(this._menuService.createMenu(MenuId.InteractiveInputConfig, this._contextKeyService)); - const toolbar = this._register(new ToolBar(this._inputConfigContainer, this._contextMenuService, { - getKeyBinding: action => this._keybindingService.lookupKeybinding(action.id), - actionViewItemProvider: (action, options) => { - return createActionViewItem(this._instantiationService, action, options); - }, - renderDropdownAsChildElement: true - })); - - const primary: IAction[] = []; - const secondary: IAction[] = []; - const result = { primary, secondary }; - - createAndFillInActionBarActions(menu, { shouldForwardArgs: true }, result); - toolbar.setActions([...primary, ...secondary]); - } - private _setupRunButtonToolbar(runButtonContainer: HTMLElement) { const menu = this._register(this._menuService.createMenu(MenuId.InteractiveInputExecute, this._contextKeyService)); this._runbuttonToolbar = this._register(new ToolBar(runButtonContainer, this._contextMenuService, { @@ -683,11 +655,9 @@ export class InteractiveEditor extends EditorPane implements IEditorPaneWithScro if (!this._hintElement && !shouldHide) { this._hintElement = this._instantiationService.createInstance(ReplInputHintContentWidget, this._codeEditorWidget); - this._inputConfigContainer.style.display = 'block'; } else if (this._hintElement && shouldHide) { this._hintElement.dispose(); this._hintElement = undefined; - this._inputConfigContainer.style.display = 'none'; } } diff --git a/src/vs/workbench/contrib/notebook/browser/notebookIcons.ts b/src/vs/workbench/contrib/notebook/browser/notebookIcons.ts index 63c683890808f..20ffe3867e833 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookIcons.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookIcons.ts @@ -9,7 +9,6 @@ import { registerIcon } from 'vs/platform/theme/common/iconRegistry'; export const selectKernelIcon = registerIcon('notebook-kernel-select', Codicon.serverEnvironment, localize('selectKernelIcon', 'Configure icon to select a kernel in notebook editors.')); export const executeIcon = registerIcon('notebook-execute', Codicon.play, localize('executeIcon', 'Icon to execute in notebook editors.')); -export const configIcon = registerIcon('notebook-config', Codicon.gear, localize('configIcon', 'Icon to configure in notebook editors.')); export const executeAboveIcon = registerIcon('notebook-execute-above', Codicon.runAbove, localize('executeAboveIcon', 'Icon to execute above cells in notebook editors.')); export const executeBelowIcon = registerIcon('notebook-execute-below', Codicon.runBelow, localize('executeBelowIcon', 'Icon to execute below cells in notebook editors.')); export const stopIcon = registerIcon('notebook-stop', Codicon.primitiveSquare, localize('stopIcon', 'Icon to stop an execution in notebook editors.'));