mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-04 15:25:47 +01:00
Fixes #42734
This commit is contained in:
@@ -113,17 +113,17 @@ export class IssueReporter extends Disposable {
|
||||
const content: string[] = [];
|
||||
|
||||
if (styles.inputBackground) {
|
||||
content.push(`input, textarea, select { background-color: ${styles.inputBackground}; }`);
|
||||
content.push(`input[type="text"], textarea, select { background-color: ${styles.inputBackground}; }`);
|
||||
}
|
||||
|
||||
if (styles.inputBorder) {
|
||||
content.push(`input, textarea, select { border: 1px solid ${styles.inputBorder}; }`);
|
||||
content.push(`input[type="text"], textarea, select { border: 1px solid ${styles.inputBorder}; }`);
|
||||
} else {
|
||||
content.push(`input, textarea, select { border: 1px solid transparent; }`);
|
||||
content.push(`input[type="text"], textarea, select { border: 1px solid transparent; }`);
|
||||
}
|
||||
|
||||
if (styles.inputForeground) {
|
||||
content.push(`input, textarea, select { color: ${styles.inputForeground}; }`);
|
||||
content.push(`input[type="text"], textarea, select { color: ${styles.inputForeground}; }`);
|
||||
}
|
||||
|
||||
if (styles.inputErrorBorder) {
|
||||
@@ -212,13 +212,21 @@ export class IssueReporter extends Disposable {
|
||||
this.render();
|
||||
});
|
||||
|
||||
['includeSystemInfo', 'includeProcessInfo', 'includeWorkspaceInfo', 'includeExtensions', 'reprosWithoutExtensions'].forEach(elementId => {
|
||||
['includeSystemInfo', 'includeProcessInfo', 'includeWorkspaceInfo', 'includeExtensions'].forEach(elementId => {
|
||||
document.getElementById(elementId).addEventListener('click', (event: Event) => {
|
||||
event.stopPropagation();
|
||||
this.issueReporterModel.update({ [elementId]: !this.issueReporterModel.getData()[elementId] });
|
||||
});
|
||||
});
|
||||
|
||||
document.getElementById('reproducesWithoutExtensions').addEventListener('click', (e) => {
|
||||
this.issueReporterModel.update({ reprosWithoutExtensions: true });
|
||||
});
|
||||
|
||||
document.getElementById('reproducesWithExtensions').addEventListener('click', (e) => {
|
||||
this.issueReporterModel.update({ reprosWithoutExtensions: false });
|
||||
});
|
||||
|
||||
document.getElementById('description').addEventListener('blur', (event: Event) => {
|
||||
this.issueReporterModel.update({ issueDescription: (<HTMLInputElement>event.target).value });
|
||||
});
|
||||
@@ -337,6 +345,7 @@ export class IssueReporter extends Disposable {
|
||||
const processBlock = document.querySelector('.block-process');
|
||||
const workspaceBlock = document.querySelector('.block-workspace');
|
||||
const extensionsBlock = document.querySelector('.block-extensions');
|
||||
const disabledExtensions = document.getElementById('disabledExtensions');
|
||||
|
||||
const descriptionTitle = document.getElementById('issue-description-label');
|
||||
const descriptionSubtitle = document.getElementById('issue-description-subtitle');
|
||||
@@ -346,6 +355,7 @@ export class IssueReporter extends Disposable {
|
||||
hide(processBlock);
|
||||
hide(workspaceBlock);
|
||||
show(extensionsBlock);
|
||||
show(disabledExtensions);
|
||||
|
||||
descriptionTitle.innerHTML = `${localize('stepsToReproduce', "Steps to Reproduce")} <span class="required-input">*</span>`;
|
||||
show(descriptionSubtitle);
|
||||
@@ -355,6 +365,7 @@ export class IssueReporter extends Disposable {
|
||||
show(processBlock);
|
||||
show(workspaceBlock);
|
||||
show(extensionsBlock);
|
||||
show(disabledExtensions);
|
||||
|
||||
descriptionTitle.innerHTML = `${localize('stepsToReproduce', "Steps to Reproduce")} <span class="required-input">*</span>`;
|
||||
show(descriptionSubtitle);
|
||||
@@ -364,6 +375,7 @@ export class IssueReporter extends Disposable {
|
||||
hide(processBlock);
|
||||
hide(workspaceBlock);
|
||||
hide(extensionsBlock);
|
||||
hide(disabledExtensions);
|
||||
|
||||
descriptionTitle.innerHTML = `${localize('description', "Description")} <span class="required-input">*</span>`;
|
||||
hide(descriptionSubtitle);
|
||||
|
||||
@@ -13,91 +13,105 @@ export default (): string => `
|
||||
<div id="issue-reporter">
|
||||
<div id="english" class="input-group hidden">${escape(localize('completeInEnglish', "Please complete the form in English."))}</div>
|
||||
|
||||
<div class="input-group">
|
||||
<label for="issue-type">${escape(localize('issueTypeLabel', "I want to submit a"))}</label>
|
||||
<select id="issue-type" class="form-control">
|
||||
<option value="0">${escape(localize('bugReporter', "Bug Report"))}</option>
|
||||
<option value="1">${escape(localize('performanceIssue', "Performance Issue"))}</option>
|
||||
<option value="2">${escape(localize('featureRequest', "Feature Request"))}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<label for="issue-title">${escape(localize('issueTitleLabel', "Title"))} <span class="required-input">*</span></label>
|
||||
<div id="issue-title-validation-error" class="validation-error hidden" role="alert">${escape(localize('issueTitleRequired', "Please enter a title."))}</div>
|
||||
<input id="issue-title" type="text" required>
|
||||
<small id="similar-issues">
|
||||
<!-- To be dynamically filled -->
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<div class="two-col">
|
||||
<label for="vscode-version">${escape(localize('vscodeVersion', "VS Code Version"))}</label>
|
||||
<input id="vscode-version" type="text" value="${pkg.name} ${pkg.version}" disabled/>
|
||||
<div class="section">
|
||||
<div class="input-group">
|
||||
<label for="issue-type">${escape(localize('issueTypeLabel', "I want to submit a"))}</label>
|
||||
<select id="issue-type" class="form-control">
|
||||
<option value="0">${escape(localize('bugReporter', "Bug Report"))}</option>
|
||||
<option value="1">${escape(localize('performanceIssue', "Performance Issue"))}</option>
|
||||
<option value="2">${escape(localize('featureRequest', "Feature Request"))}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="two-col">
|
||||
<label for="os">${escape(localize('osVersion', "OS Version"))}</label>
|
||||
<input id="os" type="text" value="${os.type()} ${os.arch()} ${os.release()}" disabled/>
|
||||
|
||||
<div class="input-group">
|
||||
<label for="issue-title">${escape(localize('issueTitleLabel', "Title"))} <span class="required-input">*</span></label>
|
||||
<div id="issue-title-validation-error" class="validation-error hidden" role="alert">${escape(localize('issueTitleRequired', "Please enter a title."))}</div>
|
||||
<input id="issue-title" type="text" required>
|
||||
<small id="similar-issues">
|
||||
<!-- To be dynamically filled -->
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="block-container" class="input-group">
|
||||
<div class="block block-system">
|
||||
<details>
|
||||
<summary>${escape(localize('systemInfo', "My System Info"))}
|
||||
<input class="sendData" type="checkbox" id="includeSystemInfo" checked>
|
||||
<label class="caption" for="includeSystemInfo">${escape(localize('sendData', "Send my data"))}</label>
|
||||
</input>
|
||||
</summary>
|
||||
<div class="block-info">
|
||||
<!-- To be dynamically filled -->
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
<div class="block block-process">
|
||||
<details>
|
||||
<summary>${escape(localize('processes', "Currently Running Processes"))}
|
||||
<input class="sendData" type="checkbox" id="includeProcessInfo" checked>
|
||||
<label class="caption" for="includeProcessInfo">${escape(localize('sendData', "Send my data"))}</label>
|
||||
</input>
|
||||
</summary>
|
||||
<div class="block-info">
|
||||
<!-- To be dynamically filled -->
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
<div class="block block-workspace">
|
||||
<details>
|
||||
<summary>${escape(localize('workspaceStats', "My Workspace Stats"))}
|
||||
<input class="sendData" type="checkbox" id="includeWorkspaceInfo" checked>
|
||||
<label class="caption" for="includeWorkspaceInfo">${escape(localize('sendData', "Send my data"))}</label>
|
||||
</input>
|
||||
</summary>
|
||||
<pre class="block-info">
|
||||
<code>
|
||||
<!-- To be dynamically filled -->
|
||||
</code>
|
||||
</pre>
|
||||
</details>
|
||||
</div>
|
||||
<div class="block block-extensions">
|
||||
<details>
|
||||
<summary>${escape(localize('extensions', "My Extensions"))}
|
||||
<input class="sendData" type="checkbox" id="includeExtensions" checked>
|
||||
<label class="caption" for="includeExtensions">${escape(localize('sendData', "Send my data"))}</label>
|
||||
</input>
|
||||
</summary>
|
||||
<div class="block-info">
|
||||
<!-- To be dynamically filled -->
|
||||
</div>
|
||||
</details>
|
||||
<div>
|
||||
<input type="checkbox" id="reprosWithoutExtensions">
|
||||
<label for="reprosWithoutExtensions">${escape(localize('tryDisablingExtensions', "The problem is reproducible when extensions are disabled"))}</label>
|
||||
<div class="instructions">Try to reproduce the problem after <button id="disableExtensions" class="workbenchCommand">${escape(localize('disableExtensions', "disabling all extensions and reloading the window"))}</button>.</div>
|
||||
<div class="instructions">If you suspect it's an extension issue, <button id="showRunning" class="workbenchCommand">${escape(localize('showRunningExtensions', "see all running extensions"))}</button>.</div>
|
||||
<div class="system-info">
|
||||
<div class="input-group">
|
||||
<div class="two-col">
|
||||
<label for="vscode-version">${escape(localize('vscodeVersion', "VS Code Version"))}</label>
|
||||
<input id="vscode-version" type="text" value="${pkg.name} ${pkg.version}" disabled/>
|
||||
</div>
|
||||
<div class="two-col">
|
||||
<label for="os">${escape(localize('osVersion', "OS Version"))}</label>
|
||||
<input id="os" type="text" value="${os.type()} ${os.arch()} ${os.release()}" disabled/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="block-container">
|
||||
<div class="block block-system">
|
||||
<details>
|
||||
<summary>${escape(localize('systemInfo', "My System Info"))}
|
||||
<input class="sendData" type="checkbox" id="includeSystemInfo" checked>
|
||||
<label class="caption" for="includeSystemInfo">${escape(localize('sendData', "Send my data"))}</label>
|
||||
</input>
|
||||
</summary>
|
||||
<div class="block-info">
|
||||
<!-- To be dynamically filled -->
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
<div class="block block-process">
|
||||
<details>
|
||||
<summary>${escape(localize('processes', "Currently Running Processes"))}
|
||||
<input class="sendData" type="checkbox" id="includeProcessInfo" checked>
|
||||
<label class="caption" for="includeProcessInfo">${escape(localize('sendData', "Send my data"))}</label>
|
||||
</input>
|
||||
</summary>
|
||||
<div class="block-info">
|
||||
<!-- To be dynamically filled -->
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
<div class="block block-workspace">
|
||||
<details>
|
||||
<summary>${escape(localize('workspaceStats', "My Workspace Stats"))}
|
||||
<input class="sendData" type="checkbox" id="includeWorkspaceInfo" checked>
|
||||
<label class="caption" for="includeWorkspaceInfo">${escape(localize('sendData', "Send my data"))}</label>
|
||||
</input>
|
||||
</summary>
|
||||
<pre class="block-info">
|
||||
<code>
|
||||
<!-- To be dynamically filled -->
|
||||
</code>
|
||||
</pre>
|
||||
</details>
|
||||
</div>
|
||||
<div class="block block-extensions">
|
||||
<details>
|
||||
<summary>${escape(localize('extensions', "My Extensions"))}
|
||||
<input class="sendData" type="checkbox" id="includeExtensions" checked>
|
||||
<label class="caption" for="includeExtensions">${escape(localize('sendData', "Send my data"))}</label>
|
||||
</input>
|
||||
</summary>
|
||||
<div class="block-info">
|
||||
<!-- To be dynamically filled -->
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div id="disabledExtensions">
|
||||
<label>${escape(localize('tryDisablingExtensions', "Is the problem reproducible when extensions are disabled?"))}</label>
|
||||
<div class="choice">
|
||||
<input type="radio" id="reproducesWithoutExtensions" value=true name="reprosWithoutExtensions" />
|
||||
<label for="reproducesWithoutExtensions">${escape(localize('yes', "Yes"))}</label>
|
||||
</div>
|
||||
<div class="choice">
|
||||
<input type="radio" id="reproducesWithExtensions" value=false name="reprosWithoutExtensions" checked/>
|
||||
<label for="reproducesWithExtensions">${escape(localize('no', "No"))}</label>
|
||||
</div>
|
||||
<div class="instructions">Try to reproduce the problem after <button id="disableExtensions" class="workbenchCommand">${escape(localize('disableExtensions', "disabling all extensions and reloading the window"))}</button>.</div>
|
||||
<div class="instructions">If you suspect it's an extension issue, <button id="showRunning" class="workbenchCommand">${escape(localize('showRunningExtensions', "see all running extensions"))}</button>.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -30,14 +30,17 @@ td {
|
||||
border-top: 1px solid #e9ecef;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
/**
|
||||
* Forms
|
||||
*/
|
||||
input, textarea {
|
||||
input[type="text"], textarea {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: .375rem .75rem;
|
||||
margin: 0;
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
color: #495057;
|
||||
@@ -149,6 +152,19 @@ button:disabled {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.choice {
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.choice > label, .choice > input {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.system-info {
|
||||
margin-bottom: 1.25em;
|
||||
}
|
||||
|
||||
select, input, textarea {
|
||||
border: 1px solid transparent;
|
||||
margin-top: 10px;
|
||||
@@ -177,7 +193,6 @@ summary {
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
height: 18px;
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
margin-top: 0;
|
||||
|
||||
Reference in New Issue
Block a user