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

Fix notebook icons #15346

Merged
merged 2 commits into from
May 6, 2021
Merged

Fix notebook icons #15346

merged 2 commits into from
May 6, 2021

Conversation

lucyzhang929
Copy link
Contributor

This PR fixes #15281

With the recent update in the svgo package, the removeViewBox plugin is defaulted to true, removing viewBox when converting SVGs to inline and causing the notebook icons to not render properly. The removeViewBox plugin only removes viewBox if width and height are also defined. Removing width and height from the SVGs allows the viewBox to be kept and the icons to be rendered correctly.

More discussion about the issue: svg/svgo#1128 (comment)

@lucyzhang929 lucyzhang929 requested review from halerankin and a team May 6, 2021 16:59
@chlafreniere
Copy link
Contributor

@lucyzhang929 how about actions that are contributed by extensions (Manage Packages, Convert to SQL script)?

@lucyzhang929
Copy link
Contributor Author

@chlafreniere Those icons weren't affected by the viewBox change because those SVG files were not converted to inline (instead the url is just the path to the SVG file). I'm not sure why only the notebook core icons are converted to inline. @halerankin do you have any ideas? Might be related to the masked-icon work.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 817610706

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 43.555%

Totals Coverage Status
Change from base Build 815368707: 0.004%
Covered Lines: 26478
Relevant Lines: 55324

💛 - Coveralls

@lucyzhang929 lucyzhang929 merged commit 4bc87c4 into main May 6, 2021
@lucyzhang929 lucyzhang929 deleted the luchzan/fixnbicons branch May 6, 2021 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notebook Icons are sized incorrectly
5 participants