Skip to content
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

Treeview: Fixed icons on dark themes #2631

Merged
merged 9 commits into from Dec 22, 2020

Conversation

RunDevelopment
Copy link
Member

@RunDevelopment RunDevelopment commented Nov 12, 2020

This fixes #2630.

I also minified the SVGs themselves. (Hard to see with the base64 thou).

After this brilliant idea by @xjArea, I changed Treeview's styles to use an icon font. All formerly base64-encoded icons were extracted into a new plugins/treeview/icons folder. The extracted SVGs are both optimized and formatted.

The WOFF icon font is automatically generated using webfont. The build process will then automatically inline the font into the prism-treeview.css file as a @font-face rule along with an explanation on how to use the font.

This also decreases the file size of the CSS file, from 18KB down to 8KB.

Tested for Chrome 86, FF 81, and IE11.

@@ -100,14 +100,16 @@ async function getLog(range) {
}

const revisionRanges = {
nextRelease: git.raw(['describe', '--abbrev=0', '--tags']).then(res => `${res.trim()}..HEAD`)
Copy link
Member Author

Choose a reason for hiding this comment

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

I have no idea why but this crashed the build with a

fatal: No names found, cannot describe anything.

No other information given.

It worked before, so my guess is that either GH made a slight change to how PRs are setup on workflows or that webfont or one of its dependencies messes with git in some way. This problem doesn't occur locally.

No idea what the error is or why it happened but I fixed it.

Copy link
Member

@mAAdhaTTah mAAdhaTTah left a comment

Choose a reason for hiding this comment

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

LOVE this!

@github-actions
Copy link

github-actions bot commented Dec 22, 2020

No JS Changes

Generated by 🚫 dangerJS against a203e3a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Treeview's icons are not visible in dark theme
2 participants