Pictogrammers / Browser-Icon-Picker

A cute Material Design Icons icon picker for your web browser.
GNU General Public License v2.0
67 stars 7 forks source link

Allow quick copying of SVG path? #11

Closed JamesCoyle closed 6 years ago

JamesCoyle commented 7 years ago

Would be super useful if the SVG path could easily be copied from the extension rather than having to go to the MDI site or using devtools.

quentin-st commented 7 years ago

:+1: ! Note that we actually have to ship MDI's resources (fonts & pre-parsed icons list) with the extension because Firefox doesn't allow us* to fetch these on runtime.

This forces us to get them before packaging the extension (mostly done in update-icons-list.py). Do you know how we could get the compressed SVGs? I don't know if there is any API out there to do so - the materialdesignicons-webfont.svg doesn't contain the same svg as the one that can be exported from https://materialdesignicons.com/

(* the extension is denied during the review process, that's not a technical limitation)

JamesCoyle commented 7 years ago

Working on getting a json file with the icon names and paths listed. Not sure we have one yet but I've asked Austin/the rest of the mdi team and will update once I know more.

quentin-st commented 7 years ago

Great, thanks!

JamesCoyle commented 7 years ago

https://materialdesignicons.com/custom

You can use the tool here to generate whatever format you require.

quentin-st commented 7 years ago

I just tried this tool, but it doesn't seem to work at all - I'm stuck with a AngularJS error (https://docs.angularjs.org/error/$injector/unpr?p0=IconServiceProvider%20%3C-%20IconService%20%3C-%20CustomController)

I'm trying another way

quentin-st commented 6 years ago

@Templarian: we could use your help on this - is there any way (an API endpoint would be awesome) to get all icons SVG data?

quentin-st commented 6 years ago

I just discovered https://github.com/Templarian/MaterialDesign-SVG - cloning the repo & reading the SVG content (in update-icons-list.py) should do the trick - @Templarien: what do you think?

Templarian commented 6 years ago

@chteuchteu Yea, The two repos -Webfont and -SVG should always have tags for each release. The SVG's are optimized in -SVG perfect for this use. The -SVG repo also has the meta.json fixed with the latest data from the DB.

quentin-st commented 6 years ago

Awesome, thank you! @JamesCoyle : I'll try to implement this soon :-) do you have any UI/UX preferences?

quentin-st commented 6 years ago

@JamesCoyle Here it is! I just pushed it to master. I'd like to rewrite one or two things before deploying this though, stay tuned! :-)

JamesCoyle commented 6 years ago

Awesome! Will make things so much easier :D

quentin-st commented 6 years ago

This has been implemented and is already available in the published extension! This issue can be closed, thank you for the feature idea!