[Phpmyadmin-devel] PMA Icon Spritify

Hi, I've got a huge patch ready. In my branch 'sprites' I have replaced the majority of all pma icons with sprites. This gives us the following advantages - In a few tests I saw that the overall amount of GET requests now has been reduced by 20-33% depending on the loaded page - In the process I removed all width/height attributes, and instead moving this style related property into the stylesheet file. This will also allow for much greater flexibility for theme makers. - The code altogether is easier to read. No more theme path required anymore. Example: - . ($cfg['MainPageIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 's_vars.png" width="16" height="16" alt="" />' : '') + . ($cfg['MainPageIconic'] ? '<img class="icon ic_s_vars" src="themes/dot.gif" alt="" />' : '') Notes about the change: - The stylesheets now contain for each icon "name.png" a class "ic_name" that needs to be applied. - Sprites and CSS were automatically generated using http://spritegen.website-performance.org/ - this can be used to update the sprite data at a later point - I have not replaced the following icons for now: - Icons bigger than 16x16 - Icons being used with PMA_buttonOrImage() or PMA_linkOrButton() - CSS: Icons used as list-style-image or background-image - PMA_getIcon() now translates 'sdf.png' into a 'ic_sdf' class - Many help icons were sized 11x11 although the icon itself is 16x16. I changed this to 16x16, but using an extra class 'ic_b_help_s', so they can be still sized 11x11, if necessary. - I tested all pma pages I could reach with my local configuration, but there might be still some typos around. - I have merged my tree with the master branch yesterday (though a bit too late), so if we merge my code to master soon it should result in little merge conflicts.

Le 2011-07-15 03:41, Tyron Madlener a écrit :
Hi, I've got a huge patch ready. In my branch 'sprites' I have replaced the majority of all pma icons with sprites. This gives us the following advantages
- In a few tests I saw that the overall amount of GET requests now has been reduced by 20-33% depending on the loaded page - In the process I removed all width/height attributes, and instead moving this style related property into the stylesheet file. This will also allow for much greater flexibility for theme makers. - The code altogether is easier to read. No more theme path required anymore. Example:
Tyron, about removing $cfg['ThemePath'], I have a small objection (small because I appreciate your work but we have to think about others). The ThemePath is configurable to allow anyone (a distro, a sysadmin) to use a chosen directory containing themes. Can we keep this flexibility and still use sprites? -- Marc Delisle http://infomarc.info

On Fri, Jul 15, 2011 at 4:25 PM, Marc Delisle <marc@infomarc.info> wrote:
Le 2011-07-15 03:41, Tyron Madlener a écrit :
Hi, I've got a huge patch ready. In my branch 'sprites' I have replaced the majority of all pma icons with sprites. This gives us the following advantages
- In a few tests I saw that the overall amount of GET requests now has been reduced by 20-33% depending on the loaded page - In the process I removed all width/height attributes, and instead moving this style related property into the stylesheet file. This will also allow for much greater flexibility for theme makers. - The code altogether is easier to read. No more theme path required anymore. Example:
Tyron, about removing $cfg['ThemePath'], I have a small objection (small because I appreciate your work but we have to think about others).
The ThemePath is configurable to allow anyone (a distro, a sysadmin) to use a chosen directory containing themes. Can we keep this flexibility and still use sprites?
No no, I didn't propose to remove $cfg['ThemePath']. It's just not required any more when using icon sprites, because the theme path is already supplied in the css file. So it does require it, but you don't have to supply it for every icon you add. It would just be helpful to have dot.gif at a static place, since it will always stay the same, no matter how the theme is built
-- Marc Delisle http://infomarc.info
------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel

Hi Dne Fri, 15 Jul 2011 10:41:32 +0300 Tyron Madlener <tyronx@gmail.com> napsal(a):
Hi, I've got a huge patch ready. In my branch 'sprites' I have replaced the majority of all pma icons with sprites. This gives us the following advantages
How does it affect browser compatibility?
- Sprites and CSS were automatically generated using http://spritegen.website-performance.org/ - this can be used to update the sprite data at a later point
But you've deleted the original images from the git repo, I think they should be kept for possible later updates. Also process of regenerating sprites should be documented. Also the original theme seems to be broken in your branch. -- Michal Čihař | http://cihar.com | http://blog.cihar.com

Hi Tyron Any answers to questions bellow? Dne Tue, 19 Jul 2011 14:04:20 +0200 Michal Čihař <michal@cihar.com> napsal(a):
Dne Fri, 15 Jul 2011 10:41:32 +0300 Tyron Madlener <tyronx@gmail.com> napsal(a):
Hi, I've got a huge patch ready. In my branch 'sprites' I have replaced the majority of all pma icons with sprites. This gives us the following advantages
How does it affect browser compatibility?
- Sprites and CSS were automatically generated using http://spritegen.website-performance.org/ - this can be used to update the sprite data at a later point
But you've deleted the original images from the git repo, I think they should be kept for possible later updates. Also process of regenerating sprites should be documented.
-- Michal Čihař | http://cihar.com | http://blog.cihar.com

