Try setting gettingStarted as default editor (#125321)

* Try setting gettingStarted as default editor

* Try fix getting started webview crashing in colorizer tests

* Dont focus overeagarly
This commit is contained in:
Jackson Kearl 2021-06-02 17:43:34 -07:00 committed by GitHub
parent ebde979a48
commit ab1c920200
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View file

@ -64,7 +64,9 @@ suite('colorization', () => {
for (const fixture of fs.readdirSync(fixturesPath)) {
test(`colorize: ${fixture}`, function (done) {
assertUnchangedTokens(fixturesPath, resultsPath, fixture, done);
commands.executeCommand('workbench.action.closeAllEditors').then(() => {
assertUnchangedTokens(fixturesPath, resultsPath, fixture, done);
});
});
}
});

View file

@ -1198,6 +1198,7 @@ export class GettingStartedPage extends EditorPane {
this.editorInput.selectedStep = undefined;
this.selectStep(undefined);
this.setSlide('categories');
this.container.focus();
});
}
@ -1247,7 +1248,6 @@ export class GettingStartedPage extends EditorPane {
this.container.querySelector('.gettingStartedSlideDetails')!.querySelectorAll('button').forEach(button => button.disabled = true);
this.container.querySelector('.gettingStartedSlideCategories')!.querySelectorAll('button').forEach(button => button.disabled = false);
this.container.querySelector('.gettingStartedSlideCategories')!.querySelectorAll('input').forEach(button => button.disabled = false);
this.container.focus();
} else {
slideManager.classList.add('showDetails');
slideManager.classList.remove('showCategories');
@ -1256,6 +1256,10 @@ export class GettingStartedPage extends EditorPane {
this.container.querySelector('.gettingStartedSlideCategories')!.querySelectorAll('input').forEach(button => button.disabled = true);
}
}
override focus() {
this.container.focus();
}
}
export class GettingStartedInputSerializer implements IEditorInputSerializer {

View file

@ -31,7 +31,7 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.gettingStarted' }, "Open the new Welcome Page with content to aid in getting started with VS Code and extensions."),
localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.gettingStartedInEmptyWorkbench' }, "When opening an empty workbench, open the new Welcome Page with content to aid in getting started with VS Code and extensions.")
],
'default': 'welcomePage',
'default': 'gettingStarted',
'description': localize('workbench.startupEditor', "Controls which editor is shown at startup, if none are restored from the previous session.")
},
}