You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently some addons have an icon with a large file size. This means that the addon_catalog_cache.zip used by the addon manager and by the website is currently ~2MB. This PR adds aliases for some of the largest icons that are 1/7th-1/686th of the original size and shrinks the zip file to ~400kB. Warning is also added for icons larger than 10kB (all of the aliases are < 5kB).
Most icons should be close to identical to the original, but I did add on lighting to EasyProfileFrame, MakerWorkbench and Cubinets.
The icons could of course be pushed upstream. I only tried with one PR that got no response. But the individual addons do not see much benefit in fiddling with size of their icon.
It feels like this script is in the wrong repository. Perhaps it should be move to e.g. Addons.
It is a bit silly that the text of the SVG files are utf-8 encoded, base64 encoded and then added to the json, instead of just being added to the json, as the base64 encoding reduces the effectiveness of the compression. An "icon_data_raw" property could be added to the json instead of the "icon_data" for svg files. But that would not be backwards compatible (icons would disappear from old versions of the addon manager).
As luck would have it, after no activity for 3 months, the DesignSPHysics icon was merged into upstream an hour and a half after this issue was opened. 🤷
I'm sure you can get the Ondsel Lens merged :). Probably also Road, Machines, and AIGenFurniture. My preference would be to at least submit PRs for all of these and give their authors a chance to incorporate. And maybe @mnesarco could add this as an evaluation metric for the scanner.
Yep, pretty bad. It is not clear what you are measuring, but by presumably optimizing all icons, you got a result twice as large as this PR got by optimizing only a couple of handfuls. I considered doing it automatically, and svgo looked most promising, but rejected it. Since it is relatively seldom a new addon is added, it probably make more sense just to reject icons over 10kB and warn if they are over 5kB.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently some addons have an icon with a large file size. This means that the addon_catalog_cache.zip used by the addon manager and by the website is currently ~2MB. This PR adds aliases for some of the largest icons that are 1/7th-1/686th of the original size and shrinks the zip file to ~400kB. Warning is also added for icons larger than 10kB (all of the aliases are < 5kB).
Most icons should be close to identical to the original, but I did add on lighting to EasyProfileFrame, MakerWorkbench and Cubinets.
The icons could of course be pushed upstream. I only tried with one PR that got no response. But the individual addons do not see much benefit in fiddling with size of their icon.
It feels like this script is in the wrong repository. Perhaps it should be move to e.g. Addons.
It is a bit silly that the text of the SVG files are utf-8 encoded, base64 encoded and then added to the json, instead of just being added to the json, as the base64 encoding reduces the effectiveness of the compression. An "icon_data_raw" property could be added to the json instead of the "icon_data" for svg files. But that would not be backwards compatible (icons would disappear from old versions of the addon manager).