kevinpapst / TablerBundle

Tabler.io bundle for Symfony 6 - admin theme for easy integration, coming with Bootstrap 5.3, Webpack-Encore integration and many more features...
MIT License
88 stars 18 forks source link

Tabler icons VS FontAwesome #17

Open cavasinf opened 2 years ago

cavasinf commented 2 years ago

As i can see from Tabler.io, they have implemented there own icon lib.

I assumed you also use FontAwesome.

What is the "work around" of the icons param in tabler.yml. Are you whiling to add each FontAwesome you will use in that config part ? How are you gonna make the distinct between fas and far ?

I'm not sure if its a good idea to have that. Unless there is something that oblige us to do that.

kevinpapst commented 2 years ago

Which is nice, yes! We should try to enhance the tabler_icon() twig function to support both libraries in the long run. I wanted to use tabler icons, but it was simply impossible in my own project to switch (too many font awesome references in all kinds of code), so I started with FontAwesome. I found handling inline SVG icons to be much more complicated than a bunch of css classes.

If you have ideas how to abstract, so we could offer both, that Ould be fantastic.

cavasinf commented 2 years ago

I've made a mistake by pressing CTRL + Enter, which submit the issue.. I've updated my issue with more information. Sorry

kevinpapst commented 2 years ago

I found it to be extremely helpful and use it since years.

The actual list in the config is just an example and should be extended by the user for his own use-cases.

You have the option to still write <i class="fas fa-home"></i> in all your templates or you use {{ tabler_icon('home') }} which generates the correct code. Latter has two advantages: you (the theme maintainer) could relatively easy change the icon implementation and you (the theme users) switch the used icon, by changing it in one location (config) - which is much better than search&replace in dozens of twig files.

We could move it to the demo app instead, but I am a fan of that "icon abstraction layer".

cavasinf commented 2 years ago

OK I understand now. My though was in the "configuration way" of the bundle. Now, with what you said, it's more in the "use way" but not especially for TablerBundle.

The fact that those "shortcuts" are in the tabler.yml confuse me. I think it's a good idea to have that, but we need to document/comment those settings for future devs I guess.

kevinpapst commented 2 years ago

Yes, we need to document a lot. And I would start if there would be time available 😞 I try to setup a demo app soon, that proved to be a great way to test and document the theme with the AdminLTE theme and it will be the same here.