@@ -23,7 +23,7 @@ import { localize } from 'vs/nls';
2323import { isRemoteDiagnosticError , SystemInfo } from 'vs/platform/diagnostics/common/diagnostics' ;
2424import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection' ;
2525import { IMainProcessService , MainProcessService } from 'vs/platform/ipc/electron-sandbox/mainProcessService' ;
26- import { ISettingsSearchIssueReporterData , IssueReporterData , IssueReporterExtensionData , IssueReporterFeatures , IssueReporterStyles , IssueType } from 'vs/platform/issue/common/issue' ;
26+ import { IssueReporterData , IssueReporterExtensionData , IssueReporterFeatures , IssueReporterStyles , IssueType } from 'vs/platform/issue/common/issue' ;
2727import { IWindowConfiguration } from 'vs/platform/windows/common/windows' ;
2828
2929const MAX_URL_LENGTH = 2045 ;
@@ -148,10 +148,6 @@ export class IssueReporter extends Disposable {
148148 applyZoom ( configuration . data . zoomLevel ) ;
149149 this . applyStyles ( configuration . data . styles ) ;
150150 this . handleExtensionData ( configuration . data . enabledExtensions ) ;
151-
152- if ( configuration . data . issueType === IssueType . SettingsSearchIssue ) {
153- this . handleSettingsSearchData ( < ISettingsSearchIssueReporterData > configuration . data ) ;
154- }
155151 }
156152
157153 render ( ) : void {
@@ -244,7 +240,7 @@ export class IssueReporter extends Disposable {
244240 content . push ( `.monaco-text-button:not(.disabled):hover, .monaco-text-button:focus { background-color: ${ styles . buttonHoverBackground } !important; }` ) ;
245241 }
246242
247- styleTag . innerHTML = content . join ( '\n' ) ;
243+ styleTag . textContent = content . join ( '\n' ) ;
248244 document . head . appendChild ( styleTag ) ;
249245 document . body . style . color = styles . color || '' ;
250246 }
@@ -266,39 +262,6 @@ export class IssueReporter extends Disposable {
266262 this . updateExtensionSelector ( installedExtensions ) ;
267263 }
268264
269- private handleSettingsSearchData ( data : ISettingsSearchIssueReporterData ) : void {
270- this . issueReporterModel . update ( {
271- actualSearchResults : data . actualSearchResults ,
272- query : data . query ,
273- filterResultCount : data . filterResultCount
274- } ) ;
275- this . updateSearchedExtensionTable ( data . enabledExtensions ) ;
276- this . updateSettingsSearchDetails ( data ) ;
277- }
278-
279- private updateSettingsSearchDetails ( data : ISettingsSearchIssueReporterData ) : void {
280- const target = document . querySelector < HTMLElement > ( '.block-settingsSearchResults .block-info' ) ;
281- if ( target ) {
282- const queryDiv = $ < HTMLDivElement > ( 'div' , undefined , `Query: "${ data . query } "` as string ) ;
283- const countDiv = $ < HTMLElement > ( 'div' , undefined , `Literal match count: ${ data . filterResultCount } ` as string ) ;
284- const detailsDiv = $ < HTMLDivElement > ( '.block-settingsSearchResults-details' , undefined , queryDiv , countDiv ) ;
285-
286- const table = $ ( 'table' , undefined ,
287- $ ( 'tr' , undefined ,
288- $ ( 'th' , undefined , 'Setting' ) ,
289- $ ( 'th' , undefined , 'Extension' ) ,
290- $ ( 'th' , undefined , 'Score' ) ,
291- ) ,
292- ...data . actualSearchResults . map ( setting => $ ( 'tr' , undefined ,
293- $ ( 'td' , undefined , setting . key ) ,
294- $ ( 'td' , undefined , setting . extensionId ) ,
295- $ ( 'td' , undefined , String ( setting . score ) . slice ( 0 , 5 ) ) ,
296- ) )
297- ) ;
298- reset ( target , detailsDiv , table ) ;
299- }
300- }
301-
302265 private initServices ( configuration : IssueReporterConfiguration ) : void {
303266 const serviceCollection = new ServiceCollection ( ) ;
304267 const mainProcessService = new MainProcessService ( configuration . windowId ) ;
@@ -498,10 +461,6 @@ export class IssueReporter extends Disposable {
498461 return true ;
499462 }
500463
501- if ( issueType === IssueType . SettingsSearchIssue ) {
502- return true ;
503- }
504-
505464 return false ;
506465 }
507466
@@ -668,16 +627,11 @@ export class IssueReporter extends Disposable {
668627
669628 const typeSelect = this . getElementById ( 'issue-type' ) ! as HTMLSelectElement ;
670629 const { issueType } = this . issueReporterModel . getData ( ) ;
671- if ( issueType === IssueType . SettingsSearchIssue ) {
672- reset ( typeSelect , makeOption ( IssueType . SettingsSearchIssue , localize ( 'settingsSearchIssue' , "Settings Search Issue" ) ) ) ;
673- typeSelect . disabled = true ;
674- } else {
675- reset ( typeSelect ,
676- makeOption ( IssueType . Bug , localize ( 'bugReporter' , "Bug Report" ) ) ,
677- makeOption ( IssueType . FeatureRequest , localize ( 'featureRequest' , "Feature Request" ) ) ,
678- makeOption ( IssueType . PerformanceIssue , localize ( 'performanceIssue' , "Performance Issue" ) )
679- ) ;
680- }
630+ reset ( typeSelect ,
631+ makeOption ( IssueType . Bug , localize ( 'bugReporter' , "Bug Report" ) ) ,
632+ makeOption ( IssueType . FeatureRequest , localize ( 'featureRequest' , "Feature Request" ) ) ,
633+ makeOption ( IssueType . PerformanceIssue , localize ( 'performanceIssue' , "Performance Issue" ) )
634+ ) ;
681635
682636 typeSelect . value = issueType . toString ( ) ;
683637
@@ -791,13 +745,6 @@ export class IssueReporter extends Disposable {
791745 if ( fileOnExtension ) {
792746 show ( extensionSelector ) ;
793747 }
794- } else if ( issueType === IssueType . SettingsSearchIssue ) {
795- show ( blockContainer ) ;
796- show ( searchedExtensionsBlock ) ;
797- show ( settingsSearchResultsBlock ) ;
798-
799- reset ( descriptionTitle , localize ( 'expectedResults' , "Expected Results" ) , $ ( 'span.required-input' , undefined , '*' ) ) ;
800- reset ( descriptionSubtitle , localize ( 'settingsSearchResultsDescription' , "Please list the results that you were expecting to see when you searched with this query. We support GitHub-flavored Markdown. You will be able to edit your issue and add screenshots when we preview it on GitHub." ) ) ;
801748 }
802749 }
803750
@@ -1135,20 +1082,6 @@ export class IssueReporter extends Disposable {
11351082 }
11361083 }
11371084
1138- private updateSearchedExtensionTable ( extensions : IssueReporterExtensionData [ ] ) : void {
1139- const target = document . querySelector < HTMLElement > ( '.block-searchedExtensions .block-info' ) ;
1140- if ( target ) {
1141- if ( ! extensions . length ) {
1142- target . innerText = 'Extensions: none' ;
1143- return ;
1144- }
1145-
1146- const table = this . getExtensionTableHtml ( extensions ) ;
1147- target . innerText = '' ;
1148- target . appendChild ( table ) ;
1149- }
1150- }
1151-
11521085 private getExtensionTableHtml ( extensions : IssueReporterExtensionData [ ] ) : HTMLTableElement {
11531086 return $ ( 'table' , undefined ,
11541087 $ ( 'tr' , undefined ,
0 commit comments