Skip to content

Commit

Permalink
remove config toolbar for IW execution setting (microsoft#224999)
Browse files Browse the repository at this point in the history
  • Loading branch information
amunger authored Aug 7, 2024
1 parent ca51dd3 commit 3945bc5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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({
Expand Down
30 changes: 0 additions & 30 deletions src/vs/workbench/contrib/interactive/browser/interactiveEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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, {
Expand Down Expand Up @@ -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';
}
}

Expand Down
1 change: 0 additions & 1 deletion src/vs/workbench/contrib/notebook/browser/notebookIcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.'));
Expand Down

0 comments on commit 3945bc5

Please sign in to comment.