From 6dd8b63f4ccc11814abc2d4f8ba24ce59d59aac1 Mon Sep 17 00:00:00 2001 From: Asher Date: Mon, 1 Mar 2021 13:29:19 -0600 Subject: [PATCH] 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. --- .../contrib/extensions/browser/extensionsViewlet.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts b/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts index 618d09604..6f842c106 100644 --- a/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts +++ b/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts @@ -466,11 +466,14 @@ export class ExtensionsViewPaneContainer extends ViewPaneContainer implements IE helperHeader.style.fontWeight = '600'; helperHeader.style.padding = 'padding: 5px 16px'; helperHeader.style.position = 'relative'; + + const helperText = append(helperHeader, $('div')); + // We call this function because it gives us access to the current theme // Then we can apply the link color to the links in the helper header registerThemingParticipant((theme) => { const linkColor = theme.getColor(textLinkForeground); - helperHeader.innerHTML = ` + helperText.innerHTML = `

WARNING

@@ -481,6 +484,7 @@ export class ExtensionsViewPaneContainer extends ViewPaneContainer implements IE

`; }); + const dismiss = append(helperHeader, $('span')); dismiss.innerHTML = 'Dismiss'; dismiss.style.display = 'block';