Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix disappearing dismiss button on extension help #2801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
code-asher merged 2 commits into master from disappearing-dismiss
Mar 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -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 = `
<div style="margin-bottom: 8px;">
<p style="margin-bottom: 0; display: flex; align-items: center"><span class="codicon codicon-warning" style="margin-right: 2px; color: #C4A103"></span>WARNING</p>
<p style="margin-top: 0; margin-bottom: 4px">
Expand All @@ -481,11 +484,13 @@ export class ExtensionsViewPaneContainer extends ViewPaneContainer implements IE
</div>
`;
});

const dismiss = append(helperHeader, $('span'));
dismiss.innerHTML = 'Dismiss';
dismiss.style.display = 'block';
dismiss.style.textAlign = 'right';
dismiss.style.cursor = 'pointer';
dismiss.tabIndex = 0;
Copy link
Contributor

@jsjoeio jsjoeio Mar 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call!

code-asher reacted with heart emoji
dismiss.onclick = () => {
helperHeader.remove();
localStorage.setItem(extensionHelperLocalStorageKey, 'viewed');
Expand Down

AltStyle によって変換されたページ (->オリジナル) /