-
Notifications
You must be signed in to change notification settings - Fork 228
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
[TASK] Add Responsive Images #875
Conversation
$this->tag->setContent($content); | ||
return $this->tag->render(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use new line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done :)
Looks like edge supports src-set |
@@ -185,4 +185,4 @@ public function preprocessSourceUri($source) { | |||
return $source; | |||
} | |||
|
|||
} | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doh! :( sorry added newline there as well
Truly a great addition - thank you! Can you add a test which at least executes a ViewHelper with the new argument? Cheers, |
@cedricziel like this? :) |
Don't merge yet. Looks okay overall but has tremendous potential impact; frontend simulation is removed among other things. Needs proper testing as it affects every image-related ViewHelper. Some CGL issues (missing phpdoc etc) too. |
As i said in irc, i reverted the change in the and i added missing phpdocs in Any other CGL issues i'm blind about? :) |
$this->viewHelperVariableContainer->remove(self::SCOPE, self::SCOPE_VARIABLE_SRC); | ||
|
||
if (FALSE === $this->viewHelperVariableContainer->exists(self::SCOPE, self::SCOPE_VARIABLE_DEFAULT_SOURCE)) { | ||
throw new \Exception('Please add a source without a media query as a default.', 1438116616); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not throw a root-type \Exception
- at the very least it should be a \RuntimeException
since those can be caught in unit tests. In this case I suggest simply throwing a TYPO3\CMS\Fluid\Core\ViewHelper\Exception
since that results in a friendly string output instead of a stack trace.
- added a v:media.picture for breakpoint specific Images - added srcset argument to v:media.image
[TASK] Add Responsive Images
PictureViewHelper is already quite steady. Srcset is still kind of rough around the edges and only added to
v:media.image
so far.