New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove sprites from the themes #13797

Merged
merged 1 commit into from Nov 13, 2017

Conversation

Projects
None yet
3 participants
@nijel
Member

nijel commented Nov 2, 2017

I'd like to get feedback on possibility of removing sprites feature from themes. These days most serves will probably support http/2, so benefit of sprites is pretty much zero, however the code overhead it has is quite significant.

This patch removes the sprites code, however it does not yet fix all testsuite errors, this will be done if we agree this is reasonable thing to do.

Signed-off-by: Michal Čihař michal@cihar.com

Before submitting pull request, please check that every commit:

  • Has proper Signed-Off-By
  • Has commit message which describes it
  • Is needed on it's own, if you have just minor fixes to previous commits, you can squash them
  • Any new functionality is covered by tests
@mauriciofauth

This comment has been minimized.

Show comment
Hide comment
@mauriciofauth

mauriciofauth Nov 2, 2017

Member

I agree.

Member

mauriciofauth commented Nov 2, 2017

I agree.

@ibennetch

This comment has been minimized.

Show comment
Hide comment
@ibennetch

ibennetch Nov 4, 2017

Member

I don't have a strong feeling about this; it's simply not an area where I've followed industry trends. It seems you're right that it isn't a large benefit anymore, and it does cause us maintenance hassle with the code, so I'm fine with removing the sprites.

Related, I wonder if we should incorporate png optimization as part of the release process (or perhaps through some other automated means), so that we don't have to remember to do it manually when adding a new icon. Perhaps the gains from doing so aren't worth the effort we'd put in to it, I doubt we'd really gain that much from running pngcrush on a small icon anyway.

Member

ibennetch commented Nov 4, 2017

I don't have a strong feeling about this; it's simply not an area where I've followed industry trends. It seems you're right that it isn't a large benefit anymore, and it does cause us maintenance hassle with the code, so I'm fine with removing the sprites.

Related, I wonder if we should incorporate png optimization as part of the release process (or perhaps through some other automated means), so that we don't have to remember to do it manually when adding a new icon. Perhaps the gains from doing so aren't worth the effort we'd put in to it, I doubt we'd really gain that much from running pngcrush on a small icon anyway.

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Nov 4, 2017

Member

Okay, I will work on this next week and merge once tests pass.

On the PNG side, I'm not really sure. The pngcrush tool is sometimes not really generating smallest possible image and usually it is best to tweak the things manually depending on number of colors really used in the image. Eg. in Weblate I've ended up with using pngnq + zopflipng for that (but thats for pngs generated from svg): https://github.com/WeblateOrg/weblate/blob/2e4264ebda080547e0ee357e29ff2aeace36bd99/graphics/svg2png.sh#L10-L11

Member

nijel commented Nov 4, 2017

Okay, I will work on this next week and merge once tests pass.

On the PNG side, I'm not really sure. The pngcrush tool is sometimes not really generating smallest possible image and usually it is best to tweak the things manually depending on number of colors really used in the image. Eg. in Weblate I've ended up with using pngnq + zopflipng for that (but thats for pngs generated from svg): https://github.com/WeblateOrg/weblate/blob/2e4264ebda080547e0ee357e29ff2aeace36bd99/graphics/svg2png.sh#L10-L11

nijel added a commit that referenced this pull request Nov 4, 2017

Optimize PNG images with zopfli
See #13797

Signed-off-by: Michal Čihař <michal@cihar.com>

nijel added a commit that referenced this pull request Nov 4, 2017

Optimize PNG images with zopfli
See #13797

Signed-off-by: Michal Čihař <michal@cihar.com>

@nijel nijel changed the title from RFC: Remove sprites from the themes to Remove sprites from the themes Nov 8, 2017

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Nov 13, 2017

Codecov Report

❗️ No coverage uploaded for pull request base (master@f1f011b). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master   #13797   +/-   ##
=========================================
  Coverage          ?   53.42%           
=========================================
  Files             ?      491           
  Lines             ?    81751           
  Branches          ?        0           
=========================================
  Hits              ?    43672           
  Misses            ?    38079           
  Partials          ?        0

codecov bot commented Nov 13, 2017

Codecov Report

❗️ No coverage uploaded for pull request base (master@f1f011b). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master   #13797   +/-   ##
=========================================
  Coverage          ?   53.42%           
=========================================
  Files             ?      491           
  Lines             ?    81751           
  Branches          ?        0           
=========================================
  Hits              ?    43672           
  Misses            ?    38079           
  Partials          ?        0
Remove sprites from the themes
Signed-off-by: Michal Čihař <michal@cihar.com>

@nijel nijel self-assigned this Nov 13, 2017

@nijel nijel added this to the 4.8.0 milestone Nov 13, 2017

@nijel nijel merged commit b2f25b5 into phpmyadmin:master Nov 13, 2017

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
DCO All commits have a DCO sign-off from the author
Scrutinizer Analysis: 15 new issues, 6 updated code elements – Tests: passed
Details

@nijel nijel deleted the nijel:nosprites branch Nov 13, 2017

@nijel nijel referenced this pull request Nov 28, 2017

Merged

Remove get_scripts wrapper to download javascript #13839

4 of 4 tasks complete

ibennetch added a commit that referenced this pull request Dec 1, 2017

Optimize PNG images with zopfli
See #13797

Signed-off-by: Michal Čihař <michal@cihar.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment