Skip to content

Commit 4f39693

Browse files
authored
Cleanup getting started video experiment (microsoft#217620)
1 parent d681a19 commit 4f39693

File tree

2 files changed

+5
-125
lines changed

2 files changed

+5
-125
lines changed

src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts

Lines changed: 4 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ import { IExtensionService } from 'vs/workbench/services/extensions/common/exten
6969
import { IHostService } from 'vs/workbench/services/host/browser/host';
7070
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
7171
import { GettingStartedIndexList } from './gettingStartedList';
72-
import { IWorkbenchAssignmentService } from 'vs/workbench/services/assignment/common/assignmentService';
7372

7473
const SLIDE_TRANSITION_TIME_MS = 250;
7574
const configurationKey = 'workbench.startupEditor';
@@ -148,7 +147,6 @@ export class GettingStartedPage extends EditorPane {
148147
private recentlyOpenedList?: GettingStartedIndexList<RecentEntry>;
149148
private startList?: GettingStartedIndexList<IWelcomePageStartEntry>;
150149
private gettingStartedList?: GettingStartedIndexList<IResolvedWalkthrough>;
151-
private videoList?: GettingStartedIndexList<IWelcomePageStartEntry>;
152150

153151
private stepsSlide!: HTMLElement;
154152
private categoriesSlide!: HTMLElement;
@@ -187,8 +185,7 @@ export class GettingStartedPage extends EditorPane {
187185
@IHostService private readonly hostService: IHostService,
188186
@IWebviewService private readonly webviewService: IWebviewService,
189187
@IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService,
190-
@IAccessibilityService private readonly accessibilityService: IAccessibilityService,
191-
@IWorkbenchAssignmentService private readonly tasExperimentService: IWorkbenchAssignmentService
188+
@IAccessibilityService private readonly accessibilityService: IAccessibilityService
192189
) {
193190

194191
super(GettingStartedPage.ID, group, telemetryService, themeService, storageService);
@@ -443,10 +440,6 @@ export class GettingStartedPage extends EditorPane {
443440
}
444441
break;
445442
}
446-
case 'hideVideos': {
447-
this.hideVideos();
448-
break;
449-
}
450443
case 'openLink': {
451444
this.openerService.open(argument);
452445
break;
@@ -465,11 +458,6 @@ export class GettingStartedPage extends EditorPane {
465458
this.gettingStartedList?.rerender();
466459
}
467460

468-
private hideVideos() {
469-
this.setHiddenCategories([...this.getHiddenCategories().add('getting-started-videos')]);
470-
this.videoList?.setEntries(undefined);
471-
}
472-
473461
private markAllStepsComplete() {
474462
if (this.currentWalkthrough) {
475463
this.currentWalkthrough?.steps.forEach(step => {
@@ -821,29 +809,6 @@ export class GettingStartedPage extends EditorPane {
821809

822810
const startList = this.buildStartList();
823811
const recentList = this.buildRecentlyOpenedList();
824-
825-
const showVideoTutorials = await Promise.race([
826-
this.tasExperimentService?.getTreatment<boolean>('gettingStarted.showVideoTutorials'),
827-
new Promise<boolean | undefined>(resolve => setTimeout(() => resolve(false), 200))
828-
]);
829-
830-
let videoList: GettingStartedIndexList<IWelcomePageStartEntry>;
831-
if (showVideoTutorials === true) {
832-
this.showFeaturedWalkthrough = false;
833-
videoList = this.buildVideosList();
834-
const layoutVideos = () => {
835-
if (videoList?.itemCount > 0) {
836-
reset(rightColumn, videoList?.getDomElement(), gettingStartedList.getDomElement());
837-
}
838-
else {
839-
reset(rightColumn, gettingStartedList.getDomElement());
840-
}
841-
setTimeout(() => this.categoriesPageScrollbar?.scanDomNode(), 50);
842-
layoutRecentList();
843-
};
844-
videoList.onDidChange(layoutVideos);
845-
}
846-
847812
const gettingStartedList = this.buildGettingStartedWalkthroughsList();
848813

849814
const footer = $('.footer', {},
@@ -855,31 +820,18 @@ export class GettingStartedPage extends EditorPane {
855820
const layoutLists = () => {
856821
if (gettingStartedList.itemCount) {
857822
this.container.classList.remove('noWalkthroughs');
858-
if (videoList?.itemCount > 0) {
859-
this.container.classList.remove('noVideos');
860-
reset(rightColumn, videoList?.getDomElement(), gettingStartedList.getDomElement());
861-
} else {
862-
this.container.classList.add('noVideos');
863-
reset(rightColumn, gettingStartedList.getDomElement());
864-
}
823+
reset(rightColumn, gettingStartedList.getDomElement());
865824
}
866825
else {
867826
this.container.classList.add('noWalkthroughs');
868-
if (videoList?.itemCount > 0) {
869-
this.container.classList.remove('noVideos');
870-
reset(rightColumn, videoList?.getDomElement());
871-
}
872-
else {
873-
this.container.classList.add('noVideos');
874-
reset(rightColumn);
875-
}
827+
reset(rightColumn);
876828
}
877829
setTimeout(() => this.categoriesPageScrollbar?.scanDomNode(), 50);
878830
layoutRecentList();
879831
};
880832

881833
const layoutRecentList = () => {
882-
if (this.container.classList.contains('noWalkthroughs') && this.container.classList.contains('noVideos')) {
834+
if (this.container.classList.contains('noWalkthroughs')) {
883835
recentList.setLimit(10);
884836
reset(leftColumn, startList.getDomElement());
885837
reset(rightColumn, recentList.getDomElement());
@@ -1139,69 +1091,6 @@ export class GettingStartedPage extends EditorPane {
11391091
return gettingStartedList;
11401092
}
11411093

1142-
private buildVideosList(): GettingStartedIndexList<IWelcomePageStartEntry> {
1143-
1144-
const renderFeaturedExtensions = (entry: IWelcomePageStartEntry): HTMLElement => {
1145-
1146-
const featuredBadge = $('.featured-badge', {});
1147-
const descriptionContent = $('.description-content', {},);
1148-
1149-
reset(featuredBadge, $('.featured', {}, $('span.featured-icon.codicon.codicon-star-full')));
1150-
reset(descriptionContent, ...renderLabelWithIcons(entry.description));
1151-
1152-
const titleContent = $('h3.category-title.max-lines-3', { 'x-category-title-for': entry.id });
1153-
reset(titleContent, ...renderLabelWithIcons(entry.title));
1154-
1155-
return $('button.getting-started-category' + '.featured',
1156-
{
1157-
'x-dispatch': 'openLink:' + entry.command,
1158-
'title': entry.title
1159-
},
1160-
featuredBadge,
1161-
$('.main-content', {},
1162-
this.iconWidgetFor(entry),
1163-
titleContent,
1164-
$('a.codicon.codicon-close.hide-category-button', {
1165-
'tabindex': 0,
1166-
'x-dispatch': 'hideVideos',
1167-
'title': localize('close', "Hide"),
1168-
'role': 'button',
1169-
'aria-label': localize('closeAriaLabel', "Hide"),
1170-
}),
1171-
),
1172-
descriptionContent);
1173-
};
1174-
1175-
if (this.videoList) {
1176-
this.videoList.dispose();
1177-
}
1178-
const videoList = this.videoList = new GettingStartedIndexList(
1179-
{
1180-
title: localize('videos', "Videos"),
1181-
klass: 'getting-started-videos',
1182-
limit: 1,
1183-
renderElement: renderFeaturedExtensions,
1184-
contextService: this.contextService,
1185-
});
1186-
1187-
if (this.getHiddenCategories().has('getting-started-videos')) {
1188-
return videoList;
1189-
}
1190-
1191-
videoList.setEntries([{
1192-
id: 'getting-started-videos',
1193-
title: localize('videos-title', 'Watch Getting Started Tutorials'),
1194-
description: localize('videos-description', 'Learn VS Code\'s must-have features in short and practical videos'),
1195-
command: 'https://aka.ms/vscode-getting-started-tutorials',
1196-
order: 0,
1197-
icon: { type: 'icon', icon: Codicon.deviceCameraVideo },
1198-
when: ContextKeyExpr.true(),
1199-
}]);
1200-
videoList.onDidChange(() => this.registerDispatchListeners());
1201-
1202-
return videoList;
1203-
}
1204-
12051094
layout(size: Dimension) {
12061095
this.detailsScrollbar?.scanDomNode();
12071096

@@ -1211,7 +1100,6 @@ export class GettingStartedPage extends EditorPane {
12111100
this.startList?.layout(size);
12121101
this.gettingStartedList?.layout(size);
12131102
this.recentlyOpenedList?.layout(size);
1214-
this.videoList?.layout(size);
12151103

12161104
if (this.editorInput?.selectedStep && this.currentMediaType) {
12171105
this.mediaDisposables.clear();

src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -228,21 +228,13 @@
228228
}
229229

230230
.monaco-workbench .part.editor > .content .gettingStartedContainer .icon-widget,
231-
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlideCategories .icon-widget:not(.codicon-device-camera-video),
232231
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlideCategories .featured-icon {
233232
font-size: 20px;
234233
padding-right: 8px;
235234
position: relative;
236235
top: 3px;
237236
}
238237

239-
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlideCategories .icon-widget.codicon-device-camera-video {
240-
font-size: 20px;
241-
padding-right: 8px;
242-
position: relative;
243-
transform: translateY(+100%);
244-
}
245-
246238
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlideCategories .codicon:not(.icon-widget, .featured-icon, .hide-category-button) {
247239
margin: 0 2px;
248240
}
@@ -348,7 +340,7 @@
348340
right: 8px;
349341
}
350342

351-
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlide .getting-started-category.featured .icon-widget:not(.codicon-device-camera-video) {
343+
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlide .getting-started-category.featured .icon-widget {
352344
visibility: hidden;
353345
}
354346

0 commit comments

Comments
 (0)