diff --git a/extensions/typescript-language-features/media/nodejsWalkthroughIcon.png b/extensions/typescript-language-features/media/nodejsWalkthroughIcon.png new file mode 100644 index 00000000000..10a8e5b822b Binary files /dev/null and b/extensions/typescript-language-features/media/nodejsWalkthroughIcon.png differ diff --git a/extensions/typescript-language-features/package.json b/extensions/typescript-language-features/package.json index 936772a8a48..1ca2f8692ef 100644 --- a/extensions/typescript-language-features/package.json +++ b/extensions/typescript-language-features/package.json @@ -1570,6 +1570,7 @@ { "id": "nodejsWelcome", "title": "%walkthroughs.nodejsWelcome.title%", + "icon": "media/nodejsWalkthroughIcon.png", "description": "%walkthroughs.nodejsWelcome.description%", "when": "false", "steps": [ diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts index 1fb311969e8..a88dc3fa296 100644 --- a/src/vs/platform/extensions/common/extensions.ts +++ b/src/vs/platform/extensions/common/extensions.ts @@ -137,6 +137,7 @@ export interface IWalkthroughStep { export interface IWalkthrough { readonly id: string; readonly title: string; + readonly icon?: string; readonly description: string; readonly steps: IWalkthroughStep[]; readonly featuredFor: string[] | undefined; diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.ts index 47c767d1249..32846bd33bf 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.ts @@ -27,6 +27,10 @@ export const walkthroughsExtensionPoint = ExtensionsRegistry.registerExtensionPo type: 'string', description: localize('walkthroughs.title', "Title of walkthrough.") }, + icon: { + type: 'string', + description: localize('walkthroughs.icon', "Relative path to the icon of the walkthrough. The path is relative to the extension location. If not specified, the icon defaults to the extension icon if available."), + }, description: { type: 'string', description: localize('walkthroughs.description', "Description of walkthrough.") diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts index 63ceca1e990..6e58d3390ea 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts @@ -389,6 +389,7 @@ export class WalkthroughsService extends Disposable implements IWalkthroughsServ isFeatured = await this.instantiationService.invokeFunction(a => checkGlobFileExists(a, folders, walkthrough.featuredFor!, token.token)); } + const iconStr = walkthrough.icon ?? extension.icon; const walkthoughDescriptor: IWalkthrough = { description: walkthrough.description, title: walkthrough.title, @@ -399,8 +400,8 @@ export class WalkthroughsService extends Disposable implements IWalkthroughsServ steps, icon: { type: 'image', - path: extension.icon - ? FileAccess.asBrowserUri(joinPath(extension.extensionLocation, extension.icon)).toString(true) + path: iconStr + ? FileAccess.asBrowserUri(joinPath(extension.extensionLocation, iconStr)).toString(true) : DefaultIconPath }, when: ContextKeyExpr.deserialize(override ?? walkthrough.when) ?? ContextKeyExpr.true(),