Cleaned up code for Add cell button in both main toolbar and cell toolbar. Corrected toolip to read: Add cell. (#10829)

This commit is contained in:
Hale Rankin
2020-06-26 13:46:31 -07:00
committed by GitHub
parent 8d7b3ef6ec
commit 8f6c5af94f
2 changed files with 3 additions and 3 deletions

View File

@@ -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,