Skip to content

Commit e81ee53

Browse files
author
Benjamin Pasero
committed
web - move welcome to browser
1 parent cb4775a commit e81ee53

11 files changed

Lines changed: 149 additions & 136 deletions

File tree

build/gulpfile.vscode.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ const vscodeResources = [
7575
'out-build/vs/workbench/contrib/webview/electron-browser/pre/*.js',
7676
'out-build/vs/**/markdown.css',
7777
'out-build/vs/workbench/contrib/tasks/**/*.json',
78-
'out-build/vs/workbench/contrib/welcome/walkThrough/**/*.md',
7978
'out-build/vs/platform/files/**/*.exe',
8079
'out-build/vs/platform/files/**/*.md',
8180
'out-build/vs/code/electron-browser/workbench/**',

src/vs/workbench/contrib/welcome/gettingStarted/electron-browser/gettingStarted.contribution.ts renamed to src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.contribution.ts

File renamed without changes.

src/vs/workbench/contrib/welcome/gettingStarted/electron-browser/gettingStarted.ts renamed to src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.ts

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import { IStorageService, StorageScope } from 'vs/platform/storage/common/storag
88
import { ITelemetryService, ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry';
99
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
1010
import * as platform from 'vs/base/common/platform';
11-
import product from 'vs/platform/product/node/product';
1211
import { IOpenerService } from 'vs/platform/opener/common/opener';
1312
import { URI } from 'vs/base/common/uri';
13+
import { IProductService } from 'vs/platform/product/common/product';
1414

1515
export class GettingStarted implements IWorkbenchContribution {
1616

@@ -23,23 +23,20 @@ export class GettingStarted implements IWorkbenchContribution {
2323
@IStorageService private readonly storageService: IStorageService,
2424
@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService,
2525
@ITelemetryService private readonly telemetryService: ITelemetryService,
26-
@IOpenerService private readonly openerService: IOpenerService
26+
@IOpenerService private readonly openerService: IOpenerService,
27+
@IProductService productService: IProductService
2728
) {
28-
this.appName = product.nameLong;
29+
this.appName = productService.nameLong;
30+
this.welcomePageURL = productService.welcomePage;
2931

30-
if (!product.welcomePage) {
32+
if (
33+
!productService.welcomePage ||
34+
environmentService.skipGettingStarted ||
35+
environmentService.isExtensionDevelopment
36+
) {
3137
return;
3238
}
3339

34-
if (environmentService.skipGettingStarted) {
35-
return;
36-
}
37-
38-
if (environmentService.isExtensionDevelopment) {
39-
return;
40-
}
41-
42-
this.welcomePageURL = product.welcomePage;
4340
this.handleWelcome();
4441
}
4542

src/vs/workbench/contrib/welcome/gettingStarted/electron-browser/telemetryOptOut.ts renamed to src/vs/workbench/contrib/welcome/gettingStarted/browser/telemetryOptOut.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
77
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
88
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
9-
import product from 'vs/platform/product/node/product';
109
import { IOpenerService } from 'vs/platform/opener/common/opener';
1110
import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
1211
import { URI } from 'vs/base/common/uri';
@@ -18,6 +17,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
1817
import { language, locale } from 'vs/base/common/platform';
1918
import { IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement';
2019
import { CancellationToken } from 'vs/base/common/cancellation';
20+
import { IProductService } from 'vs/platform/product/common/product';
2121

2222
export class TelemetryOptOut implements IWorkbenchContribution {
2323

@@ -33,9 +33,10 @@ export class TelemetryOptOut implements IWorkbenchContribution {
3333
@ITelemetryService private readonly telemetryService: ITelemetryService,
3434
@IExperimentService private readonly experimentService: IExperimentService,
3535
@IConfigurationService private readonly configurationService: IConfigurationService,
36-
@IExtensionGalleryService private readonly galleryService: IExtensionGalleryService
36+
@IExtensionGalleryService private readonly galleryService: IExtensionGalleryService,
37+
@IProductService productService: IProductService
3738
) {
38-
if (!product.telemetryOptOutUrl || storageService.get(TelemetryOptOut.TELEMETRY_OPT_OUT_SHOWN, StorageScope.GLOBAL)) {
39+
if (!productService.telemetryOptOutUrl || storageService.get(TelemetryOptOut.TELEMETRY_OPT_OUT_SHOWN, StorageScope.GLOBAL)) {
3940
return;
4041
}
4142
const experimentId = 'telemetryOptOut';
@@ -49,17 +50,17 @@ export class TelemetryOptOut implements IWorkbenchContribution {
4950
}
5051
storageService.store(TelemetryOptOut.TELEMETRY_OPT_OUT_SHOWN, true, StorageScope.GLOBAL);
5152

52-
this.privacyUrl = product.privacyStatementUrl || product.telemetryOptOutUrl;
53+
this.privacyUrl = productService.privacyStatementUrl || productService.telemetryOptOutUrl;
5354

5455
if (experimentState && experimentState.state === ExperimentState.Run && telemetryService.isOptedIn) {
5556
this.runExperiment(experimentId);
5657
return;
5758
}
5859

59-
const telemetryOptOutUrl = product.telemetryOptOutUrl;
60+
const telemetryOptOutUrl = productService.telemetryOptOutUrl;
6061
if (telemetryOptOutUrl) {
61-
const optOutNotice = localize('telemetryOptOut.optOutNotice', "Help improve VS Code by allowing Microsoft to collect usage data. Read our [privacy statement]({0}) and learn how to [opt out]({1}).", this.privacyUrl, product.telemetryOptOutUrl);
62-
const optInNotice = localize('telemetryOptOut.optInNotice', "Help improve VS Code by allowing Microsoft to collect usage data. Read our [privacy statement]({0}) and learn how to [opt in]({1}).", this.privacyUrl, product.telemetryOptOutUrl);
62+
const optOutNotice = localize('telemetryOptOut.optOutNotice', "Help improve VS Code by allowing Microsoft to collect usage data. Read our [privacy statement]({0}) and learn how to [opt out]({1}).", this.privacyUrl, productService.telemetryOptOutUrl);
63+
const optInNotice = localize('telemetryOptOut.optInNotice', "Help improve VS Code by allowing Microsoft to collect usage data. Read our [privacy statement]({0}) and learn how to [opt in]({1}).", this.privacyUrl, productService.telemetryOptOutUrl);
6364

6465
notificationService.prompt(
6566
Severity.Info,

src/vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
import { escape } from 'vs/base/common/strings';
77
import { localize } from 'vs/nls';
88

9-
export function used() {
10-
}
11-
129
export default () => `
1310
<div class="welcomePageContainer">
1411
<div class="welcomePage">

src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import 'vs/css!./welcomePage';
7+
import 'vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page';
78
import { URI } from 'vs/base/common/uri';
89
import * as strings from 'vs/base/common/strings';
910
import { ICommandService } from 'vs/platform/commands/common/commands';
@@ -24,7 +25,6 @@ import { IBackupFileService } from 'vs/workbench/services/backup/common/backup';
2425
import { getInstalledExtensions, IExtensionStatus, onExtensionChanged, isKeymapExtension } from 'vs/workbench/contrib/extensions/common/extensionsUtils';
2526
import { IExtensionManagementService, IExtensionGalleryService, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement';
2627
import { IExtensionEnablementService, EnablementState, IExtensionTipsService } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
27-
import { used } from 'vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page';
2828
import { ILifecycleService, StartupKind } from 'vs/platform/lifecycle/common/lifecycle';
2929
import { Disposable } from 'vs/base/common/lifecycle';
3030
import { splitName } from 'vs/base/common/labels';
@@ -43,8 +43,6 @@ import { joinPath } from 'vs/base/common/resources';
4343
import { IRecentlyOpened, isRecentWorkspace, IRecentWorkspace, IRecentFolder, isRecentFolder } from 'vs/platform/history/common/history';
4444
import { CancellationToken } from 'vs/base/common/cancellation';
4545

46-
used();
47-
4846
const configurationKey = 'workbench.startupEditor';
4947
const oldConfigurationKey = 'workbench.welcome.enabled';
5048
const telemetryFrom = 'welcomePage';

src/vs/workbench/contrib/welcome/walkThrough/browser/editor/editorWalkThrough.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6+
import 'vs/workbench/contrib/welcome/walkThrough/browser/editor/vs_code_editor_walkthrough';
67
import { localize } from 'vs/nls';
78
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
89
import { Action } from 'vs/base/common/actions';
@@ -17,7 +18,10 @@ const inputOptions: WalkThroughInputOptions = {
1718
typeId,
1819
name: localize('editorWalkThrough.title', "Interactive Playground"),
1920
resource: URI.parse(require.toUrl('./vs_code_editor_walkthrough.md'))
20-
.with({ scheme: Schemas.walkThrough }),
21+
.with({
22+
scheme: Schemas.walkThrough,
23+
query: JSON.stringify({ moduleId: 'vs/workbench/contrib/welcome/walkThrough/browser/editor/vs_code_editor_walkthrough' })
24+
}),
2125
telemetryFrom: 'walkThrough'
2226
};
2327

0 commit comments

Comments
 (0)