From 3d98cbd947c92ff6bc8811108cf27ade075ed679 Mon Sep 17 00:00:00 2001 From: "Brandon Waterloo [MSFT]" <36966225+bwateratmsft@users.noreply.github.com> Date: Mon, 16 Aug 2021 15:13:07 -0400 Subject: [PATCH] Suppress the Report Issue button forever (#3147) --- src/commands/registerCommands.ts | 2 -- src/commands/reportIssue.ts | 11 ----------- src/extension.ts | 7 ++++++- 3 files changed, 6 insertions(+), 14 deletions(-) delete mode 100644 src/commands/reportIssue.ts diff --git a/src/commands/registerCommands.ts b/src/commands/registerCommands.ts index 0f9c7258d7..5b2630fdfe 100644 --- a/src/commands/registerCommands.ts +++ b/src/commands/registerCommands.ts @@ -73,7 +73,6 @@ import { logOutOfDockerCli } from "./registries/logOutOfDockerCli"; import { pullImageFromRepository, pullRepository } from "./registries/pullImages"; import { reconnectRegistry } from "./registries/reconnectRegistry"; import { registryHelp } from "./registries/registryHelp"; -import { reportIssue } from "./reportIssue"; import { openStartPage } from "./startPage/openStartPage"; import { configureVolumesExplorer } from "./volumes/configureVolumesExplorer"; import { inspectVolume } from "./volumes/inspectVolume"; @@ -203,6 +202,5 @@ export function registerCommands(): void { registerLocalCommand('vscode-docker.installDocker', installDocker); registerCommand('vscode-docker.help', help); - registerCommand('vscode-docker.help.reportIssue', reportIssue); registerCommand('vscode-docker.help.openStartPage', openStartPage); } diff --git a/src/commands/reportIssue.ts b/src/commands/reportIssue.ts deleted file mode 100644 index 3ac14e8a3f..0000000000 --- a/src/commands/reportIssue.ts +++ /dev/null @@ -1,11 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See LICENSE.md in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -import * as vscode from 'vscode'; -import { IActionContext } from 'vscode-azureextensionui'; -import { extensionId } from '../constants'; - -export async function reportIssue(context: IActionContext): Promise { - return vscode.commands.executeCommand('vscode.openIssueReporter', `${extensionId}`); -} diff --git a/src/extension.ts b/src/extension.ts index 0bca398d9e..ff114ba251 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -7,7 +7,7 @@ import * as fse from 'fs-extra'; import * as os from 'os'; import * as path from 'path'; import * as vscode from 'vscode'; -import { callWithTelemetryAndErrorHandling, createAzExtOutputChannel, createExperimentationService, IActionContext, registerUIExtensionVariables } from 'vscode-azureextensionui'; +import { callWithTelemetryAndErrorHandling, createAzExtOutputChannel, createExperimentationService, IActionContext, registerErrorHandler, registerReportIssueCommand, registerUIExtensionVariables } from 'vscode-azureextensionui'; import { ConfigurationParams, DidChangeConfigurationNotification, DocumentSelector, LanguageClient, LanguageClientOptions, Middleware, ServerOptions, TransportKind } from 'vscode-languageclient/node'; import * as tas from 'vscode-tas-client'; import { registerCommands } from './commands/registerCommands'; @@ -82,6 +82,11 @@ export async function activateInternal(ctx: vscode.ExtensionContext, perfStats: // Temporarily disabled--reenable if we need to do any surveys // (new SurveyManager()).activate(); + // Remove the "Report Issue" button from all error messages in favor of the command + // TODO: use built-in issue reporter if/when support is added to include arbitrary info in addition to repro steps (which we would leave blank to force the user to type *something*) + registerErrorHandler(ctx => ctx.errorHandling.suppressReportIssue = true); + registerReportIssueCommand('vscode-docker.help.reportIssue'); + ctx.subscriptions.push( vscode.languages.registerCompletionItemProvider( DOCUMENT_SELECTOR,