@robocoder opened this Issue on September 3rd 2009 Contributor

Reason: reducing the number of http connections may result in pages loading faster.

Proposed icon sets for conversion:

  • plugins/UserSettings/images
  • plugins/UserCountry/flags

Note: there are a mix of icon sizes in plugins/UsersSettings, mostly 14x14 and 16x16 with a few odd ones:

  • browsers/ep.gif 12x14
  • plugins/java.gif 13x18
  • screens/dual.gif 17x19
  • screens/normal 15x18
  • screens/wide 15x15

For consistency, these should be resized (refreshed from full size images, if possible) to 16x16 for consistency.

@mattab commented on September 8th 2009 Owner

CSS sprites would be very useful for country flags too.

Ideally, a script would be run that would take the list of input images, and build the merged version, as well as build the map in a php array of the X/Y offsets of the sprite. I have heard of open source library to do this already, for example: http://csssprites.org/. This one seems to be the best practise to use: reference the logos in the CSS file, and the tool parses the CSS and builds the sprite version.

@mattab commented on September 8th 2009 Owner

when adding this feature, there should be a quick README explaining: How to add a new logo for a flag, or a new browser? Setup the css, run the script to convert the css, etc.

@mattab commented on November 10th 2009 Owner

CSS sprites, if added as a feature, should not add overhead to the developper's time of building new UI or adding new logos in the Piwik release. vipsoft, what are your thoughts about this new feature and its implementation?

@robocoder commented on November 10th 2009 Contributor

Using sprites isn't all or nothing.

I recommend that we only use sprites where:

  • there is a homogeneous set of related images
  • an image is not considered part of a theme or Piwik brand
  • the development state of the plugin and its images is relatively stable (i.e., not alpha/beta)

Proposal:

  • Convert country flags, browsers, os, and plugins images to sprites
    • these are generally very static (an exception was the flag update in #849)
    • if a developer adds a new image, he/she can simply be add it to the .css file; we're not forced to regenerate the sprites at any time
  • Add a script or procedure to regenerate those sprites
  • Code and/or template mods to use those sprites
  • Continue to distribute the individual image files
@mattab commented on January 13th 2014 Owner

Probably too tricky with the new Theming feature

@bittner commented on January 7th 2015

+1

CSS sprites in the following plugins would significantly increase (perceived) loading and display time of the Dashboard:

As of today the Dashboard flickers and quivers for quite a few seconds, mainly when displaying the visitors panel, until all images are loaded.

This Issue was closed on January 13th 2014
Powered by GitHub Issue Mirror