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