Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/client/activation/extensionSurvey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import { inject, injectable, optional } from 'inversify';
import * as querystring from 'querystring';
import { env, UIKind } from 'vscode';
import { IApplicationEnvironment, IApplicationShell } from '../common/application/types';
import { ShowExtensionSurveyPrompt } from '../common/experiments/groups';
import '../common/extensions';
Expand Down Expand Up @@ -53,6 +54,9 @@ export class ExtensionSurveyPrompt implements IExtensionSingleActivationService

@traceDecorators.error('Failed to check whether to display prompt for extension survey')
public shouldShowBanner(): boolean {
if (env.uiKind === UIKind.Web) {
return false;
}
const doNotShowSurveyAgain = this.persistentState.createGlobalPersistentState(
extensionSurveyStateKeys.doNotShowAgain,
false
Expand Down
7 changes: 5 additions & 2 deletions src/client/datascience/dataScienceSurveyBanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'use strict';

import { inject, injectable, named } from 'inversify';
import { Event, EventEmitter } from 'vscode';
import { env, Event, EventEmitter, UIKind } from 'vscode';
import { IApplicationShell } from '../common/application/types';
import '../common/extensions';
import {
Expand Down Expand Up @@ -100,7 +100,10 @@ export class DataScienceSurveyBanner implements IPythonExtensionBanner {
this.isInitialized = true;
}
public get enabled(): boolean {
return this.persistentState.createGlobalPersistentState<boolean>(DSSurveyStateKeys.ShowBanner, true).value;
return (
this.persistentState.createGlobalPersistentState<boolean>(DSSurveyStateKeys.ShowBanner, true).value &&
env.uiKind !== UIKind.Web
);
}

public async showBanner(): Promise<void> {
Expand Down
7 changes: 5 additions & 2 deletions src/client/datascience/gather/gatherListener.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { inject, injectable } from 'inversify';
import { IDisposable } from 'monaco-editor';
import * as uuid from 'uuid/v4';
import { Event, EventEmitter, Position, Uri, ViewColumn } from 'vscode';
import { env, Event, EventEmitter, Position, UIKind, Uri, ViewColumn } from 'vscode';
import { createMarkdownCell } from '../../../datascience-ui/common/cellFactory';
import { IApplicationShell, IDocumentManager } from '../../common/application/types';
import { PYTHON_LANGUAGE } from '../../common/constants';
Expand Down Expand Up @@ -290,7 +290,10 @@ export class GatherListener implements IInteractiveWindowListener {
slicedProgram = slicedProgram.replace(re, '');
}

const annotatedScript = `${localize.DataScience.gatheredScriptDescription()}${defaultCellMarker}\n${slicedProgram}`;
const annotatedScript =
env.uiKind === UIKind.Web
? `${defaultCellMarker}\n${slicedProgram}`
: `${localize.DataScience.gatheredScriptDescription()}${defaultCellMarker}\n${slicedProgram}`;

// Don't want to open the gathered code on top of the interactive window
let viewColumn: ViewColumn | undefined;
Expand Down
7 changes: 5 additions & 2 deletions src/client/datascience/notebook/survey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
'use strict';

import { inject, injectable } from 'inversify';
import { env, UIKind } from 'vscode';
import { IExtensionSingleActivationService } from '../../activation/types';
import { IApplicationShell, IVSCodeNotebook } from '../../common/application/types';
import { traceError } from '../../common/logger';
Expand All @@ -27,8 +28,10 @@ export type NotebookSurveyUsageData = {
@injectable()
export class NotebookSurveyBanner {
public get enabled(): boolean {
return !this.persistentState.createGlobalPersistentState<NotebookSurveyUsageData>(storageKey, {}).value
.surveyDisabled;
return (
!this.persistentState.createGlobalPersistentState<NotebookSurveyUsageData>(storageKey, {}).value
.surveyDisabled && env.uiKind !== UIKind.Web
);
}
private disabledInCurrentSession: boolean = false;
constructor(
Expand Down
4 changes: 2 additions & 2 deletions src/client/debugger/extension/banner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'use strict';

import { inject, injectable } from 'inversify';
import { Disposable } from 'vscode';
import { Disposable, env, UIKind } from 'vscode';
import { IApplicationShell, IDebugService } from '../../common/application/types';
import '../../common/extensions';
import { traceError } from '../../common/logger';
Expand Down Expand Up @@ -63,7 +63,7 @@ export class DebuggerBanner implements IDebuggerBanner {
// showing banner

public async shouldShow(): Promise<boolean> {
if (!this.isEnabled() || this.disabledInCurrentSession) {
if (!this.isEnabled() || this.disabledInCurrentSession || env.uiKind === UIKind.Web) {
return false;
}
if (!(await this.passedThreshold())) {
Expand Down