Skip to content

Commit b0cf27d

Browse files
author
David Kutugata
authored
Removed control tower code for the start page (microsoft#13195)
1 parent 5841782 commit b0cf27d

4 files changed

Lines changed: 6 additions & 16 deletions

File tree

news/3 Code Health/12919.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Removed control tower code for the start page.

src/client/common/experiments/groups.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ export enum NotebookEditorSupport {
8080
nativeNotebookExperiment = 'NativeNotebook - experiment'
8181
}
8282

83-
// Experiment to turn on the start page
84-
export enum EnableStartPage {
85-
experiment = 'EnableStartPage'
86-
}
87-
8883
// Experiment to remove the Kernel/Server Tooblar in the Interactive Window when running a local Jupyter Server.
8984
// It doesn't make sense to have it there, the user can already change the kernel
9085
// by changing the python interpreter on the status bar.

src/client/common/startPage/startPage.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ import {
1919
IWebPanelProvider,
2020
IWorkspaceService
2121
} from '../application/types';
22-
import { EnableStartPage } from '../experiments/groups';
2322
import { IFileSystem } from '../platform/types';
24-
import { IConfigurationService, IExperimentService, IExtensionContext, Resource } from '../types';
23+
import { IConfigurationService, IExtensionContext, Resource } from '../types';
2524
import * as localize from '../utils/localize';
2625
import { StopWatch } from '../utils/stopWatch';
2726
import { StartPageMessageListener } from './startPageMessageListener';
@@ -51,8 +50,7 @@ export class StartPage extends WebViewHost<IStartPageMapping> implements IStartP
5150
@inject(IDocumentManager) private readonly documentManager: IDocumentManager,
5251
@inject(IApplicationShell) private appShell: IApplicationShell,
5352
@inject(IExtensionContext) private readonly context: IExtensionContext,
54-
@inject(IApplicationEnvironment) private appEnvironment: IApplicationEnvironment,
55-
@inject(IExperimentService) private readonly expService: IExperimentService
53+
@inject(IApplicationEnvironment) private appEnvironment: IApplicationEnvironment
5654
) {
5755
super(
5856
configuration,
@@ -244,10 +242,9 @@ export class StartPage extends WebViewHost<IStartPageMapping> implements IStartP
244242
}
245243

246244
private async activateBackground(): Promise<void> {
247-
const enabled = await this.expService.inExperiment(EnableStartPage.experiment);
248245
const settings = this.configuration.getSettings();
249246

250-
if (enabled && settings.showStartPage && this.appEnvironment.extensionChannel === 'stable') {
247+
if (settings.showStartPage && this.appEnvironment.extensionChannel === 'stable') {
251248
// extesionVersionChanged() reads CHANGELOG.md
252249
// So we use separate if's to try and avoid reading a file every time
253250
const firstTimeOrUpdate = await this.extensionVersionChanged();

src/test/startPage/startPage.unit.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
import { IFileSystem } from '../../client/common/platform/types';
1717
import { StartPage } from '../../client/common/startPage/startPage';
1818
import { IStartPage } from '../../client/common/startPage/types';
19-
import { IConfigurationService, IExperimentService, IExtensionContext } from '../../client/common/types';
19+
import { IConfigurationService, IExtensionContext } from '../../client/common/types';
2020
import { ICodeCssGenerator, INotebookEditorProvider, IThemeFinder } from '../../client/datascience/types';
2121
import { MockPythonSettings } from '../datascience/mockPythonSettings';
2222
import { MockAutoSelectionService } from '../mocks/autoSelector';
@@ -36,7 +36,6 @@ suite('StartPage tests', () => {
3636
let context: typemoq.IMock<IExtensionContext>;
3737
let appEnvironment: typemoq.IMock<IApplicationEnvironment>;
3838
let memento: typemoq.IMock<Memento>;
39-
let experiment: typemoq.IMock<IExperimentService>;
4039
const dummySettings = new MockPythonSettings(undefined, new MockAutoSelectionService());
4140

4241
function setupVersions(savedVersion: string, actualVersion: string) {
@@ -71,7 +70,6 @@ suite('StartPage tests', () => {
7170
context = typemoq.Mock.ofType<IExtensionContext>();
7271
appEnvironment = typemoq.Mock.ofType<IApplicationEnvironment>();
7372
memento = typemoq.Mock.ofType<Memento>();
74-
experiment = typemoq.Mock.ofType<IExperimentService>();
7573

7674
configuration.setup((cs) => cs.getSettings(undefined)).returns(() => dummySettings);
7775

@@ -87,8 +85,7 @@ suite('StartPage tests', () => {
8785
documentManager.object,
8886
appShell.object,
8987
context.object,
90-
appEnvironment.object,
91-
experiment.object
88+
appEnvironment.object
9289
);
9390
});
9491

0 commit comments

Comments
 (0)