Skip to content

Commit e1692f4

Browse files
authored
Add a What's New blurb to the start page (#2767)
1 parent 54c75cb commit e1692f4

File tree

8 files changed

+29
-4
lines changed

8 files changed

+29
-4
lines changed

resources/startPage.html.template

+22-3
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,28 @@
8383
</div>
8484
</div>
8585
<hr />
86+
{{#if showWhatsNew}}
8687
<div class="row">
8788
<div class="icon">
88-
<i class="codicon codicon-new-file" aria-label="Add Docker files"></i>
89+
<i class="codicon codicon-star-empty" alt=""></i>
90+
</div>
91+
<div>
92+
<div>
93+
<h2>What's New</h2>
94+
</div>
95+
<div>
96+
<ul>
97+
<li>The <a href="command:workbench.view.extension.dockerView">Docker Explorer</a> now has advanced tooltips! Hover your mouse over an item to see useful info.</li>
98+
<li>You can now open and download the files in a running container! Expand a container node to get started.</li>
99+
<li>Right-click on a Docker Compose file to try our new <a href="command:vscode-docker.compose.up.subset?%7B%22commandReason%22%3A%22startPage%22%7D">Docker: Compose Up - Select Services</a> command!</li>
100+
</ul>
101+
</div>
102+
</div>
103+
</div>
104+
{{/if}}
105+
<div class="row">
106+
<div class="icon">
107+
<i class="codicon codicon-new-file" alt=""></i>
89108
</div>
90109
<div>
91110
<div>
@@ -101,7 +120,7 @@
101120
</div>
102121
<div class="row">
103122
<div class="icon">
104-
<i class="codicon codicon-play" aria-label="Run an image"></i>
123+
<i class="codicon codicon-play" alt=""></i>
105124
</div>
106125
<div>
107126
<div>
@@ -147,7 +166,7 @@
147166
</div>
148167
<div class="row">
149168
<div class="icon">
150-
<i class="codicon codicon-cloud-upload" aria-label="Publish to the Cloud"></i>
169+
<i class="codicon codicon-cloud-upload" alt=""></i>
151170
</div>
152171
<div>
153172
<div>

src/commands/startPage/StartPage.ts

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ interface StartPageContext {
2121
dockerIconUri: string;
2222
showStartPageChecked: 'checked' | '';
2323
isMac: boolean;
24+
showWhatsNew: boolean;
2425
}
2526

2627
class StartPage {
@@ -70,6 +71,7 @@ class StartPage {
7071
dockerIconUri: webview.asWebviewUri(vscode.Uri.joinPath(resourcesRoot, 'docker_blue.png')).toString(),
7172
showStartPageChecked: vscode.workspace.getConfiguration('docker').get('showStartPage', false) ? 'checked' : '',
7273
isMac: isMac(),
74+
showWhatsNew: !!(await ext.experimentationService.isLiveFlightEnabled('vscode-docker.whatsNew')),
7375
};
7476

7577
const template = Handlebars.compile(await fse.readFile(templatePath.fsPath, 'utf-8'));

src/tree/AzExtParentTreeItemIntermediate.ts

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export abstract class AzExtParentTreeItemIntermediate extends AzExtParentTreeIte
2424
// TODO: when possible we should remove this
2525
// @ts-expect-error
2626
return await callWithTelemetryAndErrorHandling('resolveTooltip', async (actionContext: IActionContext) => {
27-
actionContext.telemetry.suppressIfSuccessful = true;
2827
actionContext.errorHandling.suppressDisplay = true;
2928
actionContext.errorHandling.rethrow = true;
3029

src/tree/containers/ContainerTreeItem.ts

+1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ export class ContainerTreeItem extends AzExtParentTreeItemIntermediate implement
136136
}
137137

138138
public async resolveTooltipInternal(actionContext: IActionContext): Promise<vscode.MarkdownString> {
139+
actionContext.telemetry.properties.tooltipType = 'container';
139140
return resolveTooltipMarkdown(containerTooltipTemplate, { NormalizedName: this.containerName, ...await ext.dockerClient.inspectContainer(actionContext, this.containerId) });
140141
}
141142

src/tree/contexts/ContextTreeItem.ts

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export class ContextTreeItem extends AzExtTreeItemIntermediate {
8585
}
8686

8787
public async resolveTooltipInternal(actionContext: IActionContext): Promise<MarkdownString> {
88+
actionContext.telemetry.properties.tooltipType = 'context';
8889
return resolveTooltipMarkdown(contextTooltipTemplate, await this.inspect(actionContext));
8990
}
9091
}

src/tree/images/ImageTreeItem.ts

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export class ImageTreeItem extends AzExtTreeItemIntermediate {
7777
}
7878

7979
public async resolveTooltipInternal(actionContext: IActionContext): Promise<MarkdownString> {
80+
actionContext.telemetry.properties.tooltipType = 'image';
8081
return resolveTooltipMarkdown(imageTooltipTemplate, { NormalizedName: this.fullTag, NormalizedSize: getCommonPropertyValue(this._item, 'Size'), ...await ext.dockerClient.inspectImage(actionContext, this.imageId) });
8182
}
8283
}

src/tree/networks/NetworkTreeItem.ts

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export class NetworkTreeItem extends AzExtTreeItemIntermediate {
6060
}
6161

6262
public async resolveTooltipInternal(actionContext: IActionContext): Promise<MarkdownString> {
63+
actionContext.telemetry.properties.tooltipType = 'network';
6364
return resolveTooltipMarkdown(networkTooltipTemplate, await ext.dockerClient.inspectNetwork(actionContext, this.networkName));
6465
}
6566
}

src/tree/volumes/VolumeTreeItem.ts

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export class VolumeTreeItem extends AzExtTreeItemIntermediate {
5050
}
5151

5252
public async resolveTooltipInternal(actionContext: IActionContext): Promise<MarkdownString> {
53+
actionContext.telemetry.properties.tooltipType = 'volume';
5354
return resolveTooltipMarkdown(volumeTooltipTemplate, await ext.dockerClient.inspectVolume(actionContext, this.volumeName));
5455
}
5556
}

0 commit comments

Comments
 (0)