Problem/Motivation

In #2286601: [policy] Drop support for browsers that don't support SVG, we decided PNGs were old news and SVG are the future.

Remaining tasks

Remove all PNG equivalents of icons in misc/icons
Removed all references to PNGs in CSS
Remove the SVG modernizr test.

User interface changes

None, for users with modern browsers

API changes

Removal of the SVG modernizr test

Comments

lewisnyman’s picture

Status: Active » Needs review
StatusFileSize
new50.34 KB

That was therapeutic. How many KBs does that removed from the codebase?

nod_’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +ie8

While modernizr was updated in the process, the diff only contains svg test change no other modernizr-related code was changed.

chx’s picture

73 files changed, 7 insertions(+), 404 deletions(-)

GO!

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

We've still got rules that refer to .no-svg in toolbar.icons.css

lauriii’s picture

Status: Needs work » Needs review
StatusFileSize
new4.14 KB
new54.25 KB
tuutti’s picture

Status: Needs review » Reviewed & tested by the community

The patch removes .no-svg leftovers that @alexpott mentioned in his comment #4

lewisnyman’s picture

I quickly grepped no-svg and found nothing. RTBC++

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 9e4300f and pushed to 8.x. Thanks!

  • alexpott committed 9e4300f on 8.x
    Issue #2298039 by lauriii, LewisNyman: Remove all PNG fallbacks for SVG.
    
tim.plunkett’s picture

Status: Fixed » Needs work
Issue tags: -yolo

Well, some of those PNGs were still being used.

YOLO indeed.

Here's the one I hit.

core/modules/simpletest/src/Form/SimpletestResultsForm.php:68:      '#uri' => 'core/misc/icons/ea2800/error.png',
core/modules/update/update.report.inc:64:        $uri = 'core/misc/icons/ea2800/error.png';
tim.plunkett’s picture

$ grep -nr "core/misc/icons.*png" core
core/modules/simpletest/src/Form/SimpletestResultsForm.php:61:      '#uri' => 'core/misc/icons/73b355/check.png',
core/modules/simpletest/src/Form/SimpletestResultsForm.php:68:      '#uri' => 'core/misc/icons/ea2800/error.png',
core/modules/simpletest/src/Form/SimpletestResultsForm.php:75:      '#uri' => 'core/misc/icons/e29700/warning.png',
core/modules/simpletest/src/Form/SimpletestResultsForm.php:82:      '#uri' => 'core/misc/icons/e29700/warning.png',
core/modules/simpletest/src/Tests/SimpleTestTest.php:351:          $ok_url = file_create_url('core/misc/icons/73b355/check.png');
core/modules/update/update.report.inc:50:        $uri = 'core/misc/icons/73b355/check.png';
core/modules/update/update.report.inc:57:        $uri = 'core/misc/icons/e29700/warning.png';
core/modules/update/update.report.inc:64:        $uri = 'core/misc/icons/ea2800/error.png';
core/modules/update/update.report.inc:71:        $uri = 'core/misc/icons/e29700/warning.png';
sqndr’s picture

StatusFileSize
new3.46 KB

I assumed all these lined need a change to *.svg? Don't know how to review this patch?

lewisnyman’s picture

Status: Needs work » Needs review

Yep pretty much, I didn't realise the pngs were being used on their own. Let testbot have at it.

tim.plunkett’s picture

Issue tags: +Needs tests

I think this is worth writing a quick test for.
Both the simpletest results page as well as the update status report are visually broken in HEAD.

steveoliver’s picture

Status: Needs review » Needs work

I'd like to help here. @tim "A quick test" being a file_exists() for each expected system image, or what?

pwolanin’s picture

I'm seeing this also, but not sure a test makes sense unless it's somehow to scan all the admin pages and look for images that are 404

That would be a more useful generic test.

tim.plunkett’s picture

I was just thinking of a test for the status report page.

pwolanin’s picture

@tim.plunkett - checking IMG tags for 404s? If we are going to write a test, it should be non-fragile.

lewisnyman’s picture

hmm, shouldn't these icons be added using CSS anyway?

pwolanin’s picture

@LewisNyman - hmm, actually I think they are on the status page, but IMG tags for simpletest it seems.

Not sure how best to test CSS files for image 404s

lewisnyman’s picture

jwilson3’s picture

Based on the fact that we cant currently test for visual changes from css, and in the interest of getting head un-broken, could #12 be committed, and then a follow-up issue be created to refactor the hardcoded images in simpletest into CSS similar to the status report page. With the status icons built in a consistent way through CSS, the visual regression testing discussion will be made easier.

lewisnyman’s picture

Status: Needs work » Reviewed & tested by the community

Yeah, It feels like this issue has hit a dead end. It's really simple to fix the regression, then we can figure out what's our plan going forward.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 12: no-png-2298039-12.patch, failed testing.

lauriii’s picture

Issue tags: +Needs reroll
lauriii’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new3.45 KB

Decided to reroll the patch..

Status: Needs review » Needs work

The last submitted patch, 26: no-png-2298039-26.patch, failed testing.

Status: Needs work » Needs review

lauriii queued 26: no-png-2298039-26.patch for re-testing.

Status: Needs review » Needs work

The last submitted patch, 26: no-png-2298039-26.patch, failed testing.

lauriii’s picture

Status: Needs work » Needs review
StatusFileSize
new3.32 KB

Rerolled the patch against wrong branch. Remember to change your branch to 8.0.x :)

vijaycs85’s picture

created #2322551: Simpletest module referrring to wrong icon location (.png instead of .svg) and looks like related this issue.

Rerolled the patch against wrong branch. Remember to change your branch to 8.0.x :)

ref: https://twitter.com/alexpott/status/499064691193151488

lewisnyman’s picture

Status: Needs review » Reviewed & tested by the community

This patch is ready to go, unless someone feels we should move the fix to the newly created issue.

vijaycs85’s picture

Looks good. +1 for RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 0aaa1c8 and pushed to 8.0.x. Thanks!

  • alexpott committed 0aaa1c8 on 8.0.x
    Issue #2298039 followup by lauriii, sqndr: Remove all PNG fallbacks for...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.