From 2a5ccbb51bcd004dab76946003402c650119a1d3 Mon Sep 17 00:00:00 2001 From: Steve Faulkner Date: Thu, 8 Apr 2021 21:55:48 -0500 Subject: [PATCH] Force enable notebooks --- src/Explorer/Explorer.tsx | 12 ++---------- .../CommandBar/CommandBarComponentButtonFactory.tsx | 2 +- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/Explorer/Explorer.tsx b/src/Explorer/Explorer.tsx index de18e3617..b63bf4ca9 100644 --- a/src/Explorer/Explorer.tsx +++ b/src/Explorer/Explorer.tsx @@ -300,11 +300,7 @@ export default class Explorer { ); Promise.all([this._refreshNotebooksEnabledStateForAccount(), this._refreshSparkEnabledStateForAccount()]).then( async () => { - this.isNotebookEnabled( - userContext.authType !== AuthType.ResourceToken && - ((await this._containsDefaultNotebookWorkspace(this.databaseAccount())) || - userContext.features.enableNotebooks) - ); + this.isNotebookEnabled(false); TelemetryProcessor.trace(Action.NotebookEnabled, ActionModifiers.Mark, { isNotebookEnabled: this.isNotebookEnabled(), @@ -1810,11 +1806,7 @@ export default class Explorer { private async _refreshNotebooksEnabledStateForAccount(): Promise { const authType = userContext.authType; - if ( - authType === AuthType.EncryptedToken || - authType === AuthType.ResourceToken || - authType === AuthType.MasterKey - ) { + if (true) { this.isNotebooksEnabledForAccount(false); return; } diff --git a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx index 2221e21fc..cc6a73fa7 100644 --- a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx +++ b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx @@ -456,7 +456,7 @@ function createEnableNotebooksButton(container: Explorer): CommandButtonComponen onCommandClick: () => container.setupNotebooksPane.openWithTitleAndDescription(label, description), commandButtonLabel: label, hasPopup: false, - disabled: !container.isNotebooksEnabledForAccount(), + disabled: false, ariaLabel: label, tooltipText: container.isNotebooksEnabledForAccount() ? "" : tooltip, };