-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[icons] Remove extraneous path #19483
Conversation
Details of bundle changes.Comparing: 39c8170...7a7ca75
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch! However, these icons are automatically generated, manual edits are not an option. We had to fix similar issues in the past. Do you think that you could try this different approach, from https://github.com/mui-org/material-ui/blob/bdebdfd4832c13a05463faeffef9687688be9715/packages/material-ui-icons/builder.js#L91-L99
Thanks!
Gotcha. Thanks for the tip! I added the path to the |
This is going to be the challenging part! We haven't updated the icons for a few months. I can't guarantee the script still runs. The workflow is:
|
The scripts run, but they add about ten new icons and modify about 150+ more. Looks like some new kinds of 'noise' are added as well. I committed the generated MicOff icon for now. I feel like including the other additions and modifications is a bit out of scope. What do you think? Thanks again for the quick help! |
d0ad64d
to
a071fa6
Compare
a071fa6
to
01a53f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried a built-in option in SVGO, it seems to be fine. If you could have a second look, it would be awesome.
Thanks! Nice approach. That seems to get rid of most of them, but there are still are about ten icons that have visible noise (with a The icons that are left all have I'm trying to get rid of them with builder.js but no luck yet. |
I gave up on them 😁. In the past, I remember having visual regressions linked to cleaning the icons too much. This would be my only concern, to make sure we don't alter the visual output of the icons. |
Actually, looks like all the problem icons come from /legacy. Should these ten icons just be cleaned by hand? |
Oh, smart, yes, please do :D. |
Ok I cleaned some of the legacy icons. I think that's all of them! One last thing that I want to point out - there are some icons in the /legacy directory that do have corresponding icons that are downloaded with One simple idea is to add This change updates 44 icons in /src because it's saving a newer version from google and not the version from /legacy. |
@timmydoza Correct, I have added a step in the script to throw if it finds a duplicated icon. |
8bcc3bf
to
070cee6
Compare
070cee6
to
7a7ca75
Compare
Thank you, this initial one line change proposal has turned into something larger :) |
This pull request removes an invisible and extraneous
<path>
element from the MicOff icon. This<path>
creates an invisible box around the whole icon. Other material-ui icons (including all other 'Mic' icons) don't have this box. This<path>
can cause issues when trying to apply custom styles to the icon.Example:
Result:
Expected: