Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
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
Duplicate for Testing — GH-1975 Theme Framework, Leaf & Palm Themes #523
Duplicate for Testing — GH-1975 Theme Framework, Leaf & Palm Themes #523
Changes from 1 commit
317ab64f050b83e8d7f92f9b1546a9a12aafc6149405a37b30e0beef8a66ff91ff8eb460cfc9105f8718824b2a3d36fd1a260c6278660643d22b7520fb546b2a8bce22a58c2937829c92e44e44fc1a2a31bbc72dd0ec9bebc90f185350c2bc1748ddfeb29b0f08ff586bf02dd233d77402671ef5bf89029334ab75a348ba8805349d490c4bf1aae4510e7c01a2c4c53f9eb0e134e18313c44fef95b1c136f864d88519747File filter
Jump to
wlycdgrApr 8, 2020
Member
Given that the only differences between these icons and the default ones are the path fill and stroke colors, let's inline one of each type in the icon render helpers in
Tracker, set css classes based on the theme context value, and set the fill and stroke values in those classes.We've been using
ReactSVGcomponents to render these icons, and previously I thought it was more or less equivalent to inlining, but I am realizing now this component is overkill - it's intended to abstract away complexity when your SVG resources lives at a remote URL and you need to make an async request for it before inserting the response.Between the two changes, we'll save a couple dozen kilobytes and remove a 3rd party dependency from the component.
wlycdgrApr 8, 2020
Member
So, for example,
_renderCliqzAdsIcon()can become something along the lines ofbenstrumeyerApr 10, 2020
Author
Contributor
Using this.context as a CSS class is a great idea. I've inlined it and removed all 6 svg files!