Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6dd8b63

Browse files
committedMar 1, 2021
Add div for inner extension helper text
The theme callback would set innerHTML on the header which wipes out the dismiss button. With an inner div we can replace the inner HTML without worrying about other elements in the header. Closes #2799.
1 parent a5edbcb commit 6dd8b63

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,11 +466,14 @@ export class ExtensionsViewPaneContainer extends ViewPaneContainer implements IE
466466
helperHeader.style.fontWeight = '600';
467467
helperHeader.style.padding = 'padding: 5px 16px';
468468
helperHeader.style.position = 'relative';
469+
470+
const helperText = append(helperHeader, $('div'));
471+
469472
// We call this function because it gives us access to the current theme
470473
// Then we can apply the link color to the links in the helper header
471474
registerThemingParticipant((theme) => {
472475
const linkColor = theme.getColor(textLinkForeground);
473-
helperHeader.innerHTML = `
476+
helperText.innerHTML = `
474477
<div style="margin-bottom: 8px;">
475478
<p style="margin-bottom: 0; display: flex; align-items: center"><span class="codicon codicon-warning" style="margin-right: 2px; color: #C4A103"></span>WARNING</p>
476479
<p style="margin-top: 0; margin-bottom: 4px">
@@ -481,6 +484,7 @@ export class ExtensionsViewPaneContainer extends ViewPaneContainer implements IE
481484
</div>
482485
`;
483486
});
487+
484488
const dismiss = append(helperHeader, $('span'));
485489
dismiss.innerHTML = 'Dismiss';
486490
dismiss.style.display = 'block';

0 commit comments

Comments
 (0)
Please sign in to comment.