Closed (fixed)
Project:
Image Effects
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Jan 2016 at 23:26 UTC
Updated:
1 Feb 2016 at 15:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
hctom... and here comes the patch ;)
Comment #3
hctomComment #4
hctomComment #6
hctomFixed errors that occured during automated tests
Comment #7
hctomComment #8
mondrakeLooks pretty good, thank you!
A few minor points below:
I think it should be part of the if...elseif block just below. Not sure "±0%" is very meaningful, though.
Unnecessary blank line.
This is already in the trait, should be removed.
Comment #9
hctomThanks for the feedback. I changed all your notices and here is the new patch. By the way: I changed "±0%" to "Unchanged" in the effect summary - i guess that makes it better to understand.
Comment #10
mondrakedrupal_placeholder is deprecated so I think we should avoid using it. I think you could use
$this->t('%level', ['%level' => $this->t('Unchanged')]);but I did not try it. also you can simplify a bitComment #11
berdirUsing t() with just a placeholder is IMHO also bad practice. If anything, then use SafeMarkup::format()/FormattableMarkup.
Comment #12
mondrakeAlternatively -
a) introduce a twig template to do the formatting
b) just do
$level = $this->t('Unchanged');which is the simplest, you won't be italicizing it but I do not think it's a big dealComment #13
hctomYeah, I will give the formatting via a template a try ;)
Comment #14
hctom... and here it comes ;) Summary rendered via a template.
Comment #15
hctomArghhh... forget about the last patch as it did not include my latest code base. Here is a new one
Comment #17
mondrakeLooks great. One last thing before RTBC
I think we should also have the effect in the variables, see the
In fact it looks like the color_shift summary is wrong :(
The core's effects all have an 'effect' key.
Comment #18
hctomHell yeah, you are right ;) I looked through the watermark implementation and saw this, but I thought it is not necessary, because it is not used in its template. But looking into the core image effects proves this definitely. So now it is added in the variables and documented in the template.
Additionally I will post a little follow up issue for the wrong color shift summary implementation
Comment #19
mondrakeLooks OK to me now, RTBC
Thanks a bunch - in fact I am the culprit here ;)
Comment #20
slashrsm commentedLooks good to me too.
Comment #22
slashrsm commentedCommitted. Thank you!