On Thu, Jul 21, 2011 at 2:48 PM, Michal Čihař <michal@cihar.com> wrote:
Hi Tyron
Any answers to questions bellow?
I actually wrote 2 days ago but yet again, I've replied to you personally instead of replying to the mailing list >.<
Dne Tue, 19 Jul 2011 14:04:20 +0200 Michal Čihař <michal@cihar.com> napsal(a):
Dne Fri, 15 Jul 2011 10:41:32 +0300 Tyron Madlener <tyronx@gmail.com> napsal(a):
Hi, I've got a huge patch ready. In my branch 'sprites' I have replaced the majority of all pma icons with sprites. This gives us the following advantages
How does it affect browser compatibility?
Shouldn't be any problem. Many major websites use it, like the Google main page.
- Sprites and CSS were automatically generated using http://spritegen.website-performance.org/ - this can be used to update the sprite data at a later point
But you've deleted the original images from the git repo, I think they should be kept for possible later updates.
Yes, that's why I have re-added them in a later commit :-)
Also process of regenerating sprites should be documented.
Yea, the way I did it for the original theme now is take the sprites-block from theme_right.css.php, applied a bunch of regexps from my favorite editor to turn 'ic_sdf { ... }' into 'sdf.png', regexp'd it further to a php array and with 3 lines of php code copied all these image files to a new folder. That I zip together with any new sprites I need and use above mentioned generator. I can write a small php script to do that, but my shell script skills are not that great :-(
Also the original theme seems to be broken in your branch.
Yes, I forgot to adjust original. This is fixed now.

Hi Dne Thu, 21 Jul 2011 15:05:26 +0300 Tyron Madlener <tyronx@gmail.com> napsal(a):
On Thu, Jul 21, 2011 at 2:48 PM, Michal Čihař <michal@cihar.com> wrote:
Hi Tyron
Any answers to questions bellow?
I actually wrote 2 days ago but yet again, I've replied to you personally instead of replying to the mailing list >.<
I probably missed that one, sorry.
Dne Tue, 19 Jul 2011 14:04:20 +0200 Michal Čihař <michal@cihar.com> napsal(a):
Dne Fri, 15 Jul 2011 10:41:32 +0300 Tyron Madlener <tyronx@gmail.com> napsal(a):
Hi, I've got a huge patch ready. In my branch 'sprites' I have replaced the majority of all pma icons with sprites. This gives us the following advantages
How does it affect browser compatibility?
Shouldn't be any problem. Many major websites use it, like the Google main page.
Okay, sounds good.
- Sprites and CSS were automatically generated using http://spritegen.website-performance.org/ - this can be used to update the sprite data at a later point
But you've deleted the original images from the git repo, I think they should be kept for possible later updates.
Yes, that's why I have re-added them in a later commit :-)
Also process of regenerating sprites should be documented.
Yea, the way I did it for the original theme now is take the sprites-block from theme_right.css.php, applied a bunch of regexps from my favorite editor to turn 'ic_sdf { ... }' into 'sdf.png', regexp'd it further to a php array and with 3 lines of php code copied all these image files to a new folder.
Please can you write wiki page with step by step instructions? I can make script to automate that later. Otherwise I think it is okay, I'm going to merge it in few minutes. -- Michal Čihař | http://cihar.com | http://blog.cihar.com

On Thu, 2011-07-21 at 15:45 +0200, Michal Čihař wrote:
Hi
Dne Thu, 21 Jul 2011 15:05:26 +0300 Tyron Madlener <tyronx@gmail.com> napsal(a):
On Thu, Jul 21, 2011 at 2:48 PM, Michal Čihař <michal@cihar.com> wrote:
Hi Tyron
Any answers to questions bellow?
I actually wrote 2 days ago but yet again, I've replied to you personally instead of replying to the mailing list >.<
I probably missed that one, sorry.
Dne Tue, 19 Jul 2011 14:04:20 +0200 Michal Čihař <michal@cihar.com> napsal(a):
Dne Fri, 15 Jul 2011 10:41:32 +0300 Tyron Madlener <tyronx@gmail.com> napsal(a):
Hi, I've got a huge patch ready. In my branch 'sprites' I have replaced the majority of all pma icons with sprites. This gives us the following advantages
How does it affect browser compatibility?
Shouldn't be any problem. Many major websites use it, like the Google main page.
Okay, sounds good.
- Sprites and CSS were automatically generated using http://spritegen.website-performance.org/ - this can be used to update the sprite data at a later point
But you've deleted the original images from the git repo, I think they should be kept for possible later updates.
Yes, that's why I have re-added them in a later commit :-)
Also process of regenerating sprites should be documented.
Yea, the way I did it for the original theme now is take the sprites-block from theme_right.css.php, applied a bunch of regexps from my favorite editor to turn 'ic_sdf { ... }' into 'sdf.png', regexp'd it further to a php array and with 3 lines of php code copied all these image files to a new folder.
Please can you write wiki page with step by step instructions? I can make script to automate that later.
Otherwise I think it is okay, I'm going to merge it in few minutes.
Just noticed that the + and - icons that are used in the navigation frame when $cfg['LeftFrameLight']=false are broken. Instead, an arrow pointing down is now shown for both. I think that the JS code that handles changing these icons is written specifically for images, not sprites, and needs to be looked at. Rouslan

