From 8f6c5af94fd427a7dcf90dafdd9c45ae808d8216 Mon Sep 17 00:00:00 2001 From: Hale Rankin Date: Fri, 26 Jun 2020 13:46:31 -0700 Subject: [PATCH] Cleaned up code for Add cell button in both main toolbar and cell toolbar. Corrected toolip to read: Add cell. (#10829) --- .../notebook/browser/cellViews/cellToolbar.component.ts | 1 - .../workbench/contrib/notebook/browser/notebook.component.ts | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sql/workbench/contrib/notebook/browser/cellViews/cellToolbar.component.ts b/src/sql/workbench/contrib/notebook/browser/cellViews/cellToolbar.component.ts index d71cfc001d..82d00ffd87 100644 --- a/src/sql/workbench/contrib/notebook/browser/cellViews/cellToolbar.component.ts +++ b/src/sql/workbench/contrib/notebook/browser/cellViews/cellToolbar.component.ts @@ -57,7 +57,6 @@ export class CellToolbarComponent { this._actionBar.context = context; let addCellsButton = new AddCellAction('notebook.AddCodeCell', localize('codeCellsPreview', "Add cell"), 'notebook-button masked-pseudo code'); - addCellsButton.cellType = CellTypes.Code; let addCodeCellButton = new AddCellAction('notebook.AddCodeCell', localize('codePreview', "Code cell"), 'notebook-button masked-pseudo code'); addCodeCellButton.cellType = CellTypes.Code; diff --git a/src/sql/workbench/contrib/notebook/browser/notebook.component.ts b/src/sql/workbench/contrib/notebook/browser/notebook.component.ts index 563849e4f9..a4467f199b 100644 --- a/src/sql/workbench/contrib/notebook/browser/notebook.component.ts +++ b/src/sql/workbench/contrib/notebook/browser/notebook.component.ts @@ -417,13 +417,14 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe let spacerElement = document.createElement('li'); spacerElement.style.marginLeft = 'auto'; + let addCellsButton = new AddCellAction('notebook.AddCodeCell', localize('codeCellsPreview', "Add cell"), 'notebook-button masked-pseudo code'); + let addCodeCellButton = new AddCellAction('notebook.AddCodeCell', localize('codePreview', "Code cell"), 'notebook-button masked-pseudo code'); addCodeCellButton.cellType = CellTypes.Code; let addTextCellButton = new AddCellAction('notebook.AddTextCell', localize('textPreview', "Text cell"), 'notebook-button masked-pseudo markdown'); addTextCellButton.cellType = CellTypes.Markdown; - this._runAllCellsAction = this.instantiationService.createInstance(RunAllCellsAction, 'notebook.runAllCells', localize('runAllPreview', "Run all"), 'notebook-button masked-pseudo start-outline'); let collapseCellsAction = this.instantiationService.createInstance(CollapseCellsAction, 'notebook.collapseCells', true); @@ -441,7 +442,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe let buttonDropdownContainer = DOM.$('li.action-item'); buttonDropdownContainer.setAttribute('role', 'presentation'); let dropdownMenuActionViewItem = new DropdownMenuActionViewItem( - addCodeCellButton, + addCellsButton, [addCodeCellButton, addTextCellButton], this.contextMenuService, undefined,