plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
255 stars 191 forks source link

addon controlpanel icons are broken due to non-supported icon_expr #1236

Closed jensens closed 5 years ago

jensens commented 9 years ago

In controlpanel all addons are needing their own less/css + icon (either font-based or svg-image based). The old icon_expr setting is broken. This is a regression.

  1. it makes no sense to register css for just a simple thing like an icon.
  2. it does not make any sense to load an icon in controlpanel by font. addons have sometimes own icon. generating a font for this reason is just crazy.
  3. in controlpanel used by Managers and Site Administrators only the number of requests per site does not need to get optimized that much.

See also https://community.plone.org/t/adding-icons-to-controlpanel-items-in-plone-5/819/11

agitator commented 9 years ago

+1 for svg icon support

davilima6 commented 9 years ago
  1. I think this was thought considering themes or addons would always provide some CSS but that doesn't seem to be the case.
  2. Actually with the CSS hooks you can use any style, eg: background-image, and this should be the case for most addons. It should be easy, tidier and more performant generating a new Fontello for themes, though.
  3. Agree. Only remember Fontello is used for editors too (toolbar).

So +1 for svg in addon icons via icon_expr. Support was there in all previous Plone, it's just an <img>.

However I ask if this shouldn't be a fallback, yep, another way of doing things. The reason is that I don't think we'd like to have vanilla configlet icons implemented in one way and addons' in another. We could:

  1. Switch Fontello with SVG sprites at least in controlpanel.
  2. Live (forever?) with two solutions on that too. Canonical way would arise with time. Or not.
pigeonflight commented 8 years ago

I think it's okay to have svg a a fallback. I appreciate the value of icon fonts I wouldn't remove them a motivated integrator who is building a full "distribution" could still update fontello for their use cases. For the rest of us who just want to build a redistributable add-on SVG is the way to go.