[Phpmyadmin-devel] Problems in Sprites implementation
rouslan at placella.com
Tue Sep 27 18:35:06 CEST 2011
I find that there are a number of problems with the current
implementation of the CSS sprites in phpMyAdmin. So I took the time fix
them and I'd appreciate some feedback on this.
First of all, adding/removing icons to/from the sprites, as described in
the Wiki is a cumbersome manual process. So I've created a shell
script, "scripts/generate-sprites", that completely automates this
process (requires ImageMagick). This script is also called from
"create-release.sh" for good measure.
Another issue is that PMA is not aware of the presence of the sprites.
This means that all themes for older versions of PMA won't display any
icons, since PMA will just blindly apply the new sprites classes (which
don't exists in these older themes) to icons. Also, developers are
required to pass an extra argument to "PMA_getIcon()" to indicate that a
particular icon is not available as a sprite. This IMO should be
avoided. To fix these issues I created two new function, both are called
functions read data that is generated by the "generate-sprites" script
and make PMA aware of which icons are available as sprites and which
ones aren't for every theme.
The code is available for scrutiny in the "sprites" branch of my public
So, if there are no objections, I will merge with master in a few days
time and update the relevant Wiki page to reflect this change.
More information about the Developers