Path: blob/main/src/vs/workbench/contrib/issue/browser/issueReporterPage.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { escape } from '../../../../base/common/strings.js';6import { localize } from '../../../../nls.js';78const sendSystemInfoLabel = escape(localize('sendSystemInfo', "Include my system information"));9const sendProcessInfoLabel = escape(localize('sendProcessInfo', "Include my currently running processes"));10const sendWorkspaceInfoLabel = escape(localize('sendWorkspaceInfo', "Include my workspace metadata"));11const sendExtensionsLabel = escape(localize('sendExtensions', "Include my enabled extensions"));12const sendExperimentsLabel = escape(localize('sendExperiments', "Include A/B experiment info"));13const sendExtensionData = escape(localize('sendExtensionData', "Include additional extension info"));14const acknowledgementsLabel = escape(localize('acknowledgements', "I acknowledge that my VS Code version is not updated and this issue may be closed."));15const reviewGuidanceLabel = localize( // intentionally not escaped because of its embedded tags16{17key: 'reviewGuidanceLabel',18comment: [19'{Locked="<a href=\"https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions\" target=\"_blank\">"}',20'{Locked="</a>"}'21]22},23'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>. Please complete the form in English.'24);2526export default (): string => `27<div id="update-banner" class="issue-reporter-update-banner hidden">28<span class="update-banner-text" id="update-banner-text">29<!-- To be dynamically filled -->30</span>31</div>32<div class="issue-reporter" id="issue-reporter">33<div id="english" class="input-group hidden">${escape(localize('completeInEnglish', "Please complete the form in English."))}</div>3435<div id="review-guidance-help-text" class="input-group">${reviewGuidanceLabel}</div>3637<div class="section">38<div class="input-group">39<label class="inline-label" for="issue-type">${escape(localize('issueTypeLabel', "This is a"))}</label>40<select id="issue-type" class="inline-form-control">41<!-- To be dynamically filled -->42</select>43</div>4445<div class="input-group" id="problem-source">46<label class="inline-label" for="issue-source">${escape(localize('issueSourceLabel', "For"))} <span class="required-input">*</span></label>47<select id="issue-source" class="inline-form-control" required>48<!-- To be dynamically filled -->49</select>50<div id="issue-source-empty-error" class="validation-error hidden" role="alert">${escape(localize('issueSourceEmptyValidation', "An issue source is required."))}</div>51<div id="problem-source-help-text" class="instructions hidden">${escape(localize('disableExtensionsLabelText', "Try to reproduce the problem after {0}. If the problem only reproduces when extensions are active, it is likely an issue with an extension."))52.replace('{0}', () => `<span tabIndex=0 role="button" id="disableExtensions" class="workbenchCommand">${escape(localize('disableExtensions', "disabling all extensions and reloading the window"))}</span>`)}53</div>5455<div id="extension-selection">56<label class="inline-label" for="extension-selector">${escape(localize('chooseExtension', "Extension"))} <span class="required-input">*</span></label>57<select id="extension-selector" class="inline-form-control">58<!-- To be dynamically filled -->59</select>60<div id="extension-selection-validation-error" class="validation-error hidden" role="alert">${escape(localize('extensionWithNonstandardBugsUrl', "The issue reporter is unable to create issues for this extension. Please visit {0} to report an issue."))61.replace('{0}', () => `<span tabIndex=0 role="button" id="extensionBugsLink" class="workbenchCommand"><!-- To be dynamically filled --></span>`)}</div>62<div id="extension-selection-validation-error-no-url" class="validation-error hidden" role="alert">63${escape(localize('extensionWithNoBugsUrl', "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."))}64</div>65</div>66</div>6768<div id="issue-title-container" class="input-group">69<label class="inline-label" for="issue-title">${escape(localize('issueTitleLabel', "Title"))} <span class="required-input">*</span></label>70<input id="issue-title" type="text" class="inline-form-control" placeholder="${escape(localize('issueTitleRequired', "Please enter a title."))}" required>71<div id="issue-title-empty-error" class="validation-error hidden" role="alert">${escape(localize('titleEmptyValidation', "A title is required."))}</div>72<div id="issue-title-length-validation-error" class="validation-error hidden" role="alert">${escape(localize('titleLengthValidation', "The title is too long."))}</div>73<small id="similar-issues">74<!-- To be dynamically filled -->75</small>76</div>7778</div>7980<div class="input-group description-section">81<label for="description" id="issue-description-label">82<!-- To be dynamically filled -->83</label>84<div class="instructions" id="issue-description-subtitle">85<!-- To be dynamically filled -->86</div>87<div class="block-info-text">88<textarea name="description" id="description" placeholder="${escape(localize('details', "Please enter details."))}" required></textarea>89</div>90<div id="description-empty-error" class="validation-error hidden" role="alert">${escape(localize('descriptionEmptyValidation', "A description is required."))}</div>91<div id="description-short-error" class="validation-error hidden" role="alert">${escape(localize('descriptionTooShortValidation', "Please provide a longer description."))}</div>92</div>9394<div class="system-info" id="block-container">95<div class="block block-extension-data">96<input class="send-extension-data" aria-label="${sendExtensionData}" type="checkbox" id="includeExtensionData" checked/>97<label class="extension-caption" id="extension-caption" for="includeExtensionData">98${sendExtensionData}99<span id="ext-loading" hidden></span>100<span class="ext-parens" hidden>(</span><a href="#" class="showInfo" id="extension-id">${escape(localize('show', "show"))}</a><span class="ext-parens" hidden>)</span>101<a id="extension-data-download">${escape(localize('downloadExtensionData', "Download Extension Data"))}</a>102</label>103<pre class="block-info" id="extension-data" placeholder="${escape(localize('extensionData', "Extension does not have additional data to include."))}" style="white-space: pre-wrap; user-select: text;">104<!-- To be dynamically filled -->105</pre>106</div>107108<div class="block block-system">109<input class="sendData" aria-label="${sendSystemInfoLabel}" type="checkbox" id="includeSystemInfo" checked/>110<label class="caption" for="includeSystemInfo">111${sendSystemInfoLabel}112(<a href="#" class="showInfo">${escape(localize('show', "show"))}</a>)113</label>114<div class="block-info hidden" style="user-select: text;">115<!-- To be dynamically filled -->116</div>117</div>118<div class="block block-process">119<input class="sendData" aria-label="${sendProcessInfoLabel}" type="checkbox" id="includeProcessInfo" checked/>120<label class="caption" for="includeProcessInfo">121${sendProcessInfoLabel}122(<a href="#" class="showInfo">${escape(localize('show', "show"))}</a>)123</label>124<pre class="block-info hidden" style="user-select: text;">125<code>126<!-- To be dynamically filled -->127</code>128</pre>129</div>130<div class="block block-workspace">131<input class="sendData" aria-label="${sendWorkspaceInfoLabel}" type="checkbox" id="includeWorkspaceInfo" checked/>132<label class="caption" for="includeWorkspaceInfo">133${sendWorkspaceInfoLabel}134(<a href="#" class="showInfo">${escape(localize('show', "show"))}</a>)135</label>136<pre id="systemInfo" class="block-info hidden" style="user-select: text;">137<code>138<!-- To be dynamically filled -->139</code>140</pre>141</div>142<div class="block block-extensions">143<input class="sendData" aria-label="${sendExtensionsLabel}" type="checkbox" id="includeExtensions" checked/>144<label class="caption" for="includeExtensions">145${sendExtensionsLabel}146(<a href="#" class="showInfo">${escape(localize('show', "show"))}</a>)147</label>148<div id="systemInfo" class="block-info hidden" style="user-select: text;">149<!-- To be dynamically filled -->150</div>151</div>152<div class="block block-experiments">153<input class="sendData" aria-label="${sendExperimentsLabel}" type="checkbox" id="includeExperiments" checked/>154<label class="caption" for="includeExperiments">155${sendExperimentsLabel}156(<a href="#" class="showInfo">${escape(localize('show', "show"))}</a>)157</label>158<pre class="block-info hidden" style="user-select: text;">159<!-- To be dynamically filled -->160</pre>161</div>162<div class="block block-acknowledgements hidden" id="version-acknowledgements">163<input class="sendData" aria-label="${acknowledgementsLabel}" type="checkbox" id="includeAcknowledgement"/>164<label class="caption" for="includeAcknowledgement">165${acknowledgementsLabel}166</label>167</div>168</div>169170</div>`;171172173