Closed (won't fix)
Project:
Font Awesome Iconpicker
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2016 at 18:06 UTC
Updated:
11 Jul 2018 at 19:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jeffm2001 commentedComment #3
d34dman commentedI agree there could be multiple ways to load font awesome library. As in your case you say you are doing it in your theme. Which means the module won't work as desired if somebody were to switch the theme. How do you suggest we handle that?
Comment #4
jeffm2001 commentedI'm not really sure how to handle that scenario. I guess I would suggest that it's not the responsibility of this module to make sure the font is loaded. The fontawesome-iconpicker library itself doesn't even require FontAwesome — at least according to its README.md: "You can use Font Awesome or another font icon set of your choice".
I think the way I would go is for this module to strongly recommend using the fontawesome module through its documentation and maybe a message in an install hook, but not actually require it.
Comment #5
d34dman commentedI see your point. There is definitely room for improvement.
1. Remove hard dependency to any font library.
2. Expose a status page to give better feedback to the users. (What goes into this page needs to be discussed, ideas welcome).
3. Expose configuration to include/restrict available fonts for Font Awesome Icon Picker. (aka expose settings supported in Font Awesome Icon Picker as drupal configurations).
I would work on these features in a separate branch and push to D.O. when it's more or less usable.
Comment #6
cosmicdreams commentedCan we handle the support of other font libraries in a different issue? I feel that we've achieved the goal of not depending on the fontawesome module.
Comment #7
cosmicdreams commentedComment #8
d34dman commented@cosmicdreams this issue is against 7.x-1.x-dev Have you tested the patch?
Comment #9
thomas.frobieterI think a cleaner way is to stay with the fontawesome library module. Seems like bad practice to me implementing the iconfont just inside the frontend theme. The fontawesome module just needs improved settings, so that we are able to load the iconfont via CDN, library, external (URL) or local (path) - this way you can still store the iconfont inside your custom theme and it will be also available to the backend theme. I will create an feature request for this (==> https://www.drupal.org/project/fontawesome/issues/2931747).
Further more: This is the "Fontawesome Iconpicker" i don't think we should care about other Iconfonts here? Sure .. having an universal Iconfont / Icon API module and an universal Iconpicker module would be much greater .. but the naming here is very clear?!
Update: As i have mentioned in the issue (https://www.drupal.org/project/fontawesome/issues/2931747) we are already able to use local fonts by using a relative path in the "External Library Location" field.
Comment #10
jeffm2001 commentedI agree that we shouldn't care about other icon fonts here, and I was never really suggesting that. My point is that the only thing needed for this module to work is to have the fontawesome font included on the page — it doesn't actually depend on any of the functionality in the fontawesome module.
Many themes already include fontawesome, so for me, I don't want to install an extra module that I don't need. My suggestion is to leave it up to the site builder how they want to include the font, and you could recommend the fontawesome module as an easy way to do it.
Anyway, that's my opinion, but if others don't see it the same way I'll let it go.
Comment #11
truls1502it seems that the patch is meant for a different purpose.
However, regarding the patch you showed is fixed on the issue #2982426: Font Awesome Icon Picker Library - Not found for a different purpose.
If you actually want to remove fontawesome from this module - you should use this one patch.
Comment #12
d34dman commented@JeffM2001,
TLDR;
Makes sense and a valid point. So we should be checking for the presence of the libraries and not the modules itself. In short it is not going to make themer experience better, reason in C.3 below.
Longer Version :
A.) Update as against recent changes done.
A.1. Current state of fontawesome_iconpicker does checks against the library `fontawesome-iconpicker` and `fontawesome` Drupal contrib module.
B.) From what i understand, what @JeffM2001 desires is,
B.1. Make `fontawesome_iconpicker`module depend on `fontawesome-iconpicker` library alone.
B.2. For the said purpose in "1" above dependency to `fontawesome` module should be removed.
C.) My comments,
C.1) It is possible remove the dependency on `fontawesome` from `fontawesome_iconpicker.info`.
C.2) If we implement C.1, as a module maintainer, i would have to check for the presence of `fontawesome` library. So I would revert this patch #2982426: Font Awesome Icon Picker Library - Not found.
C.3) Implementing C.1 and C.2 would mean, theme developer has to ensure they register the library. More information on how it can be done can be found in fontawesome's hook_library_info() - https://cgit.drupalcode.org/fontawesome/tree/fontawesome.module?h=7.x-3..... Also note that if you are using a different backend theme, then fontawesome library has to be loaded in the Backend theme too. This would involve theme developer writing the hook in a module and take care of loading the library on relevant pages.
C.4) So as you can see in C.3, the cost of not having a dependency on fontawesome is much more than having one in this case.
C.5) Why patch in #2 wont be accepted - reason is in C.2.
C.6) If we want C.1 and C.2, plus avoid the experience in C.3... this module can register and load 'fontawesome' library, (this is not what patch in #2 is trying to do btw).
Comment #13
jeffm2001 commentedWhat I was actually suggesting is that as this is a module for the iconpicker, you don't necessarily need to worry about whether the fontawesome font is loaded. It could be done in lots of ways (and doesn't need to be registered as a library).
But I agree that loading it via the fontawesome module is likely the easiest for most site builders, and if as the maintainer you want to make absolutely certain that this module works out-of-the-box with no additional work by the site builder, I won't begrudge you that approach.
Feel free to mark this issue as closed.
Comment #14
truls1502Thank you for the feedback, and I am going to mark the issue as closed.
Please re-open it in case you or someone have a good solution to it.