Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of cleanup in to getting started. #130892

Merged
merged 1 commit into from
Aug 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegis
import { KeyCode } from 'vs/base/common/keyCodes';
import { EditorPaneDescriptor, IEditorPaneRegistry } from 'vs/workbench/browser/editor';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
import { IGettingStartedService } from 'vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedService';
import { IWalkthroughsService } from 'vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedService';
import { GettingStartedInput } from 'vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedInput';
import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions';
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
Expand Down Expand Up @@ -137,58 +137,6 @@ CommandsRegistry.registerCommand({
}
});

registerAction2(class extends Action2 {
constructor() {
super({
id: 'gettingStarted.next',
title: localize('gettingStarted.goNext', "Next"),
category,
keybinding: {
weight: KeybindingWeight.EditorContrib,
primary: KeyCode.DownArrow,
secondary: [KeyCode.RightArrow],
when: inWelcomeContext
},
precondition: ContextKeyEqualsExpr.create('activeEditor', 'gettingStartedPage'),
f1: true
});
}

run(accessor: ServicesAccessor) {
const editorService = accessor.get(IEditorService);
const editorPane = editorService.activeEditorPane;
if (editorPane instanceof GettingStartedPage) {
editorPane.focusNext();
}
}
});

registerAction2(class extends Action2 {
constructor() {
super({
id: 'gettingStarted.prev',
title: localize('gettingStarted.goPrev', "Previous"),
category,
keybinding: {
weight: KeybindingWeight.EditorContrib,
primary: KeyCode.UpArrow,
secondary: [KeyCode.LeftArrow],
when: inWelcomeContext
},
precondition: ContextKeyEqualsExpr.create('activeEditor', 'gettingStartedPage'),
f1: true
});
}

run(accessor: ServicesAccessor) {
const editorService = accessor.get(IEditorService);
const editorPane = editorService.activeEditorPane;
if (editorPane instanceof GettingStartedPage) {
editorPane.focusPrevious();
}
}
});

registerAction2(class extends Action2 {
constructor() {
super({
Expand All @@ -200,7 +148,7 @@ registerAction2(class extends Action2 {

run(accessor: ServicesAccessor, arg: string) {
if (!arg) { return; }
const gettingStartedService = accessor.get(IGettingStartedService);
const gettingStartedService = accessor.get(IWalkthroughsService);
gettingStartedService.progressStep(arg);
}
});
Expand All @@ -216,7 +164,7 @@ registerAction2(class extends Action2 {

run(accessor: ServicesAccessor, arg: string) {
if (!arg) { return; }
const gettingStartedService = accessor.get(IGettingStartedService);
const gettingStartedService = accessor.get(IWalkthroughsService);
gettingStartedService.deprogressStep(arg);
}
});
Expand All @@ -234,8 +182,8 @@ registerAction2(class extends Action2 {
async run(accessor: ServicesAccessor) {
const commandService = accessor.get(ICommandService);
const quickInputService = accessor.get(IQuickInputService);
const gettingStartedService = accessor.get(IGettingStartedService);
const categories = gettingStartedService.getCategories().filter(x => x.content.type === 'steps');
const gettingStartedService = accessor.get(IWalkthroughsService);
const categories = gettingStartedService.getWalkthroughs();
const selection = await quickInputService.pick(categories.map(x => ({
id: x.id,
label: x.title,
Expand Down Expand Up @@ -275,7 +223,7 @@ const prefersStandardMotionConfig = {
class WorkbenchConfigurationContribution {
constructor(
@IInstantiationService _instantiationService: IInstantiationService,
@IGettingStartedService _gettingStartedService: IGettingStartedService,
@IWalkthroughsService _gettingStartedService: IWalkthroughsService,
@IConfigurationService _configurationService: IConfigurationService,
@ITASExperimentService _experimentSevice: ITASExperimentService,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
outline: none;
}

.monaco-workbench .part.editor>.content .gettingStartedContainer.loading {
display: none;
}

.monaco-workbench .part.editor>.content .gettingStartedContainer img {
max-width: 100%;
max-height: 100%;
Expand Down
Loading