From 7260268bb3391b5a2a11a29a051494fd15a87511 Mon Sep 17 00:00:00 2001 From: Serena Irani <92682603+seirani@users.noreply.github.com> Date: Fri, 21 Apr 2023 11:11:10 -0400 Subject: [PATCH] prettier lint test fixes --- packages/application/src/shell.ts | 55 +++++++++++++++---------------- 1 file changed, 26 insertions(+), 29 deletions(-) diff --git a/packages/application/src/shell.ts b/packages/application/src/shell.ts index 77329d6688..f4d06aaf28 100644 --- a/packages/application/src/shell.ts +++ b/packages/application/src/shell.ts @@ -118,9 +118,8 @@ export class NotebookShell extends Widget implements JupyterFrontEnd.IShell { this.layout = rootLayout; // Added Skip to Main Link - const skipLinkWidgetHandler = (this._skipLinkWidgetHandler = new Private.SkipLinkWidgetHandler( - this - )); + const skipLinkWidgetHandler = (this._skipLinkWidgetHandler = + new Private.SkipLinkWidgetHandler(this)); this.add(skipLinkWidgetHandler.skipLinkWidget, 'top', { rank: 0 }); this._skipLinkWidgetHandler.show(); @@ -374,37 +373,35 @@ export namespace Shell { export type Area = 'main' | 'top' | 'left' | 'right' | 'menu'; } - export namespace Private { - export class SkipLinkWidgetHandler { - /** - * Construct a new skipLink widget handler. - */ - constructor(shell: INotebookShell) { - const skipLinkWidget = (this._skipLinkWidget = new Widget()); - const skipToMain = document.createElement('a'); - skipToMain.href = '#first-cell'; - skipToMain.tabIndex = 1; - skipToMain.text = 'Skip to Main'; - skipToMain.className = 'skip-link'; - skipToMain.addEventListener('click', this); - skipLinkWidget.addClass('jp-skiplink'); - skipLinkWidget.id = 'jp-skiplink'; - skipLinkWidget.node.appendChild(skipToMain); - } + /** + * Construct a new skipLink widget handler. + */ + constructor(shell: INotebookShell) { + const skipLinkWidget = (this._skipLinkWidget = new Widget()); + const skipToMain = document.createElement('a'); + skipToMain.href = '#first-cell'; + skipToMain.tabIndex = 1; + skipToMain.text = 'Skip to Main'; + skipToMain.className = 'skip-link'; + skipToMain.addEventListener('click', this); + skipLinkWidget.addClass('jp-skiplink'); + skipLinkWidget.id = 'jp-skiplink'; + skipLinkWidget.node.appendChild(skipToMain); + } - handleEvent(event: Event): void { - switch (event.type) { - case 'click': - this._focusMain(); - break; + handleEvent(event: Event): void { + switch (event.type) { + case 'click': + this._focusMain(); + break; + } } - } - private _focusMain() { - const input = document.querySelector( - '#main-panel .jp-InputArea-editor' + private _focusMain() { + const input = document.querySelector( + '#main-panel .jp-InputArea-editor' ) as HTMLInputElement; input.tabIndex = 1; input.focus();