SugarIcons and FontAwesome in the same definition

Is it possible to have definitions for both SugarIcons and FontAwesome icons at the same time? For example in the menu bar for a module; we would like the sugaricons to appear for newer versions and font awesome to appear for older versions. Can we define in such a way that either will work? We have Module Loadable Packages that need to work with both older and newer versions of Sugar. 

   array(
        'route' => "#$moduleName/create",
        'label' => 'LNK_NEW_RECORD',
        'acl_action' => 'create',
        'acl_module' => $moduleName,
        'icon' => 'fa-plus',
    ),

   array(
        'route' => "#$moduleName/create",
        'label' => 'LNK_NEW_RECORD',
        'acl_action' => 'create',
        'acl_module' => $moduleName,
        'icon' => 'sicon-plus',
    ),

Parents
  • Hi Jeff,

    As of now yes, we're still loading FontAwesome icons as part of our "deprecation policy", however it will be gone soon.

    You don't need any specific configuration for this to happen.

    If you're updating an icon in metadata, they should just need to have the icon name, ex fa-cog or sicon-settings and it’ll render properly. If this is being added to a template, they can follow normal procedure of fa fa-cog or sicon sicon-settings.

    Again, keep in mind that FA will be gone soon.

    rafa

    SugarCRM | Principal Developer Advocate

  • as noted. I need one set of code that will work with both on-premise instances of Sugar and On-Demand instances. On-Premise customers have FA and will most likely for the next 10 years. How do I add code to handle both situations? Having 2 sets of code is very difficult to manage. We are already running into this for Sugar 11.2.0 Sugar Cloud and Sugar 9 on-premise. 

  • Hi everyone,

    Took me a bit longer to get all the answers I needed to reply it back to you on this matter.

    - To reiterate, SugarIcon is our standard icon library going forward and we expect to expand the number of available icons over time.
    - FontAwesome is deprecated and we plan to remove it as per earlier announcement
    - Here are some alternative paths to explore:
    - You can include FontAwesome in your MLPs as you would with any other code library that isn't part of Sugar core.
    - During a previous FontAwesome upgrade from v3 to v4, we created an open source "Compatibility MLP package" that could be installed to add back v3 icon support for instances that needed that. We're currently exploring doing something similar for this icon library upgrade. : (sugarclub.sugarcrm.com/.../font-awesome-3-2-1-compatibility-package-for-sugar-7-6)

    SugarCRM | Principal Developer Advocate

  • Hello Rafael,

    thank you for your feedback.

    We have the same problem. For example, how to develop a module that should work for Sugar 11.0 and sugar 11.2? Sugar 11.0 will be supported for over a year, we can't build 2 different versions of the modules for that long time.

    if we will use both icon types at the same time, then sicon will be overwritten by fa and fa will no longer work in 11.2 or will even be displayed black on black in dark mode, if we will add "fa" class extra.  Please change this so that sicon overwrites fa, so that we can at least use both at the same time.

Reply
  • Hello Rafael,

    thank you for your feedback.

    We have the same problem. For example, how to develop a module that should work for Sugar 11.0 and sugar 11.2? Sugar 11.0 will be supported for over a year, we can't build 2 different versions of the modules for that long time.

    if we will use both icon types at the same time, then sicon will be overwritten by fa and fa will no longer work in 11.2 or will even be displayed black on black in dark mode, if we will add "fa" class extra.  Please change this so that sicon overwrites fa, so that we can at least use both at the same time.

Children
No Data