humanmade / tachyon-plugin

WordPress plugin for Tachyon
https://engineering.hmn.md/projects/tachyon/
83 stars 15 forks source link

48: Prevent upscaling. #50

Closed peterwilsoncc closed 4 years ago

peterwilsoncc commented 4 years ago

Forked from #49 so I can test easily.

roborourke commented 4 years ago

FWIW the tachyon service itself now prevents upscaling unless zoom is used explicitly. Will do a proper review when I’m back on Monday

roborourke commented 4 years ago

@peterwilsoncc seems to be a conflict now. I'll reviewing these updates - thanks for putting this time in and writing tests, it's very much appreciated!

peterwilsoncc commented 4 years ago

seems to be a conflict now.

For some reason the resizing tests start failing with certain data sets after resolving the conflict even though nothing changes in either the tests or Tachyon class.

Some (and only some) datasets start returning the original WP resized image rather than the tachyon version.

I'm back at work so if nothing jumps out at you, I'll take a look over the weekend.

peterwilsoncc commented 4 years ago

Also, some of the linking tests that come in from master are expected to fail as I wasn't 100% sure what the assertion should be, let's mark the tests incomplete in this branch and I can clarify that with you before fixing them.

peterwilsoncc commented 4 years ago

@roborourke

I've merged in master to resolve the conflict.

The test failures were caused by inadequate cleanup between tests, I've improved cleanup in 5f9fbc50d9f84313bade732ff32691305c42dcd5 but please don't look to closely at the code. Especially the hacks to reset image sizes within Tachy.