Skip to content

Commit 068fd7f

Browse files
authored
Problems view table - Fix code column rendering issue (microsoft#154518)
Fix code column rendering issue
1 parent f2a4753 commit 068fd7f

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

src/vs/workbench/contrib/markers/browser/markersTable.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,17 @@ class MarkerCodeColumnRenderer implements ITableRenderer<MarkerTableItem, IMarke
135135
}
136136

137137
renderElement(element: MarkerTableItem, index: number, templateData: IMarkerCodeColumnTemplateData, height: number | undefined): void {
138-
if (element.marker.source && element.marker.code) {
139-
templateData.codeColumn.classList.toggle('code-link', typeof element.marker.code !== 'string');
140-
DOM.show(templateData.codeLabel.element);
138+
templateData.codeColumn.classList.remove('code-label');
139+
templateData.codeColumn.classList.remove('code-link');
141140

141+
if (element.marker.source && element.marker.code) {
142142
if (typeof element.marker.code === 'string') {
143+
templateData.codeColumn.classList.add('code-label');
143144
templateData.codeColumn.title = `${element.marker.source} (${element.marker.code})`;
144145
templateData.sourceLabel.set(element.marker.source, element.sourceMatches);
145146
templateData.codeLabel.set(element.marker.code, element.codeMatches);
146147
} else {
148+
templateData.codeColumn.classList.add('code-link');
147149
templateData.codeColumn.title = `${element.marker.source} (${element.marker.code.value})`;
148150
templateData.sourceLabel.set(element.marker.source, element.sourceMatches);
149151

@@ -159,7 +161,6 @@ class MarkerCodeColumnRenderer implements ITableRenderer<MarkerTableItem, IMarke
159161
} else {
160162
templateData.codeColumn.title = '';
161163
templateData.sourceLabel.set('-');
162-
DOM.hide(templateData.codeLabel.element);
163164
}
164165
}
165166

src/vs/workbench/contrib/markers/browser/media/markers.css

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,17 +279,18 @@
279279
content: ')';
280280
}
281281

282-
.markers-panel .markers-table-container .monaco-table .monaco-list-row .monaco-table-tr > .monaco-table-td > .code.code-link > .code-label {
282+
.markers-panel .markers-table-container .monaco-table .monaco-list-row .monaco-table-tr > .monaco-table-td > .code > .code-label,
283+
.markers-panel .markers-table-container .monaco-table .monaco-list-row .monaco-table-tr > .monaco-table-td > .code > .monaco-link {
283284
display: none;
284285
}
285286

286-
.markers-panel .markers-table-container .monaco-table .monaco-list-row .monaco-table-tr > .monaco-table-td > .code.code-link > .monaco-link {
287+
.markers-panel .markers-table-container .monaco-table .monaco-list-row .monaco-table-tr > .monaco-table-td > .code.code-label > .code-label {
287288
display: inline;
288-
text-decoration: underline;
289289
}
290290

291-
.markers-panel .markers-table-container .monaco-table .monaco-list-row .monaco-table-tr > .monaco-table-td > .code > .monaco-link {
292-
display: none;
291+
.markers-panel .markers-table-container .monaco-table .monaco-list-row .monaco-table-tr > .monaco-table-td > .code.code-link > .monaco-link {
292+
display: inline;
293+
text-decoration: underline;
293294
}
294295

295296
.markers-panel .markers-table-container .monaco-table .monaco-list-row .monaco-table-tr > .monaco-table-td > .file > .file-position {

0 commit comments

Comments
 (0)