mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 15:01:57 +01:00
Support for filing feature requests on extensions, fixes #47508
This commit is contained in:
@@ -326,7 +326,7 @@ export class IssueReporter extends Disposable {
|
||||
|
||||
this.addEventListener('issue-source', 'change', (event: Event) => {
|
||||
const fileOnExtension = JSON.parse((<HTMLInputElement>event.target).value);
|
||||
this.issueReporterModel.update({ fileOnExtension: fileOnExtension, includeExtensions: !fileOnExtension, selectedExtension: null });
|
||||
this.issueReporterModel.update({ fileOnExtension: fileOnExtension, includeExtensions: !fileOnExtension });
|
||||
this.render();
|
||||
|
||||
const title = (<HTMLInputElement>document.getElementById('issue-title')).value;
|
||||
@@ -343,8 +343,7 @@ export class IssueReporter extends Disposable {
|
||||
this.issueReporterModel.update({ issueDescription });
|
||||
|
||||
// Only search for extension issues on title change
|
||||
const fileOnExtension = this.issueReporterModel.getData().fileOnExtension;
|
||||
if (!fileOnExtension) {
|
||||
if (!this.issueReporterModel.fileOnExtension()) {
|
||||
const title = (<HTMLInputElement>document.getElementById('issue-title')).value;
|
||||
this.searchVSCodeIssues(title, issueDescription);
|
||||
}
|
||||
@@ -359,8 +358,7 @@ export class IssueReporter extends Disposable {
|
||||
hide(lengthValidationMessage);
|
||||
}
|
||||
|
||||
const fileOnExtension = this.issueReporterModel.getData().fileOnExtension;
|
||||
if (fileOnExtension) {
|
||||
if (this.issueReporterModel.fileOnExtension()) {
|
||||
this.searchExtensionIssues(title);
|
||||
} else {
|
||||
const description = this.issueReporterModel.getData().issueDescription;
|
||||
@@ -659,7 +657,6 @@ export class IssueReporter extends Disposable {
|
||||
show(systemBlock);
|
||||
show(processBlock);
|
||||
show(workspaceBlock);
|
||||
show(extensionsBlock);
|
||||
show(problemSource);
|
||||
|
||||
if (fileOnExtension) {
|
||||
@@ -674,6 +671,11 @@ export class IssueReporter extends Disposable {
|
||||
} else if (issueType === IssueType.FeatureRequest) {
|
||||
descriptionTitle.innerHTML = `${localize('description', "Description")} <span class="required-input">*</span>`;
|
||||
descriptionSubtitle.innerHTML = localize('featureRequestDescription', "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.");
|
||||
show(problemSource);
|
||||
|
||||
if (fileOnExtension) {
|
||||
show(extensionSelector);
|
||||
}
|
||||
} else if (issueType === IssueType.SettingsSearchIssue) {
|
||||
show(blockContainer);
|
||||
show(searchedExtensionsBlock);
|
||||
@@ -701,7 +703,7 @@ export class IssueReporter extends Disposable {
|
||||
isValid = this.validateInput(elementId) && isValid;
|
||||
});
|
||||
|
||||
if (this.issueReporterModel.getData().fileOnExtension) {
|
||||
if (this.issueReporterModel.fileOnExtension()) {
|
||||
isValid = this.validateInput('extension-selector') && isValid;
|
||||
}
|
||||
|
||||
@@ -751,7 +753,7 @@ export class IssueReporter extends Disposable {
|
||||
|
||||
private getIssueUrlWithTitle(issueTitle: string): string {
|
||||
let repositoryUrl = product.reportIssueUrl;
|
||||
if (this.issueReporterModel.getData().fileOnExtension) {
|
||||
if (this.issueReporterModel.fileOnExtension()) {
|
||||
const bugsUrl = this.getExtensionBugsUrl();
|
||||
const extensionUrl = this.getExtensionRepositoryUrl();
|
||||
// If given, try to match the extension's bug url
|
||||
|
||||
Reference in New Issue
Block a user