From 83f64ef6bb290215b0243a17efd343e2fa6d37bf Mon Sep 17 00:00:00 2001 From: Bhavya U Date: Thu, 17 Oct 2024 15:53:14 -0700 Subject: [PATCH] fix: walkthrough restore and page title (#231616) --- .../contrib/welcomeGettingStarted/browser/gettingStarted.ts | 5 +++++ .../welcomeGettingStarted/browser/gettingStartedInput.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts index 099178088e57..24d8183eca4f 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts @@ -304,6 +304,11 @@ export class GettingStartedPage extends EditorPane { return; } + const editorPane = this.groupsService.activeGroup.activeEditorPane; + if (!(editorPane instanceof GettingStartedPage)) { + return; + } + // Save the state of the walkthrough so we can restore it on reload const restoreData: RestoreWalkthroughsConfigurationValue = { folder: UNKNOWN_EMPTY_WINDOW_WORKSPACE.id, category: this.editorInput.selectedCategory, step: this.editorInput.selectedStep }; this.storageService.store( diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.ts index d12ba57d7138..171e684d99a5 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.ts @@ -72,7 +72,7 @@ export class GettingStartedInput extends EditorInput { } override getName() { - return this.selectedCategory ? this.walkthroughService.getWalkthrough(this.selectedCategory).walkthroughPageTitle : localize('getStarted', "Welcome"); + return this.selectedCategory ? localize('walkthroughPageTitle', 'Walkthrough: ') + this.walkthroughService.getWalkthrough(this.selectedCategory).walkthroughPageTitle : localize('getStarted', "Welcome"); } get selectedCategory() {