Skip to content
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

Merged
merged 1 commit into from
Aug 8, 2015

Conversation

mneuhaus
Copy link
Member

PictureViewHelper is already quite steady. Srcset is still kind of rough around the edges and only added to v:media.image so far.

$this->tag->setContent($content);
return $this->tag->render();
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use new line

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done :)

@xf-
Copy link
Contributor

xf- commented Jul 30, 2015

@mneuhaus mneuhaus changed the title [WIP][TASK] Add Responsive Images [TASK] Add Responsive Images Jul 31, 2015
@@ -185,4 +185,4 @@ public function preprocessSourceUri($source) {
return $source;
}

}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline please

Copy link
Member Author

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

@cedricziel
Copy link
Member

Truly a great addition - thank you!

Can you add a test which at least executes a ViewHelper with the new argument?

Cheers,
Cedric

@mneuhaus
Copy link
Member Author

mneuhaus commented Aug 6, 2015

@cedricziel like this? :)

@NamelessCoder
Copy link
Member

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.

@mneuhaus
Copy link
Member Author

mneuhaus commented Aug 6, 2015

As i said in irc, i reverted the change in the AbstractMediaViewHelper regarding FrontendSimulation.
I do use the FrontendSimulationUtility instead of the AbstractMediaViewHelper variants in the SourceSetViewHelperTrait which seems to work find in FE + BE.

and i added missing phpdocs in SourceSetViewHelperTrait.

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);
Copy link
Member

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
@NamelessCoder NamelessCoder added this to the VHS 2.3.4 milestone Aug 8, 2015
NamelessCoder added a commit that referenced this pull request Aug 8, 2015
[TASK] Add Responsive Images
@NamelessCoder NamelessCoder merged commit e240319 into FluidTYPO3:development Aug 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants