Merge from vscode e6a45f4242ebddb7aa9a229f85555e8a3bd987e2 (#9253)

* Merge from vscode e6a45f4242ebddb7aa9a229f85555e8a3bd987e2

* skip failing tests

* remove github-authentication extensions

* ignore github compile steps

* ignore github compile steps

* check in compiled files
This commit is contained in:
Anthony Dresser
2020-02-21 12:11:51 -08:00
committed by GitHub
parent c74bac3746
commit 1b78a9b1e0
179 changed files with 3200 additions and 1830 deletions

View File

@@ -97,6 +97,23 @@ export class IssueReporter extends Disposable {
this.previewButton = new Button(issueReporterElement);
}
const issueTitle = configuration.data.issueTitle;
if (issueTitle) {
const issueTitleElement = this.getElementById<HTMLInputElement>('issue-title');
if (issueTitleElement) {
issueTitleElement.value = issueTitle;
}
}
const issueBody = configuration.data.issueBody;
if (issueBody) {
const description = this.getElementById<HTMLTextAreaElement>('description');
if (description) {
description.value = issueBody;
this.issueReporterModel.update({ issueDescription: issueBody });
}
}
ipcRenderer.on('vscode:issuePerformanceInfoResponse', (_: unknown, info: Partial<IssueReporterData>) => {
this.logService.trace('issueReporter: Received performance data');
this.issueReporterModel.update(info);
@@ -1176,8 +1193,8 @@ export class IssueReporter extends Disposable {
}
}
private getElementById(elementId: string): HTMLElement | undefined {
const element = document.getElementById(elementId);
private getElementById<T extends HTMLElement = HTMLElement>(elementId: string): T | undefined {
const element = document.getElementById(elementId) as T | undefined;
if (element) {
return element;
} else {