johno / ember-cli-material-design-icons

Components for Google's Material Design Icons library
MIT License
13 stars 2 forks source link

Refactor to use fonts from bower #11

Open jhr007 opened 9 years ago

jhr007 commented 9 years ago

Rather than commiting the fonts in this repo, I think this repo should be refactored to include the fonts from a bower package whose purpose is to keep up to date with the material design icons.

I followed johnotander's guide to convert this add on to use the mdi bower package.

The only issue I saw was there isn't a chat icon(from read me examples), but I'm not sure if mdi' icons are older or if this icon was removed or this repo is tracking a different material design inspired icons.

FWIW, I don't see 'chat' on https://materialdesignicons.com

jhr007 commented 9 years ago

FWIW:

https://github.com/jhr007/ember-cli-material-design-icons/commit/25166753e807fb93933c015ef2d521c834eeeca4

I didn't remove the vendor folder in this commit.

johno commented 9 years ago

:+1: If you'd like to open up a PR for this commit, I'd be happy to merge :smile_cat:

jhr007 commented 9 years ago

Sure thing!

Might be a day or two for post proof-of-concept clean up

Should I remove vendor folder too?

jhr007 commented 9 years ago

update...

I originally suggested this change so this repo could focus on ember and not have to update based on the changes of another repo.

Looking further into MDI, It's in need of an update and it's not just a wrapper for Google's icons like I originally thought.

ex: You can find a chat icon on: Google's icons http://www.google.com/design/icons/

but not here: bower mdi: https://materialdesignicons.com/

mdi is a wrapper that includes a bunch of icons from the community as well some Google icons.

In searching for an alternative to mdi, I have been unable to find a package that does follow Google's webfont icons.

RFC/naive questions:

Google's MDI on git checkout is 337 MB which is what I was trying to downsize just to update the webfonts. Does Ember(ember-cli) include all 300mb in vendor?

Maybe a webfont wrapper can still be found under a hard to find name...

Maybe a more automated script to help in the update is a better resolution?

johno commented 9 years ago

Well that's a bummer. A nice Bower package would be ideal. Thanks for looking into that and including an update, @jhr007 ! :beers:

Google's MDI on git checkout is 337 MB which is what I was trying to downsize just to update the webfonts. Does Ember(ember-cli) include all 300mb in vendor?

The majority of the 337MB from the git checkout is the git history, which won't be included. However, that's not to say that this addon is lightweight, as it is probably around ~400KB.

Ember-cli will include everything in vendor, however the CSS file that is loaded is ~41KB before minification. The majority of the weight is in the fonts, where each is roughly ~100KB. Luckily, the client will only download one of the fonts that's listed in the @font-face property. So, the user is downloading ~140KB before minification and gzipping.

Maybe a webfont wrapper can still be found under a hard to find name...

Upon my searching, I couldn't find anything too useful, so I initially was using an unofficial icon font.

Maybe a more automated script to help in the update is a better resolution?

I imagine this is the best option to go with until Google releases an officially supported icon font. Potentially down the road, we could also adopt an svg only implementation, too (this might be the best, and lightest weight, option).

jhr007 commented 9 years ago

Found the upstream issue on Google's Material Design Icon repo: https://github.com/google/material-design-icons/issues/133

As an alternative, one poster created this Bower package for just fonts, until Google comes up with alternatives that svg/font specific.

bower install material-design-icons-iconfont --save
johno commented 9 years ago

Awesome! Looks like this might be the route to go for the time being.

vanor89 commented 8 years ago

Hi guys, what are we currently doing to keep this updated, may I branch and update as I need? The community could help out keep it updated if there is not a more elegant solution for the time being.

johno commented 8 years ago

Hey @CarlosV89, there isn't currently an elegant way to keep things updated. You can absolutely branch and update. That would be much appreciated! I will try to set aside some time to set up a more elegant update solution in the future.