Le 2011-07-21 14:22, Rouslan Placella a écrit :
On Thu, 2011-07-21 at 15:45 +0200, Michal Čihař wrote:
Hi
Dne Thu, 21 Jul 2011 15:05:26 +0300 Tyron Madlener<tyronx@gmail.com> napsal(a):
On Thu, Jul 21, 2011 at 2:48 PM, Michal Čihař<michal@cihar.com> wrote:
Hi Tyron
Any answers to questions bellow?
I actually wrote 2 days ago but yet again, I've replied to you personally instead of replying to the mailing list>.<
I probably missed that one, sorry.
Dne Tue, 19 Jul 2011 14:04:20 +0200 Michal Čihař<michal@cihar.com> napsal(a):
Dne Fri, 15 Jul 2011 10:41:32 +0300 Tyron Madlener<tyronx@gmail.com> napsal(a):
Hi, I've got a huge patch ready. In my branch 'sprites' I have replaced the majority of all pma icons with sprites. This gives us the following advantages
How does it affect browser compatibility?
Shouldn't be any problem. Many major websites use it, like the Google main page.
Okay, sounds good.
- Sprites and CSS were automatically generated using http://spritegen.website-performance.org/ - this can be used to update the sprite data at a later point
But you've deleted the original images from the git repo, I think they should be kept for possible later updates.
Yes, that's why I have re-added them in a later commit :-)
Also process of regenerating sprites should be documented.
Yea, the way I did it for the original theme now is take the sprites-block from theme_right.css.php, applied a bunch of regexps from my favorite editor to turn 'ic_sdf { ... }' into 'sdf.png', regexp'd it further to a php array and with 3 lines of php code copied all these image files to a new folder.
Please can you write wiki page with step by step instructions? I can make script to automate that later.
Otherwise I think it is okay, I'm going to merge it in few minutes.
Just noticed that the + and - icons that are used in the navigation frame when $cfg['LeftFrameLight']=false are broken. Instead, an arrow pointing down is now shown for both. I think that the JS code that handles changing these icons is written specifically for images, not sprites, and needs to be looked at.
Rouslan
In the navigation panel, the small icon for views is also broken (previous name was s_views.png). -- Marc Delisle http://infomarc.info

On Thu, 2011-07-21 at 15:13 -0400, Marc Delisle wrote:
Le 2011-07-21 14:22, Rouslan Placella a écrit :
On Thu, 2011-07-21 at 15:45 +0200, Michal Čihař wrote:
Hi
Dne Thu, 21 Jul 2011 15:05:26 +0300 Tyron Madlener<tyronx@gmail.com> napsal(a):
On Thu, Jul 21, 2011 at 2:48 PM, Michal Čihař<michal@cihar.com> wrote:
Hi Tyron
Any answers to questions bellow?
I actually wrote 2 days ago but yet again, I've replied to you personally instead of replying to the mailing list>.<
I probably missed that one, sorry.
Dne Tue, 19 Jul 2011 14:04:20 +0200 Michal Čihař<michal@cihar.com> napsal(a):
Dne Fri, 15 Jul 2011 10:41:32 +0300 Tyron Madlener<tyronx@gmail.com> napsal(a):
> Hi, I've got a huge patch ready. In my branch 'sprites' I have > replaced the majority of all pma icons with sprites. This gives us the > following advantages
How does it affect browser compatibility?
Shouldn't be any problem. Many major websites use it, like the Google main page.
Okay, sounds good.
- Sprites and CSS were automatically generated using http://spritegen.website-performance.org/ - this can be used to update the sprite data at a later point
But you've deleted the original images from the git repo, I think they should be kept for possible later updates.
Yes, that's why I have re-added them in a later commit :-)
Also process of regenerating sprites should be documented.
Yea, the way I did it for the original theme now is take the sprites-block from theme_right.css.php, applied a bunch of regexps from my favorite editor to turn 'ic_sdf { ... }' into 'sdf.png', regexp'd it further to a php array and with 3 lines of php code copied all these image files to a new folder.
Please can you write wiki page with step by step instructions? I can make script to automate that later.
Otherwise I think it is okay, I'm going to merge it in few minutes.
Just noticed that the + and - icons that are used in the navigation frame when $cfg['LeftFrameLight']=false are broken. Instead, an arrow pointing down is now shown for both. I think that the JS code that handles changing these icons is written specifically for images, not sprites, and needs to be looked at.
Rouslan
In the navigation panel, the small icon for views is also broken (previous name was s_views.png).
Also, in the navigation frame, the icon that is inside the "create table" button is broken.
participants (4)
-
Marc Delisle
-
Michal Čihař
-
Rouslan Placella
-
Tyron Madlener