@codingame/monaco-vscode-issue-service-override 7.1.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/issue.js +2 -3
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/issue/browser/issue.contribution.js +7 -8
- package/vscode/src/vs/workbench/contrib/issue/browser/issue.js +61 -59
- package/vscode/src/vs/workbench/contrib/issue/browser/issueFormService.js +87 -61
- package/vscode/src/vs/workbench/contrib/issue/browser/issueReporterModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/issue/browser/issueReporterPage.js +35 -40
- package/vscode/src/vs/workbench/contrib/issue/browser/issueReporterService.js +11 -12
- package/vscode/src/vs/workbench/contrib/issue/browser/issueService.js +10 -11
- package/vscode/src/vs/workbench/contrib/issue/browser/issueTroubleshoot.js +32 -41
- package/vscode/src/vs/workbench/contrib/issue/common/issue.contribution.js +3 -4
- package/vscode/src/vs/workbench/contrib/issue/common/issueReporterUtil.js +17 -0
- /package/vscode/src/vs/{platform → workbench/contrib}/issue/common/issue.js +0 -0
package/issue.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
2
|
-
import { IWorkbenchIssueService } from 'vscode/vscode/vs/workbench/contrib/issue/common/issue.service';
|
|
2
|
+
import { IWorkbenchIssueService, IIssueFormService } from 'vscode/vscode/vs/workbench/contrib/issue/common/issue.service';
|
|
3
3
|
import { TroubleshootIssueService } from './vscode/src/vs/workbench/contrib/issue/browser/issueTroubleshoot.js';
|
|
4
4
|
import { ITroubleshootIssueService } from 'vscode/vscode/vs/workbench/contrib/issue/browser/issueTroubleshoot.service';
|
|
5
5
|
import { BrowserIssueService } from './vscode/src/vs/workbench/contrib/issue/browser/issueService.js';
|
|
6
|
-
import { IIssueMainService } from 'vscode/vscode/vs/platform/issue/common/issue.service';
|
|
7
6
|
import { IssueFormService } from './vscode/src/vs/workbench/contrib/issue/browser/issueFormService.js';
|
|
8
7
|
import './vscode/src/vs/workbench/contrib/issue/browser/issue.contribution.js';
|
|
9
8
|
|
|
@@ -11,7 +10,7 @@ function getServiceOverride() {
|
|
|
11
10
|
return {
|
|
12
11
|
[( IWorkbenchIssueService.toString())]: new SyncDescriptor(BrowserIssueService, [], false),
|
|
13
12
|
[( ITroubleshootIssueService.toString())]: new SyncDescriptor(TroubleshootIssueService, [], false),
|
|
14
|
-
[(
|
|
13
|
+
[( IIssueFormService.toString())]: new SyncDescriptor(IssueFormService, [], false)
|
|
15
14
|
};
|
|
16
15
|
}
|
|
17
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-issue-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@8.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
4
|
+
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
5
|
+
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
4
6
|
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
5
|
-
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
6
7
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
7
8
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
8
9
|
import { Extensions as Extensions$1 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
10
|
+
import './issueFormService.js';
|
|
9
11
|
import './issueService.js';
|
|
12
|
+
import './issueTroubleshoot.js';
|
|
10
13
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
14
|
import { BaseIssueContribution } from '../common/issue.contribution.js';
|
|
12
|
-
import {
|
|
13
|
-
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
14
|
-
import './issueFormService.js';
|
|
15
|
-
import './issueTroubleshoot.js';
|
|
15
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
16
16
|
|
|
17
|
-
const _moduleId = "vs/workbench/contrib/issue/browser/issue.contribution";
|
|
18
17
|
let WebIssueContribution = class WebIssueContribution extends BaseIssueContribution {
|
|
19
18
|
constructor(productService, configurationService) {
|
|
20
19
|
super(productService, configurationService);
|
|
@@ -35,5 +34,5 @@ WebIssueContribution = ( (__decorate([
|
|
|
35
34
|
], WebIssueContribution)));
|
|
36
35
|
( (Registry.as(Extensions$1.Workbench))).registerWorkbenchContribution(WebIssueContribution, LifecyclePhase.Restored);
|
|
37
36
|
CommandsRegistry.registerCommand('_issues.getSystemStatus', (accessor) => {
|
|
38
|
-
return (
|
|
37
|
+
return ( localize(1985, "The --status argument is not yet supported in browsers."));
|
|
39
38
|
});
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
2
|
import { createStyleSheet, $, reset, windowOpenNoOpener } from 'vscode/vscode/vs/base/browser/dom';
|
|
4
3
|
import { Button, unthemedButtonStyles } from 'vscode/vscode/vs/base/browser/ui/button/button';
|
|
5
4
|
import { renderIcon } from 'vscode/vscode/vs/base/browser/ui/iconLabel/iconLabels';
|
|
5
|
+
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
6
6
|
import { Delayer, RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
7
7
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
8
8
|
import { debounce } from 'vscode/vscode/vs/base/common/decorators';
|
|
9
9
|
import { CancellationError } from 'vscode/vscode/vs/base/common/errors';
|
|
10
|
+
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
10
11
|
import { isLinuxSnap } from 'vscode/vscode/vs/base/common/platform';
|
|
11
12
|
import { escape } from 'vscode/vscode/vs/base/common/strings';
|
|
12
13
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
13
|
-
import {
|
|
14
|
-
import { IssueType } from '../../../../platform/issue/common/issue.js';
|
|
15
|
-
import { IIssueMainService } from 'vscode/vscode/vs/platform/issue/common/issue.service';
|
|
16
|
-
import { normalizeGitHubUrl } from '../../../../platform/issue/common/issueReporterUtil.js';
|
|
14
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
17
15
|
import { getIconsStyleSheet } from 'vscode/vscode/vs/platform/theme/browser/iconsStyleSheet';
|
|
18
16
|
import { IssueReporterModel } from './issueReporterModel.js';
|
|
19
|
-
import {
|
|
17
|
+
import { IssueType } from '../common/issue.js';
|
|
18
|
+
import { IIssueFormService } from 'vscode/vscode/vs/workbench/contrib/issue/common/issue.service';
|
|
19
|
+
import { normalizeGitHubUrl } from '../common/issueReporterUtil.js';
|
|
20
20
|
|
|
21
|
-
const _moduleId = "vs/workbench/contrib/issue/browser/issue";
|
|
22
21
|
const MAX_URL_LENGTH = 7500;
|
|
23
22
|
var IssueSource;
|
|
24
23
|
( ((function(IssueSource) {
|
|
@@ -28,7 +27,7 @@ var IssueSource;
|
|
|
28
27
|
IssueSource["Unknown"] = "unknown";
|
|
29
28
|
})(IssueSource || (IssueSource = {}))));
|
|
30
29
|
let BaseIssueReporterService = class BaseIssueReporterService extends Disposable {
|
|
31
|
-
constructor(disableExtensions, data, os, product, window, isWeb,
|
|
30
|
+
constructor(disableExtensions, data, os, product, window, isWeb, issueFormService) {
|
|
32
31
|
super();
|
|
33
32
|
this.disableExtensions = disableExtensions;
|
|
34
33
|
this.data = data;
|
|
@@ -36,7 +35,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
36
35
|
this.product = product;
|
|
37
36
|
this.window = window;
|
|
38
37
|
this.isWeb = isWeb;
|
|
39
|
-
this.
|
|
38
|
+
this.issueFormService = issueFormService;
|
|
40
39
|
this.receivedSystemInfo = false;
|
|
41
40
|
this.numberOfSearchResultsDisplayed = 0;
|
|
42
41
|
this.receivedPerformanceInfo = false;
|
|
@@ -124,6 +123,10 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
124
123
|
if (styles.inputBackground) {
|
|
125
124
|
content.push(`input[type="text"], textarea, select, .issues-container > .issue > .issue-state, .block-info { background-color: ${styles.inputBackground} !important; }`);
|
|
126
125
|
}
|
|
126
|
+
if (styles.backgroundColor) {
|
|
127
|
+
content.push(`.monaco-workbench { background-color: ${styles.backgroundColor} !important; }`);
|
|
128
|
+
content.push(`.issue-reporter-body::-webkit-scrollbar-track { background-color: ${styles.backgroundColor}; }`);
|
|
129
|
+
}
|
|
127
130
|
if (styles.inputBorder) {
|
|
128
131
|
content.push(`input[type="text"], textarea, select { border: 1px solid ${styles.inputBorder}; }`);
|
|
129
132
|
}
|
|
@@ -155,14 +158,12 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
155
158
|
if (styles.textLinkActiveForeground) {
|
|
156
159
|
content.push(`a:hover, .workbenchCommand:hover { color: ${styles.textLinkActiveForeground}; }`);
|
|
157
160
|
}
|
|
158
|
-
if (styles.sliderBackgroundColor) {
|
|
159
|
-
content.push(`::-webkit-scrollbar-thumb { background-color: ${styles.sliderBackgroundColor}; }`);
|
|
160
|
-
}
|
|
161
161
|
if (styles.sliderActiveColor) {
|
|
162
|
-
content.push(
|
|
162
|
+
content.push(`.issue-reporter-body::-webkit-scrollbar-thumb:active { background-color: ${styles.sliderActiveColor}; }`);
|
|
163
163
|
}
|
|
164
164
|
if (styles.sliderHoverColor) {
|
|
165
|
-
content.push(
|
|
165
|
+
content.push(`.issue-reporter-body::-webkit-scrollbar-thumb { background-color: ${styles.sliderHoverColor}; }`);
|
|
166
|
+
content.push(`.issue-reporter-body::--webkit-scrollbar-thumb:hover { background-color: ${styles.sliderHoverColor}; }`);
|
|
166
167
|
}
|
|
167
168
|
if (styles.buttonBackground) {
|
|
168
169
|
content.push(`.monaco-text-button { background-color: ${styles.buttonBackground} !important; }`);
|
|
@@ -206,11 +207,11 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
206
207
|
const info = containingElement && containingElement.lastElementChild;
|
|
207
208
|
if (info && info.classList.contains('hidden')) {
|
|
208
209
|
show(info);
|
|
209
|
-
label.textContent = (
|
|
210
|
+
label.textContent = ( localize(10115, "hide"));
|
|
210
211
|
}
|
|
211
212
|
else {
|
|
212
213
|
hide(info);
|
|
213
|
-
label.textContent = (
|
|
214
|
+
label.textContent = ( localize(10116, "show"));
|
|
214
215
|
}
|
|
215
216
|
}
|
|
216
217
|
});
|
|
@@ -230,16 +231,16 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
230
231
|
}
|
|
231
232
|
const descriptionTextArea = this.getElementById('issue-title');
|
|
232
233
|
if (value === IssueSource.VSCode) {
|
|
233
|
-
descriptionTextArea.placeholder = (
|
|
234
|
+
descriptionTextArea.placeholder = ( localize(10117, "E.g Workbench is missing problems panel"));
|
|
234
235
|
}
|
|
235
236
|
else if (value === IssueSource.Extension) {
|
|
236
|
-
descriptionTextArea.placeholder = (
|
|
237
|
+
descriptionTextArea.placeholder = ( localize(10118, "E.g. Missing alt text on extension readme image"));
|
|
237
238
|
}
|
|
238
239
|
else if (value === IssueSource.Marketplace) {
|
|
239
|
-
descriptionTextArea.placeholder = (
|
|
240
|
+
descriptionTextArea.placeholder = ( localize(10119, "E.g Cannot disable installed extension"));
|
|
240
241
|
}
|
|
241
242
|
else {
|
|
242
|
-
descriptionTextArea.placeholder = (
|
|
243
|
+
descriptionTextArea.placeholder = ( localize(10120, "Please enter a title"));
|
|
243
244
|
}
|
|
244
245
|
let fileOnExtension, fileOnMarketplace = false;
|
|
245
246
|
if (value === IssueSource.Extension) {
|
|
@@ -297,16 +298,16 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
297
298
|
updatePreviewButtonState() {
|
|
298
299
|
if (this.isPreviewEnabled()) {
|
|
299
300
|
if (this.data.githubAccessToken) {
|
|
300
|
-
this.previewButton.label = (
|
|
301
|
+
this.previewButton.label = ( localize(10121, "Create on GitHub"));
|
|
301
302
|
}
|
|
302
303
|
else {
|
|
303
|
-
this.previewButton.label = (
|
|
304
|
+
this.previewButton.label = ( localize(10122, "Preview on GitHub"));
|
|
304
305
|
}
|
|
305
306
|
this.previewButton.enabled = true;
|
|
306
307
|
}
|
|
307
308
|
else {
|
|
308
309
|
this.previewButton.enabled = false;
|
|
309
|
-
this.previewButton.label = (
|
|
310
|
+
this.previewButton.label = ( localize(10123, "Loading data..."));
|
|
310
311
|
}
|
|
311
312
|
const issueRepoName = this.getElementById('show-repo-name');
|
|
312
313
|
const selectedExtension = this.issueReporterModel.getData().selectedExtension;
|
|
@@ -351,6 +352,9 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
351
352
|
if (issueType === IssueType.PerformanceIssue && this.receivedSystemInfo && this.receivedPerformanceInfo) {
|
|
352
353
|
return true;
|
|
353
354
|
}
|
|
355
|
+
if (issueType === IssueType.FeatureRequest) {
|
|
356
|
+
return true;
|
|
357
|
+
}
|
|
354
358
|
}
|
|
355
359
|
return false;
|
|
356
360
|
}
|
|
@@ -404,7 +408,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
404
408
|
}
|
|
405
409
|
}
|
|
406
410
|
async close() {
|
|
407
|
-
await this.
|
|
411
|
+
await this.issueFormService.closeReporter();
|
|
408
412
|
}
|
|
409
413
|
clearSearchResults() {
|
|
410
414
|
const similarIssues = this.getElementById('similar-issues');
|
|
@@ -422,7 +426,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
422
426
|
}
|
|
423
427
|
else {
|
|
424
428
|
const message = $('div.list-title');
|
|
425
|
-
message.textContent = (
|
|
429
|
+
message.textContent = ( localize(10124, "GitHub query limit exceeded. Please wait."));
|
|
426
430
|
similarIssues.appendChild(message);
|
|
427
431
|
const resetTime = response.headers.get('X-RateLimit-Reset');
|
|
428
432
|
const timeToWait = resetTime ? parseInt(resetTime) - Math.floor(Date.now() / 1000) : 1;
|
|
@@ -472,7 +476,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
472
476
|
if (results.length) {
|
|
473
477
|
const issues = $('div.issues-container');
|
|
474
478
|
const issuesText = $('div.list-title');
|
|
475
|
-
issuesText.textContent = (
|
|
479
|
+
issuesText.textContent = ( localize(10125, "Similar issues"));
|
|
476
480
|
this.numberOfSearchResultsDisplayed = results.length < 5 ? results.length : 5;
|
|
477
481
|
for (let i = 0; i < this.numberOfSearchResultsDisplayed; i++) {
|
|
478
482
|
const issue = results[i];
|
|
@@ -488,8 +492,8 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
488
492
|
const issueIcon = $('span.issue-icon');
|
|
489
493
|
issueIcon.appendChild(renderIcon(issue.state === 'open' ? Codicon.issueOpened : Codicon.issueClosed));
|
|
490
494
|
const issueStateLabel = $('span.issue-state.label');
|
|
491
|
-
issueStateLabel.textContent = issue.state === 'open' ? (
|
|
492
|
-
issueState.title = issue.state === 'open' ? (
|
|
495
|
+
issueStateLabel.textContent = issue.state === 'open' ? ( localize(10126, "Open")) : ( localize(10127, "Closed"));
|
|
496
|
+
issueState.title = issue.state === 'open' ? ( localize(10127, "Open")) : ( localize(10127, "Closed"));
|
|
493
497
|
issueState.appendChild(issueIcon);
|
|
494
498
|
issueState.appendChild(issueStateLabel);
|
|
495
499
|
item = $('div.issue', undefined, issueState, link);
|
|
@@ -504,7 +508,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
504
508
|
}
|
|
505
509
|
else {
|
|
506
510
|
const message = $('div.list-title');
|
|
507
|
-
message.textContent = (
|
|
511
|
+
message.textContent = ( localize(10128, "No similar issues found"));
|
|
508
512
|
similarIssues.appendChild(message);
|
|
509
513
|
}
|
|
510
514
|
}
|
|
@@ -512,7 +516,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
512
516
|
const makeOption = (issueType, description) => $('option', { 'value': issueType.valueOf() }, escape(description));
|
|
513
517
|
const typeSelect = this.getElementById('issue-type');
|
|
514
518
|
const { issueType } = this.issueReporterModel.getData();
|
|
515
|
-
reset(typeSelect, makeOption(IssueType.Bug, (
|
|
519
|
+
reset(typeSelect, makeOption(IssueType.Bug, ( localize(10129, "Bug Report"))), makeOption(IssueType.FeatureRequest, ( localize(10130, "Feature Request"))), makeOption(IssueType.PerformanceIssue, ( localize(10131, "Performance Issue (freeze, slow, crash)"))));
|
|
516
520
|
typeSelect.value = ( (issueType.toString()));
|
|
517
521
|
this.setSourceOptions();
|
|
518
522
|
}
|
|
@@ -542,14 +546,14 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
542
546
|
}
|
|
543
547
|
}
|
|
544
548
|
sourceSelect.innerText = '';
|
|
545
|
-
sourceSelect.append(this.makeOption('', (
|
|
546
|
-
sourceSelect.append(this.makeOption(IssueSource.VSCode, (
|
|
547
|
-
sourceSelect.append(this.makeOption(IssueSource.Extension, (
|
|
549
|
+
sourceSelect.append(this.makeOption('', ( localize(10132, "Select source")), true));
|
|
550
|
+
sourceSelect.append(this.makeOption(IssueSource.VSCode, ( localize(10133, "Visual Studio Code")), false));
|
|
551
|
+
sourceSelect.append(this.makeOption(IssueSource.Extension, ( localize(10134, "A VS Code extension")), false));
|
|
548
552
|
if (this.product.reportMarketplaceIssueUrl) {
|
|
549
|
-
sourceSelect.append(this.makeOption(IssueSource.Marketplace, (
|
|
553
|
+
sourceSelect.append(this.makeOption(IssueSource.Marketplace, ( localize(10135, "Extensions Marketplace")), false));
|
|
550
554
|
}
|
|
551
555
|
if (issueType !== IssueType.FeatureRequest) {
|
|
552
|
-
sourceSelect.append(this.makeOption(IssueSource.Unknown, (
|
|
556
|
+
sourceSelect.append(this.makeOption(IssueSource.Unknown, ( localize(10136, "Don't know")), false));
|
|
553
557
|
}
|
|
554
558
|
if (selected !== -1 && selected < sourceSelect.options.length) {
|
|
555
559
|
sourceSelect.selectedIndex = selected;
|
|
@@ -593,14 +597,13 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
593
597
|
if (selectedExtension && this.nonGitHubIssueUrl) {
|
|
594
598
|
hide(titleTextArea);
|
|
595
599
|
hide(descriptionTextArea);
|
|
596
|
-
reset(descriptionTitle, (
|
|
597
|
-
reset(descriptionSubtitle, (
|
|
598
|
-
|
|
599
|
-
23,
|
|
600
|
+
reset(descriptionTitle, ( localize(10137, "This extension handles issues outside of VS Code")));
|
|
601
|
+
reset(descriptionSubtitle, ( localize(
|
|
602
|
+
10138,
|
|
600
603
|
"The '{0}' extension prefers to use an external issue reporter. To be taken to that issue reporting experience, click the button below.",
|
|
601
604
|
selectedExtension.displayName
|
|
602
605
|
)));
|
|
603
|
-
this.previewButton.label = (
|
|
606
|
+
this.previewButton.label = ( localize(10139, "Open External Issue Reporter"));
|
|
604
607
|
return;
|
|
605
608
|
}
|
|
606
609
|
if (fileOnExtension && selectedExtension?.data) {
|
|
@@ -627,10 +630,9 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
627
630
|
show(extensionsBlock);
|
|
628
631
|
}
|
|
629
632
|
}
|
|
630
|
-
reset(descriptionTitle, (
|
|
631
|
-
reset(descriptionSubtitle, (
|
|
632
|
-
|
|
633
|
-
26,
|
|
633
|
+
reset(descriptionTitle, ( localize(10140, "Steps to Reproduce")) + ' ', $('span.required-input', undefined, '*'));
|
|
634
|
+
reset(descriptionSubtitle, ( localize(
|
|
635
|
+
10141,
|
|
634
636
|
"Share the steps needed to reliably reproduce the problem. Please include actual and expected results. We support GitHub-flavored Markdown. You will be able to edit your issue and add screenshots when we preview it on GitHub."
|
|
635
637
|
)));
|
|
636
638
|
}
|
|
@@ -648,18 +650,16 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
648
650
|
else if (!fileOnMarketplace) {
|
|
649
651
|
show(extensionsBlock);
|
|
650
652
|
}
|
|
651
|
-
reset(descriptionTitle, (
|
|
652
|
-
reset(descriptionSubtitle, (
|
|
653
|
-
|
|
654
|
-
27,
|
|
653
|
+
reset(descriptionTitle, ( localize(10141, "Steps to Reproduce")) + ' ', $('span.required-input', undefined, '*'));
|
|
654
|
+
reset(descriptionSubtitle, ( localize(
|
|
655
|
+
10142,
|
|
655
656
|
"When did this performance issue happen? Does it occur on startup or after a specific series of actions? We support GitHub-flavored Markdown. You will be able to edit your issue and add screenshots when we preview it on GitHub."
|
|
656
657
|
)));
|
|
657
658
|
}
|
|
658
659
|
else if (issueType === IssueType.FeatureRequest) {
|
|
659
|
-
reset(descriptionTitle, (
|
|
660
|
-
reset(descriptionSubtitle, (
|
|
661
|
-
|
|
662
|
-
29,
|
|
660
|
+
reset(descriptionTitle, ( localize(10143, "Description")) + ' ', $('span.required-input', undefined, '*'));
|
|
661
|
+
reset(descriptionSubtitle, ( localize(
|
|
662
|
+
10144,
|
|
663
663
|
"Please describe the feature you would like to see. We support GitHub-flavored Markdown. You will be able to edit your issue and add screenshots when we preview it on GitHub."
|
|
664
664
|
)));
|
|
665
665
|
}
|
|
@@ -668,7 +668,10 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
668
668
|
const inputElement = this.getElementById(inputId);
|
|
669
669
|
const inputValidationMessage = this.getElementById(`${inputId}-empty-error`);
|
|
670
670
|
const descriptionShortMessage = this.getElementById(`description-short-error`);
|
|
671
|
-
if (
|
|
671
|
+
if (inputId === 'description' && this.nonGitHubIssueUrl && this.data.extensionId) {
|
|
672
|
+
return true;
|
|
673
|
+
}
|
|
674
|
+
else if (!inputElement.value) {
|
|
672
675
|
inputElement.classList.add('invalid-input');
|
|
673
676
|
inputValidationMessage?.classList.remove('hidden');
|
|
674
677
|
descriptionShortMessage?.classList.add('hidden');
|
|
@@ -785,13 +788,12 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
785
788
|
return true;
|
|
786
789
|
}
|
|
787
790
|
async writeToClipboard(baseUrl, issueBody) {
|
|
788
|
-
const shouldWrite = await this.
|
|
791
|
+
const shouldWrite = await this.issueFormService.showClipboardDialog();
|
|
789
792
|
if (!shouldWrite) {
|
|
790
793
|
throw ( (new CancellationError()));
|
|
791
794
|
}
|
|
792
|
-
return baseUrl + `&body=${encodeURIComponent((
|
|
793
|
-
|
|
794
|
-
30,
|
|
795
|
+
return baseUrl + `&body=${encodeURIComponent(( localize(
|
|
796
|
+
10145,
|
|
795
797
|
"We have written the needed data into your clipboard because it was too large to send. Please paste."
|
|
796
798
|
)))}`;
|
|
797
799
|
}
|
|
@@ -961,7 +963,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
|
|
|
961
963
|
const target = this.window.document.querySelector('.block-extensions .block-info');
|
|
962
964
|
if (target) {
|
|
963
965
|
if (this.disableExtensions) {
|
|
964
|
-
reset(target, (
|
|
966
|
+
reset(target, ( localize(10146, "Extensions are disabled")));
|
|
965
967
|
return;
|
|
966
968
|
}
|
|
967
969
|
const themeExclusionStr = numThemeExtensions ? `\n(${numThemeExtensions} theme extensions excluded)` : '';
|
|
@@ -1006,7 +1008,7 @@ BaseIssueReporterService.__decorator = ( (__decorate([
|
|
|
1006
1008
|
debounce(300)
|
|
1007
1009
|
], BaseIssueReporterService.prototype, "searchDuplicates", null)));
|
|
1008
1010
|
BaseIssueReporterService = ( (__decorate([
|
|
1009
|
-
( (__param(6,
|
|
1011
|
+
( (__param(6, IIssueFormService)))
|
|
1010
1012
|
], BaseIssueReporterService)));
|
|
1011
1013
|
function hide(el) {
|
|
1012
1014
|
el?.classList.add('hidden');
|
|
@@ -2,30 +2,37 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import { safeInnerHtml } from 'vscode/vscode/vs/base/browser/dom';
|
|
3
3
|
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
4
4
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
|
-
import
|
|
5
|
+
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
6
6
|
import './media/issueReporter.css.js';
|
|
7
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
7
8
|
import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
8
9
|
import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
|
|
9
10
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
11
|
+
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
10
12
|
import { ExtensionIdentifierSet, ExtensionIdentifier } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
11
13
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
|
+
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
12
15
|
import product$1 from 'vscode/vscode/vs/platform/product/common/product';
|
|
16
|
+
import BaseHtml from './issueReporterPage.js';
|
|
13
17
|
import { IssueWebReporter } from './issueReporterService.js';
|
|
14
18
|
import { AuxiliaryWindowMode } from 'vscode/vscode/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService';
|
|
15
19
|
import { IAuxiliaryWindowService } from 'vscode/vscode/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.service';
|
|
20
|
+
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
|
|
16
21
|
|
|
17
22
|
let IssueFormService = class IssueFormService {
|
|
18
|
-
constructor(instantiationService, auxiliaryWindowService, menuService, contextKeyService) {
|
|
23
|
+
constructor(instantiationService, auxiliaryWindowService, menuService, contextKeyService, logService, dialogService, hostService) {
|
|
19
24
|
this.instantiationService = instantiationService;
|
|
20
25
|
this.auxiliaryWindowService = auxiliaryWindowService;
|
|
21
26
|
this.menuService = menuService;
|
|
22
27
|
this.contextKeyService = contextKeyService;
|
|
28
|
+
this.logService = logService;
|
|
29
|
+
this.dialogService = dialogService;
|
|
30
|
+
this.hostService = hostService;
|
|
23
31
|
this.issueReporterWindow = null;
|
|
24
|
-
this.extensionIdentifierSet = ( new ExtensionIdentifierSet());
|
|
32
|
+
this.extensionIdentifierSet = ( (new ExtensionIdentifierSet()));
|
|
25
33
|
mainWindow.addEventListener('message', async (event) => {
|
|
26
34
|
if (event.data && event.data.sendChannel === 'vscode:triggerReporterMenu') {
|
|
27
|
-
const
|
|
28
|
-
const actions = menu.getActions({ renderShortTitle: true }).flatMap(entry => entry[1]);
|
|
35
|
+
const actions = this.menuService.getMenuActions(MenuId.IssueReporter, this.contextKeyService, { renderShortTitle: true }).flatMap(entry => entry[1]);
|
|
29
36
|
for (const action of actions) {
|
|
30
37
|
try {
|
|
31
38
|
if (action.item && 'source' in action.item && action.item.source?.id === event.data.extensionId) {
|
|
@@ -37,19 +44,71 @@ let IssueFormService = class IssueFormService {
|
|
|
37
44
|
console.error(error);
|
|
38
45
|
}
|
|
39
46
|
}
|
|
40
|
-
if (!( this.extensionIdentifierSet.has(event.data.extensionId))) {
|
|
47
|
+
if (!( (this.extensionIdentifierSet.has(event.data.extensionId)))) {
|
|
41
48
|
const replyChannel = `vscode:triggerReporterMenuResponse`;
|
|
42
49
|
mainWindow.postMessage({ replyChannel }, '*');
|
|
43
50
|
}
|
|
44
|
-
menu.dispose();
|
|
45
51
|
}
|
|
46
52
|
});
|
|
47
53
|
}
|
|
54
|
+
async reloadWithExtensionsDisabled() {
|
|
55
|
+
if (this.issueReporterWindow) {
|
|
56
|
+
try {
|
|
57
|
+
await this.hostService.reload({ disableExtensions: true });
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
this.logService.error(error);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async showConfirmCloseDialog() {
|
|
65
|
+
await this.dialogService.prompt({
|
|
66
|
+
type: Severity$1.Warning,
|
|
67
|
+
message: ( localize(
|
|
68
|
+
1980,
|
|
69
|
+
"Your input will not be saved. Are you sure you want to close this window?"
|
|
70
|
+
)),
|
|
71
|
+
buttons: [
|
|
72
|
+
{
|
|
73
|
+
label: ( localize(1981, "&&Yes")),
|
|
74
|
+
run: () => {
|
|
75
|
+
this.closeReporter();
|
|
76
|
+
this.issueReporterWindow = null;
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
label: ( localize(1982, "Cancel")),
|
|
81
|
+
run: () => { }
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
async showClipboardDialog() {
|
|
87
|
+
let result = false;
|
|
88
|
+
await this.dialogService.prompt({
|
|
89
|
+
type: Severity$1.Warning,
|
|
90
|
+
message: ( localize(
|
|
91
|
+
1983,
|
|
92
|
+
"There is too much data to send to GitHub directly. The data will be copied to the clipboard, please paste it into the GitHub issue page that is opened."
|
|
93
|
+
)),
|
|
94
|
+
buttons: [
|
|
95
|
+
{
|
|
96
|
+
label: ( localize(1984, "&&OK")),
|
|
97
|
+
run: () => { result = true; }
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
label: ( localize(1984, "Cancel")),
|
|
101
|
+
run: () => { result = false; }
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
});
|
|
105
|
+
return result;
|
|
106
|
+
}
|
|
48
107
|
async openReporter(data) {
|
|
49
|
-
if (data.extensionId && ( this.extensionIdentifierSet.has(data.extensionId))) {
|
|
108
|
+
if (data.extensionId && ( (this.extensionIdentifierSet.has(data.extensionId)))) {
|
|
50
109
|
const replyChannel = `vscode:triggerReporterMenuResponse`;
|
|
51
110
|
mainWindow.postMessage({ data, replyChannel }, '*');
|
|
52
|
-
this.extensionIdentifierSet.delete(( new ExtensionIdentifier(data.extensionId)));
|
|
111
|
+
this.extensionIdentifierSet.delete(( (new ExtensionIdentifier(data.extensionId))));
|
|
53
112
|
}
|
|
54
113
|
if (this.issueReporterWindow) {
|
|
55
114
|
const getModelData = await this.getIssueData();
|
|
@@ -69,8 +128,8 @@ let IssueFormService = class IssueFormService {
|
|
|
69
128
|
this.openAuxIssueReporter(data);
|
|
70
129
|
}
|
|
71
130
|
async openAuxIssueReporter(data) {
|
|
72
|
-
const disposables = ( new DisposableStore());
|
|
73
|
-
const auxiliaryWindow = disposables.add(await this.auxiliaryWindowService.open({ mode: AuxiliaryWindowMode.Normal }));
|
|
131
|
+
const disposables = ( (new DisposableStore()));
|
|
132
|
+
const auxiliaryWindow = disposables.add(await this.auxiliaryWindowService.open({ mode: AuxiliaryWindowMode.Normal, bounds: { width: 700, height: 800 } }));
|
|
74
133
|
this.issueReporterWindow = auxiliaryWindow.window;
|
|
75
134
|
if (auxiliaryWindow) {
|
|
76
135
|
await auxiliaryWindow.whenStylesHaveLoaded;
|
|
@@ -92,49 +151,13 @@ let IssueFormService = class IssueFormService {
|
|
|
92
151
|
this.issueReporterWindow = null;
|
|
93
152
|
});
|
|
94
153
|
}
|
|
95
|
-
async
|
|
96
|
-
throw ( new Error('Method not implemented.'));
|
|
97
|
-
}
|
|
98
|
-
stopTracing() {
|
|
99
|
-
throw ( new Error('Method not implemented.'));
|
|
100
|
-
}
|
|
101
|
-
getSystemStatus() {
|
|
102
|
-
throw ( new Error('Method not implemented.'));
|
|
103
|
-
}
|
|
104
|
-
$getSystemInfo() {
|
|
105
|
-
throw ( new Error('Method not implemented.'));
|
|
106
|
-
}
|
|
107
|
-
$getPerformanceInfo() {
|
|
108
|
-
throw ( new Error('Method not implemented.'));
|
|
109
|
-
}
|
|
110
|
-
$reloadWithExtensionsDisabled() {
|
|
111
|
-
throw ( new Error('Method not implemented.'));
|
|
112
|
-
}
|
|
113
|
-
$showConfirmCloseDialog() {
|
|
114
|
-
throw ( new Error('Method not implemented.'));
|
|
115
|
-
}
|
|
116
|
-
$showClipboardDialog() {
|
|
117
|
-
throw ( new Error('Method not implemented.'));
|
|
118
|
-
}
|
|
119
|
-
$getIssueReporterUri(extensionId) {
|
|
120
|
-
throw ( new Error('Method not implemented.'));
|
|
121
|
-
}
|
|
122
|
-
$getIssueReporterData(extensionId) {
|
|
123
|
-
throw ( new Error('Method not implemented.'));
|
|
124
|
-
}
|
|
125
|
-
$getIssueReporterTemplate(extensionId) {
|
|
126
|
-
throw ( new Error('Method not implemented.'));
|
|
127
|
-
}
|
|
128
|
-
$getReporterStatus(extensionId, extensionName) {
|
|
129
|
-
throw ( new Error('Method not implemented.'));
|
|
130
|
-
}
|
|
131
|
-
async $sendReporterMenu(extensionId, extensionName) {
|
|
154
|
+
async sendReporterMenu(extensionId, extensionName) {
|
|
132
155
|
const sendChannel = `vscode:triggerReporterMenu`;
|
|
133
156
|
mainWindow.postMessage({ sendChannel, extensionId, extensionName }, '*');
|
|
134
|
-
const result = await ( new Promise((resolve, reject) => {
|
|
157
|
+
const result = await ( (new Promise((resolve, reject) => {
|
|
135
158
|
const timeout = setTimeout(() => {
|
|
136
159
|
mainWindow.removeEventListener('message', listener);
|
|
137
|
-
reject(( new Error('Timeout exceeded')));
|
|
160
|
+
reject(( (new Error('Timeout exceeded'))));
|
|
138
161
|
}, 5000);
|
|
139
162
|
const listener = (event) => {
|
|
140
163
|
const replyChannel = `vscode:triggerReporterMenuResponse`;
|
|
@@ -145,16 +168,16 @@ let IssueFormService = class IssueFormService {
|
|
|
145
168
|
}
|
|
146
169
|
};
|
|
147
170
|
mainWindow.addEventListener('message', listener);
|
|
148
|
-
}));
|
|
171
|
+
})));
|
|
149
172
|
return result;
|
|
150
173
|
}
|
|
151
174
|
async getIssueData() {
|
|
152
175
|
const sendChannel = `vscode:triggerIssueData`;
|
|
153
176
|
mainWindow.postMessage({ sendChannel }, '*');
|
|
154
|
-
const result = await ( new Promise((resolve, reject) => {
|
|
177
|
+
const result = await ( (new Promise((resolve, reject) => {
|
|
155
178
|
const timeout = setTimeout(() => {
|
|
156
179
|
mainWindow.removeEventListener('message', listener);
|
|
157
|
-
reject(( new Error('Timeout exceeded')));
|
|
180
|
+
reject(( (new Error('Timeout exceeded'))));
|
|
158
181
|
}, 5000);
|
|
159
182
|
const listener = (event) => {
|
|
160
183
|
const replyChannel = `vscode:triggerIssueDataResponse`;
|
|
@@ -165,18 +188,21 @@ let IssueFormService = class IssueFormService {
|
|
|
165
188
|
}
|
|
166
189
|
};
|
|
167
190
|
mainWindow.addEventListener('message', listener);
|
|
168
|
-
}));
|
|
191
|
+
})));
|
|
169
192
|
return result;
|
|
170
193
|
}
|
|
171
|
-
async
|
|
194
|
+
async closeReporter() {
|
|
172
195
|
this.issueReporterWindow?.close();
|
|
173
196
|
}
|
|
174
197
|
};
|
|
175
|
-
IssueFormService = ( __decorate([
|
|
176
|
-
( __param(0, IInstantiationService)),
|
|
177
|
-
( __param(1, IAuxiliaryWindowService)),
|
|
178
|
-
( __param(2, IMenuService)),
|
|
179
|
-
( __param(3, IContextKeyService))
|
|
180
|
-
|
|
198
|
+
IssueFormService = ( (__decorate([
|
|
199
|
+
( (__param(0, IInstantiationService))),
|
|
200
|
+
( (__param(1, IAuxiliaryWindowService))),
|
|
201
|
+
( (__param(2, IMenuService))),
|
|
202
|
+
( (__param(3, IContextKeyService))),
|
|
203
|
+
( (__param(4, ILogService))),
|
|
204
|
+
( (__param(5, IDialogService))),
|
|
205
|
+
( (__param(6, IHostService)))
|
|
206
|
+
], IssueFormService)));
|
|
181
207
|
|
|
182
208
|
export { IssueFormService };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
2
2
|
import { isRemoteDiagnosticError } from 'vscode/vscode/vs/platform/diagnostics/common/diagnostics';
|
|
3
|
-
import { IssueType } from '
|
|
3
|
+
import { IssueType } from '../common/issue.js';
|
|
4
4
|
|
|
5
5
|
class IssueReporterModel {
|
|
6
6
|
constructor(initialData) {
|
|
@@ -1,61 +1,56 @@
|
|
|
1
1
|
import { escape } from 'vscode/vscode/vs/base/common/strings';
|
|
2
|
-
import {
|
|
2
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
_moduleId,
|
|
13
|
-
6,
|
|
4
|
+
const sendSystemInfoLabel = escape(( localize(5670, "Include my system information")));
|
|
5
|
+
const sendProcessInfoLabel = escape(( localize(5671, "Include my currently running processes")));
|
|
6
|
+
const sendWorkspaceInfoLabel = escape(( localize(5672, "Include my workspace metadata")));
|
|
7
|
+
const sendExtensionsLabel = escape(( localize(5673, "Include my enabled extensions")));
|
|
8
|
+
const sendExperimentsLabel = escape(( localize(5674, "Include A/B experiment info")));
|
|
9
|
+
const sendExtensionData = escape(( localize(5675, "Include additional extension info")));
|
|
10
|
+
const reviewGuidanceLabel = ( localize(
|
|
11
|
+
5676,
|
|
14
12
|
'Before you report an issue here please <a href="https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions" target="_blank">review the guidance we provide</a>.'
|
|
15
13
|
));
|
|
16
14
|
var BaseHtml = () => `
|
|
17
15
|
<div class="issue-reporter" id="issue-reporter">
|
|
18
|
-
<div id="english" class="input-group hidden">${escape((
|
|
16
|
+
<div id="english" class="input-group hidden">${escape(( localize(5677, "Please complete the form in English.")))}</div>
|
|
19
17
|
|
|
20
18
|
<div id="review-guidance-help-text" class="input-group">${reviewGuidanceLabel}</div>
|
|
21
19
|
|
|
22
20
|
<div class="section">
|
|
23
21
|
<div class="input-group">
|
|
24
|
-
<label class="inline-label" for="issue-type">${escape((
|
|
22
|
+
<label class="inline-label" for="issue-type">${escape(( localize(5678, "This is a")))}</label>
|
|
25
23
|
<select id="issue-type" class="inline-form-control">
|
|
26
24
|
<!-- To be dynamically filled -->
|
|
27
25
|
</select>
|
|
28
26
|
</div>
|
|
29
27
|
|
|
30
28
|
<div class="input-group" id="problem-source">
|
|
31
|
-
<label class="inline-label" for="issue-source">${escape((
|
|
29
|
+
<label class="inline-label" for="issue-source">${escape(( localize(5679, "For")))} <span class="required-input">*</span></label>
|
|
32
30
|
<select id="issue-source" class="inline-form-control" required>
|
|
33
31
|
<!-- To be dynamically filled -->
|
|
34
32
|
</select>
|
|
35
|
-
<div id="issue-source-empty-error" class="validation-error hidden" role="alert">${escape((
|
|
36
|
-
<div id="problem-source-help-text" class="instructions hidden">${escape((
|
|
37
|
-
|
|
38
|
-
11,
|
|
33
|
+
<div id="issue-source-empty-error" class="validation-error hidden" role="alert">${escape(( localize(5680, "An issue source is required.")))}</div>
|
|
34
|
+
<div id="problem-source-help-text" class="instructions hidden">${escape(( localize(
|
|
35
|
+
5681,
|
|
39
36
|
"Try to reproduce the problem after {0}. If the problem only reproduces when extensions are active, it is likely an issue with an extension."
|
|
40
37
|
)))
|
|
41
|
-
.replace('{0}', () => `<span tabIndex=0 role="button" id="disableExtensions" class="workbenchCommand">${escape((
|
|
38
|
+
.replace('{0}', () => `<span tabIndex=0 role="button" id="disableExtensions" class="workbenchCommand">${escape(( localize(5682, "disabling all extensions and reloading the window")))}</span>`)}
|
|
42
39
|
</div>
|
|
43
40
|
|
|
44
41
|
<div id="extension-selection">
|
|
45
|
-
<label class="inline-label" for="extension-selector">${escape((
|
|
42
|
+
<label class="inline-label" for="extension-selector">${escape(( localize(5683, "Extension")))} <span class="required-input">*</span></label>
|
|
46
43
|
<select id="extension-selector" class="inline-form-control">
|
|
47
44
|
<!-- To be dynamically filled -->
|
|
48
45
|
</select>
|
|
49
|
-
<div id="extension-selection-validation-error" class="validation-error hidden" role="alert">${escape((
|
|
50
|
-
|
|
51
|
-
14,
|
|
46
|
+
<div id="extension-selection-validation-error" class="validation-error hidden" role="alert">${escape(( localize(
|
|
47
|
+
5684,
|
|
52
48
|
"The issue reporter is unable to create issues for this extension. Please visit {0} to report an issue."
|
|
53
49
|
)))
|
|
54
50
|
.replace('{0}', () => `<span tabIndex=0 role="button" id="extensionBugsLink" class="workbenchCommand"><!-- To be dynamically filled --></span>`)}</div>
|
|
55
51
|
<div id="extension-selection-validation-error-no-url" class="validation-error hidden" role="alert">
|
|
56
|
-
${escape((
|
|
57
|
-
|
|
58
|
-
15,
|
|
52
|
+
${escape(( localize(
|
|
53
|
+
5685,
|
|
59
54
|
"The issue reporter is unable to create issues for this extension, as it does not specify a URL for reporting issues. Please check the marketplace page of this extension to see if other instructions are available."
|
|
60
55
|
)))}
|
|
61
56
|
</div>
|
|
@@ -63,10 +58,10 @@ var BaseHtml = () => `
|
|
|
63
58
|
</div>
|
|
64
59
|
|
|
65
60
|
<div id="issue-title-container" class="input-group">
|
|
66
|
-
<label class="inline-label" for="issue-title">${escape((
|
|
67
|
-
<input id="issue-title" type="text" class="inline-form-control" placeholder="${escape((
|
|
68
|
-
<div id="issue-title-empty-error" class="validation-error hidden" role="alert">${escape((
|
|
69
|
-
<div id="issue-title-length-validation-error" class="validation-error hidden" role="alert">${escape((
|
|
61
|
+
<label class="inline-label" for="issue-title">${escape(( localize(5686, "Title")))} <span class="required-input">*</span></label>
|
|
62
|
+
<input id="issue-title" type="text" class="inline-form-control" placeholder="${escape(( localize(5687, "Please enter a title.")))}" required>
|
|
63
|
+
<div id="issue-title-empty-error" class="validation-error hidden" role="alert">${escape(( localize(5688, "A title is required.")))}</div>
|
|
64
|
+
<div id="issue-title-length-validation-error" class="validation-error hidden" role="alert">${escape(( localize(5689, "The title is too long.")))}</div>
|
|
70
65
|
<small id="similar-issues">
|
|
71
66
|
<!-- To be dynamically filled -->
|
|
72
67
|
</small>
|
|
@@ -82,10 +77,10 @@ var BaseHtml = () => `
|
|
|
82
77
|
<!-- To be dynamically filled -->
|
|
83
78
|
</div>
|
|
84
79
|
<div class="block-info-text">
|
|
85
|
-
<textarea name="description" id="description" placeholder="${escape((
|
|
80
|
+
<textarea name="description" id="description" placeholder="${escape(( localize(5690, "Please enter details.")))}" required></textarea>
|
|
86
81
|
</div>
|
|
87
|
-
<div id="description-empty-error" class="validation-error hidden" role="alert">${escape((
|
|
88
|
-
<div id="description-short-error" class="validation-error hidden" role="alert">${escape((
|
|
82
|
+
<div id="description-empty-error" class="validation-error hidden" role="alert">${escape(( localize(5691, "A description is required.")))}</div>
|
|
83
|
+
<div id="description-short-error" class="validation-error hidden" role="alert">${escape(( localize(5692, "Please provide a longer description.")))}</div>
|
|
89
84
|
</div>
|
|
90
85
|
|
|
91
86
|
<div class="system-info" id="block-container">
|
|
@@ -94,9 +89,9 @@ var BaseHtml = () => `
|
|
|
94
89
|
<label class="extension-caption" id="extension-caption" for="includeExtensionData">
|
|
95
90
|
${sendExtensionData}
|
|
96
91
|
<span id="ext-loading" hidden></span>
|
|
97
|
-
<span class="ext-parens" hidden>(</span><a href="#" class="showInfo" id="extension-id">${escape((
|
|
92
|
+
<span class="ext-parens" hidden>(</span><a href="#" class="showInfo" id="extension-id">${escape(( localize(5693, "show")))}</a><span class="ext-parens" hidden>)</span>
|
|
98
93
|
</label>
|
|
99
|
-
<pre class="block-info" id="extension-data" placeholder="${escape((
|
|
94
|
+
<pre class="block-info" id="extension-data" placeholder="${escape(( localize(5694, "Extension does not have additional data to include.")))}" style="white-space: pre-wrap;">
|
|
100
95
|
<!-- To be dynamically filled -->
|
|
101
96
|
</pre>
|
|
102
97
|
</div>
|
|
@@ -105,7 +100,7 @@ var BaseHtml = () => `
|
|
|
105
100
|
<input class="sendData" aria-label="${sendSystemInfoLabel}" type="checkbox" id="includeSystemInfo" checked/>
|
|
106
101
|
<label class="caption" for="includeSystemInfo">
|
|
107
102
|
${sendSystemInfoLabel}
|
|
108
|
-
(<a href="#" class="showInfo">${escape((
|
|
103
|
+
(<a href="#" class="showInfo">${escape(( localize(5694, "show")))}</a>)
|
|
109
104
|
</label>
|
|
110
105
|
<div class="block-info hidden">
|
|
111
106
|
<!-- To be dynamically filled -->
|
|
@@ -115,7 +110,7 @@ var BaseHtml = () => `
|
|
|
115
110
|
<input class="sendData" aria-label="${sendProcessInfoLabel}" type="checkbox" id="includeProcessInfo" checked/>
|
|
116
111
|
<label class="caption" for="includeProcessInfo">
|
|
117
112
|
${sendProcessInfoLabel}
|
|
118
|
-
(<a href="#" class="showInfo">${escape((
|
|
113
|
+
(<a href="#" class="showInfo">${escape(( localize(5694, "show")))}</a>)
|
|
119
114
|
</label>
|
|
120
115
|
<pre class="block-info hidden">
|
|
121
116
|
<code>
|
|
@@ -127,7 +122,7 @@ var BaseHtml = () => `
|
|
|
127
122
|
<input class="sendData" aria-label="${sendWorkspaceInfoLabel}" type="checkbox" id="includeWorkspaceInfo" checked/>
|
|
128
123
|
<label class="caption" for="includeWorkspaceInfo">
|
|
129
124
|
${sendWorkspaceInfoLabel}
|
|
130
|
-
(<a href="#" class="showInfo">${escape((
|
|
125
|
+
(<a href="#" class="showInfo">${escape(( localize(5694, "show")))}</a>)
|
|
131
126
|
</label>
|
|
132
127
|
<pre id="systemInfo" class="block-info hidden">
|
|
133
128
|
<code>
|
|
@@ -139,7 +134,7 @@ var BaseHtml = () => `
|
|
|
139
134
|
<input class="sendData" aria-label="${sendExtensionsLabel}" type="checkbox" id="includeExtensions" checked/>
|
|
140
135
|
<label class="caption" for="includeExtensions">
|
|
141
136
|
${sendExtensionsLabel}
|
|
142
|
-
(<a href="#" class="showInfo">${escape((
|
|
137
|
+
(<a href="#" class="showInfo">${escape(( localize(5694, "show")))}</a>)
|
|
143
138
|
</label>
|
|
144
139
|
<div id="systemInfo" class="block-info hidden">
|
|
145
140
|
<!-- To be dynamically filled -->
|
|
@@ -149,7 +144,7 @@ var BaseHtml = () => `
|
|
|
149
144
|
<input class="sendData" aria-label="${sendExperimentsLabel}" type="checkbox" id="includeExperiments" checked/>
|
|
150
145
|
<label class="caption" for="includeExperiments">
|
|
151
146
|
${sendExperimentsLabel}
|
|
152
|
-
(<a href="#" class="showInfo">${escape((
|
|
147
|
+
(<a href="#" class="showInfo">${escape(( localize(5694, "show")))}</a>)
|
|
153
148
|
</label>
|
|
154
149
|
<pre class="block-info hidden">
|
|
155
150
|
<!-- To be dynamically filled -->
|
|
@@ -4,14 +4,13 @@ import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
|
4
4
|
import { groupBy } from 'vscode/vscode/vs/base/common/collections';
|
|
5
5
|
import { isMacintosh } from 'vscode/vscode/vs/base/common/platform';
|
|
6
6
|
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
7
|
-
import {
|
|
8
|
-
import { IIssueMainService } from 'vscode/vscode/vs/platform/issue/common/issue.service';
|
|
7
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
9
8
|
import { BaseIssueReporterService } from './issue.js';
|
|
9
|
+
import { IIssueFormService } from 'vscode/vscode/vs/workbench/contrib/issue/common/issue.service';
|
|
10
10
|
|
|
11
|
-
const _moduleId = "vs/workbench/contrib/issue/browser/issueReporterService";
|
|
12
11
|
let IssueWebReporter = class IssueWebReporter extends BaseIssueReporterService {
|
|
13
|
-
constructor(disableExtensions, data, os, product, window,
|
|
14
|
-
super(disableExtensions, data, os, product, window, true,
|
|
12
|
+
constructor(disableExtensions, data, os, product, window, issueFormService) {
|
|
13
|
+
super(disableExtensions, data, os, product, window, true, issueFormService);
|
|
15
14
|
const target = this.window.document.querySelector('.block-system .block-info');
|
|
16
15
|
const webInfo = this.window.navigator.userAgent;
|
|
17
16
|
if (webInfo) {
|
|
@@ -37,7 +36,7 @@ let IssueWebReporter = class IssueWebReporter extends BaseIssueReporterService {
|
|
|
37
36
|
}
|
|
38
37
|
async sendReporterMenu(extension) {
|
|
39
38
|
try {
|
|
40
|
-
const data = await this.
|
|
39
|
+
const data = await this.issueFormService.sendReporterMenu(extension.id, extension.name);
|
|
41
40
|
return data;
|
|
42
41
|
}
|
|
43
42
|
catch (e) {
|
|
@@ -52,7 +51,7 @@ let IssueWebReporter = class IssueWebReporter extends BaseIssueReporterService {
|
|
|
52
51
|
this.issueReporterModel.update({ issueType: issueType });
|
|
53
52
|
const descriptionTextArea = this.getElementById('issue-title');
|
|
54
53
|
if (descriptionTextArea) {
|
|
55
|
-
descriptionTextArea.placeholder = (
|
|
54
|
+
descriptionTextArea.placeholder = ( localize(5695, "Please enter a title"));
|
|
56
55
|
}
|
|
57
56
|
this.updatePreviewButtonState();
|
|
58
57
|
this.setSourceOptions();
|
|
@@ -64,7 +63,7 @@ let IssueWebReporter = class IssueWebReporter extends BaseIssueReporterService {
|
|
|
64
63
|
});
|
|
65
64
|
});
|
|
66
65
|
this.addEventListener('disableExtensions', 'click', () => {
|
|
67
|
-
this.
|
|
66
|
+
this.issueFormService.reloadWithExtensionsDisabled();
|
|
68
67
|
});
|
|
69
68
|
this.addEventListener('extensionBugsLink', 'click', (e) => {
|
|
70
69
|
const url = e.target.innerText;
|
|
@@ -73,7 +72,7 @@ let IssueWebReporter = class IssueWebReporter extends BaseIssueReporterService {
|
|
|
73
72
|
this.addEventListener('disableExtensions', 'keydown', (e) => {
|
|
74
73
|
e.stopPropagation();
|
|
75
74
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
76
|
-
this.
|
|
75
|
+
this.issueFormService.reloadWithExtensionsDisabled();
|
|
77
76
|
}
|
|
78
77
|
});
|
|
79
78
|
this.window.document.onkeydown = async (e) => {
|
|
@@ -91,7 +90,7 @@ let IssueWebReporter = class IssueWebReporter extends BaseIssueReporterService {
|
|
|
91
90
|
const issueTitle = this.getElementById('issue-title').value;
|
|
92
91
|
const { issueDescription } = this.issueReporterModel.getData();
|
|
93
92
|
if (!this.hasBeenSubmitted && (issueTitle || issueDescription)) {
|
|
94
|
-
this.
|
|
93
|
+
this.issueFormService.showConfirmCloseDialog();
|
|
95
94
|
}
|
|
96
95
|
else {
|
|
97
96
|
this.close();
|
|
@@ -134,7 +133,7 @@ let IssueWebReporter = class IssueWebReporter extends BaseIssueReporterService {
|
|
|
134
133
|
const extensionsSelector = this.getElementById('extension-selector');
|
|
135
134
|
if (extensionsSelector) {
|
|
136
135
|
const { selectedExtension } = this.issueReporterModel.getData();
|
|
137
|
-
reset(extensionsSelector, this.makeOption('', (
|
|
136
|
+
reset(extensionsSelector, this.makeOption('', ( localize(5696, "Select extension")), true), ...( (extensionOptions.map(extension => makeOption(extension, selectedExtension)))));
|
|
138
137
|
if (!selectedExtension) {
|
|
139
138
|
extensionsSelector.selectedIndex = 0;
|
|
140
139
|
}
|
|
@@ -188,7 +187,7 @@ let IssueWebReporter = class IssueWebReporter extends BaseIssueReporterService {
|
|
|
188
187
|
}
|
|
189
188
|
};
|
|
190
189
|
IssueWebReporter = ( (__decorate([
|
|
191
|
-
( (__param(5,
|
|
190
|
+
( (__param(5, IIssueFormService)))
|
|
192
191
|
], IssueWebReporter)));
|
|
193
192
|
|
|
194
193
|
export { IssueWebReporter };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import { windowOpenNoOpener } from 'vscode/vscode/vs/base/browser/dom';
|
|
3
|
-
import { userAgent } from 'vscode/vscode/vs/base/common/platform';
|
|
4
|
-
import { ExtensionType } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
5
|
-
import { normalizeGitHubUrl } from '../../../../platform/issue/common/issueReporterUtil.js';
|
|
6
2
|
import { getZoomLevel } from 'vscode/vscode/vs/base/browser/browser';
|
|
3
|
+
import { windowOpenNoOpener } from 'vscode/vscode/vs/base/browser/dom';
|
|
7
4
|
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
5
|
+
import { userAgent } from 'vscode/vscode/vs/base/common/platform';
|
|
8
6
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
7
|
import { IExtensionManagementService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
8
|
+
import { ExtensionType } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
10
9
|
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
11
|
-
import {
|
|
10
|
+
import { normalizeGitHubUrl } from '../../../../platform/issue/common/issueReporterUtil.js';
|
|
12
11
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
13
12
|
import 'vscode/vscode/vs/platform/theme/common/colorUtils';
|
|
14
13
|
import { foreground, textLinkForeground, textLinkActiveForeground } from 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
|
|
@@ -24,18 +23,18 @@ import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
|
24
23
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
25
24
|
import { IWorkspaceTrustManagementService } from 'vscode/vscode/vs/platform/workspace/common/workspaceTrust.service';
|
|
26
25
|
import { SIDE_BAR_BACKGROUND } from 'vscode/vscode/vs/workbench/common/theme';
|
|
26
|
+
import { IIssueFormService } from 'vscode/vscode/vs/workbench/contrib/issue/common/issue.service';
|
|
27
27
|
import { IWorkbenchAssignmentService } from 'vscode/vscode/vs/workbench/services/assignment/common/assignmentService.service';
|
|
28
28
|
import { IAuthenticationService } from 'vscode/vscode/vs/workbench/services/authentication/common/authentication.service';
|
|
29
29
|
import { IWorkbenchExtensionEnablementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
|
|
30
|
-
import { IIntegrityService } from 'vscode/vscode/vs/workbench/services/integrity/common/integrity.service';
|
|
31
|
-
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
32
30
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
31
|
+
import { IIntegrityService } from 'vscode/vscode/vs/workbench/services/integrity/common/integrity.service';
|
|
33
32
|
|
|
34
33
|
let BrowserIssueService = class BrowserIssueService {
|
|
35
|
-
constructor(extensionService, productService,
|
|
34
|
+
constructor(extensionService, productService, issueFormService, themeService, experimentService, workspaceTrustManagementService, integrityService, extensionManagementService, extensionEnablementService, authenticationService, configurationService) {
|
|
36
35
|
this.extensionService = extensionService;
|
|
37
36
|
this.productService = productService;
|
|
38
|
-
this.
|
|
37
|
+
this.issueFormService = issueFormService;
|
|
39
38
|
this.themeService = themeService;
|
|
40
39
|
this.experimentService = experimentService;
|
|
41
40
|
this.workspaceTrustManagementService = workspaceTrustManagementService;
|
|
@@ -132,7 +131,7 @@ let BrowserIssueService = class BrowserIssueService {
|
|
|
132
131
|
isUnsupported,
|
|
133
132
|
githubAccessToken
|
|
134
133
|
}, options);
|
|
135
|
-
return this.
|
|
134
|
+
return this.issueFormService.openReporter(issueReporterData);
|
|
136
135
|
}
|
|
137
136
|
throw ( new Error(`No issue reporting URL configured for ${this.productService.nameLong}.`));
|
|
138
137
|
}
|
|
@@ -166,7 +165,7 @@ ${extension?.version ? `\nExtension version: ${extension.version}` : ''}
|
|
|
166
165
|
BrowserIssueService = ( __decorate([
|
|
167
166
|
( __param(0, IExtensionService)),
|
|
168
167
|
( __param(1, IProductService)),
|
|
169
|
-
( __param(2,
|
|
168
|
+
( __param(2, IIssueFormService)),
|
|
170
169
|
( __param(3, IThemeService)),
|
|
171
170
|
( __param(4, IWorkbenchAssignmentService)),
|
|
172
171
|
( __param(5, IWorkspaceTrustManagementService)),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localize, localize2 } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { IExtensionManagementService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
4
4
|
import { ExtensionType } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
5
5
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
@@ -31,7 +31,6 @@ import { ITroubleshootIssueService } from 'vscode/vscode/vs/workbench/contrib/is
|
|
|
31
31
|
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
32
32
|
|
|
33
33
|
var TroubleshootIssueService_1, IssueTroubleshootUi_1;
|
|
34
|
-
const _moduleId = "vs/workbench/contrib/issue/browser/issueTroubleshoot";
|
|
35
34
|
var TroubleshootStage;
|
|
36
35
|
( ((function(TroubleshootStage) {
|
|
37
36
|
TroubleshootStage[TroubleshootStage["EXTENSIONS"] = 1] = "EXTENSIONS";
|
|
@@ -87,14 +86,13 @@ let TroubleshootIssueService = class TroubleshootIssueService extends Disposable
|
|
|
87
86
|
throw ( (new Error('invalid state')));
|
|
88
87
|
}
|
|
89
88
|
const res = await this.dialogService.confirm({
|
|
90
|
-
message: (
|
|
91
|
-
detail: (
|
|
92
|
-
|
|
93
|
-
1,
|
|
89
|
+
message: ( localize(1960, "Troubleshoot Issue")),
|
|
90
|
+
detail: ( localize(
|
|
91
|
+
1961,
|
|
94
92
|
"Issue troubleshooting is a process to help you identify the cause for an issue. The cause for an issue can be a misconfiguration, due to an extension, or be {0} itself.\n\nDuring the process the window reloads repeatedly. Each time you must confirm if you are still seeing the issue.",
|
|
95
93
|
this.productService.nameLong
|
|
96
94
|
)),
|
|
97
|
-
primaryButton: (
|
|
95
|
+
primaryButton: ( localize(1962, "&&Troubleshoot Issue")),
|
|
98
96
|
custom: true
|
|
99
97
|
});
|
|
100
98
|
if (!res.confirmed) {
|
|
@@ -137,9 +135,8 @@ let TroubleshootIssueService = class TroubleshootIssueService extends Disposable
|
|
|
137
135
|
this.state = ( (new TroubleShootState(TroubleshootStage.WORKBENCH, this.state.profile)));
|
|
138
136
|
return;
|
|
139
137
|
}
|
|
140
|
-
const result = await this.askToReproduceIssue((
|
|
141
|
-
|
|
142
|
-
3,
|
|
138
|
+
const result = await this.askToReproduceIssue(( localize(
|
|
139
|
+
1963,
|
|
143
140
|
"Issue troubleshooting is active and has temporarily disabled all installed extensions. Check if you can still reproduce the problem and proceed by selecting from these options."
|
|
144
141
|
)));
|
|
145
142
|
if (result === 'good') {
|
|
@@ -156,25 +153,22 @@ let TroubleshootIssueService = class TroubleshootIssueService extends Disposable
|
|
|
156
153
|
async reproduceIssueWithEmptyProfile() {
|
|
157
154
|
await this.userDataProfileManagementService.createAndEnterTransientProfile();
|
|
158
155
|
this.updateState(this.state);
|
|
159
|
-
const result = await this.askToReproduceIssue((
|
|
160
|
-
|
|
161
|
-
4,
|
|
156
|
+
const result = await this.askToReproduceIssue(( localize(
|
|
157
|
+
1964,
|
|
162
158
|
"Issue troubleshooting is active and has temporarily reset your configurations to defaults. Check if you can still reproduce the problem and proceed by selecting from these options."
|
|
163
159
|
)));
|
|
164
160
|
if (result === 'stop') {
|
|
165
161
|
await this.stop();
|
|
166
162
|
}
|
|
167
163
|
if (result === 'good') {
|
|
168
|
-
await this.askToReportIssue((
|
|
169
|
-
|
|
170
|
-
5,
|
|
164
|
+
await this.askToReportIssue(( localize(
|
|
165
|
+
1965,
|
|
171
166
|
"Issue troubleshooting has identified that the issue is caused by your configurations. Please report the issue by exporting your configurations using \"Export Profile\" command and share the file in the issue report."
|
|
172
167
|
)));
|
|
173
168
|
}
|
|
174
169
|
if (result === 'bad') {
|
|
175
|
-
await this.askToReportIssue((
|
|
176
|
-
|
|
177
|
-
6,
|
|
170
|
+
await this.askToReportIssue(( localize(
|
|
171
|
+
1966,
|
|
178
172
|
"Issue troubleshooting has identified that the issue is with {0}.",
|
|
179
173
|
this.productService.nameLong
|
|
180
174
|
)));
|
|
@@ -190,15 +184,15 @@ let TroubleshootIssueService = class TroubleshootIssueService extends Disposable
|
|
|
190
184
|
return (
|
|
191
185
|
(new Promise((c, e) => {
|
|
192
186
|
const goodPrompt = {
|
|
193
|
-
label: (
|
|
187
|
+
label: ( localize(1967, "I Can't Reproduce")),
|
|
194
188
|
run: () => c('good')
|
|
195
189
|
};
|
|
196
190
|
const badPrompt = {
|
|
197
|
-
label: (
|
|
191
|
+
label: ( localize(1968, "I Can Reproduce")),
|
|
198
192
|
run: () => c('bad')
|
|
199
193
|
};
|
|
200
194
|
const stop = {
|
|
201
|
-
label: (
|
|
195
|
+
label: ( localize(1969, "Stop")),
|
|
202
196
|
run: () => c('stop')
|
|
203
197
|
};
|
|
204
198
|
this.notificationHandle = this.notificationService.prompt(Severity$1.Info, message, [goodPrompt, badPrompt, stop], { sticky: true, priority: NotificationPriority.URGENT });
|
|
@@ -212,10 +206,9 @@ let TroubleshootIssueService = class TroubleshootIssueService extends Disposable
|
|
|
212
206
|
if (res === 'good') {
|
|
213
207
|
await this.dialogService.prompt({
|
|
214
208
|
type: Severity$1.Info,
|
|
215
|
-
message: (
|
|
216
|
-
detail: (
|
|
217
|
-
|
|
218
|
-
10,
|
|
209
|
+
message: ( localize(1969, "Troubleshoot Issue")),
|
|
210
|
+
detail: ( localize(
|
|
211
|
+
1970,
|
|
219
212
|
"This likely means that the issue has been addressed already and will be available in an upcoming release. You can safely use {0} insiders until the new stable version is available.",
|
|
220
213
|
this.productService.nameLong
|
|
221
214
|
)),
|
|
@@ -238,12 +231,11 @@ let TroubleshootIssueService = class TroubleshootIssueService extends Disposable
|
|
|
238
231
|
async askToReproduceIssueWithInsiders() {
|
|
239
232
|
const confirmRes = await this.dialogService.confirm({
|
|
240
233
|
type: 'info',
|
|
241
|
-
message: (
|
|
242
|
-
primaryButton: (
|
|
243
|
-
cancelButton: (
|
|
244
|
-
detail: (
|
|
245
|
-
|
|
246
|
-
13,
|
|
234
|
+
message: ( localize(1970, "Troubleshoot Issue")),
|
|
235
|
+
primaryButton: ( localize(1971, "Download {0} Insiders", this.productService.nameLong)),
|
|
236
|
+
cancelButton: ( localize(1972, "Report Issue Anyway")),
|
|
237
|
+
detail: ( localize(
|
|
238
|
+
1973,
|
|
247
239
|
"Please try to download and reproduce the issue in {0} insiders.",
|
|
248
240
|
this.productService.nameLong
|
|
249
241
|
)),
|
|
@@ -260,21 +252,20 @@ let TroubleshootIssueService = class TroubleshootIssueService extends Disposable
|
|
|
260
252
|
}
|
|
261
253
|
const res = await this.dialogService.prompt({
|
|
262
254
|
type: 'info',
|
|
263
|
-
message: (
|
|
255
|
+
message: ( localize(1973, "Troubleshoot Issue")),
|
|
264
256
|
buttons: [{
|
|
265
|
-
label: (
|
|
257
|
+
label: ( localize(1974, "I can't reproduce")),
|
|
266
258
|
run: () => 'good'
|
|
267
259
|
}, {
|
|
268
|
-
label: (
|
|
260
|
+
label: ( localize(1975, "I can reproduce")),
|
|
269
261
|
run: () => 'bad'
|
|
270
262
|
}],
|
|
271
263
|
cancelButton: {
|
|
272
|
-
label: (
|
|
264
|
+
label: ( localize(1976, "Stop")),
|
|
273
265
|
run: () => 'stop'
|
|
274
266
|
},
|
|
275
|
-
detail: (
|
|
276
|
-
|
|
277
|
-
17,
|
|
267
|
+
detail: ( localize(
|
|
268
|
+
1977,
|
|
278
269
|
"Please try to reproduce the issue in {0} insiders and confirm if the issue exists there.",
|
|
279
270
|
this.productService.nameLong
|
|
280
271
|
)),
|
|
@@ -349,7 +340,7 @@ registerAction2(class TroubleshootIssueAction extends Action2 {
|
|
|
349
340
|
constructor() {
|
|
350
341
|
super({
|
|
351
342
|
id: 'workbench.action.troubleshootIssue.start',
|
|
352
|
-
title: (
|
|
343
|
+
title: ( localize2(1978, 'Troubleshoot Issue...')),
|
|
353
344
|
category: Categories.Help,
|
|
354
345
|
f1: true,
|
|
355
346
|
precondition: ( (ContextKeyExpr.and(
|
|
@@ -367,7 +358,7 @@ registerAction2(class extends Action2 {
|
|
|
367
358
|
constructor() {
|
|
368
359
|
super({
|
|
369
360
|
id: 'workbench.action.troubleshootIssue.stop',
|
|
370
|
-
title: (
|
|
361
|
+
title: ( localize2(1979, 'Stop Troubleshoot Issue')),
|
|
371
362
|
category: Categories.Help,
|
|
372
363
|
f1: true,
|
|
373
364
|
precondition: IssueTroubleshootUi.ctxIsTroubleshootActive
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localize2, localize } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
4
4
|
import { MenuRegistry, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
5
5
|
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
@@ -8,7 +8,6 @@ import { IWorkbenchIssueService } from 'vscode/vscode/vs/workbench/contrib/issue
|
|
|
8
8
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
9
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
10
10
|
|
|
11
|
-
const _moduleId = "vs/workbench/contrib/issue/common/issue.contribution";
|
|
12
11
|
const OpenIssueReporterActionId = 'workbench.action.openIssueReporter';
|
|
13
12
|
const OpenIssueReporterApiId = 'vscode.openIssueReporter';
|
|
14
13
|
const OpenIssueReporterCommandMetadata = {
|
|
@@ -75,7 +74,7 @@ let BaseIssueContribution = class BaseIssueContribution extends Disposable {
|
|
|
75
74
|
}));
|
|
76
75
|
const reportIssue = {
|
|
77
76
|
id: OpenIssueReporterActionId,
|
|
78
|
-
title: (
|
|
77
|
+
title: ( localize2(5697, "Report Issue...")),
|
|
79
78
|
category: Categories.Help
|
|
80
79
|
};
|
|
81
80
|
this._register(MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: reportIssue }));
|
|
@@ -83,7 +82,7 @@ let BaseIssueContribution = class BaseIssueContribution extends Disposable {
|
|
|
83
82
|
group: '3_feedback',
|
|
84
83
|
command: {
|
|
85
84
|
id: OpenIssueReporterActionId,
|
|
86
|
-
title: (
|
|
85
|
+
title: ( localize(5698, "Report &&Issue"))
|
|
87
86
|
},
|
|
88
87
|
order: 3
|
|
89
88
|
}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { rtrim } from 'vscode/vscode/vs/base/common/strings';
|
|
2
|
+
|
|
3
|
+
function normalizeGitHubUrl(url) {
|
|
4
|
+
if (url.endsWith('.git')) {
|
|
5
|
+
url = url.substr(0, url.length - 4);
|
|
6
|
+
}
|
|
7
|
+
url = rtrim(url, '/');
|
|
8
|
+
if (url.endsWith('/new')) {
|
|
9
|
+
url = rtrim(url, '/new');
|
|
10
|
+
}
|
|
11
|
+
if (url.endsWith('/issues')) {
|
|
12
|
+
url = rtrim(url, '/issues');
|
|
13
|
+
}
|
|
14
|
+
return url;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { normalizeGitHubUrl };
|
|
File without changes
|