Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
responsive_image.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Nov 2014 at 10:45 UTC
Updated:
4 Mar 2015 at 22:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alexpottPatch with unit test.
This is also not critical because we do not provide any responsive image mapping default configuration in core.
Comment #2
wim leersNoticed this problem while reviewing #2260061: Responsive image module does not support sizes/picture polyfill 2.2.
Comment #5
jelle_sComment #6
wim leersYeah, the patch cannot possibly pass, because the config entity has been renamed. Should be a simple reroll though.
Comment #8
sidharrell commentedreroll of #1
Comment #9
sidharrell commentedComment #11
sidharrell commentedmethod names changed.
Comment #13
sidharrell commentedhmmm.
Comment #15
sidharrell commentedoh, no, no, no.
You do not get to win this fight, test failures!
I get to win!
Comment #17
sidharrell commentedgrrr.
Comment #19
alexpottYou need to account for the differences when
image_mapping_typeis equal tosizes. Plus the test needs to test this too.Comment #20
sidharrell commentedthis made it pass locally. It should get a green from testbot.
@alexpott you mean something like this in the unit test:
$entity->addImageStyleMapping('test_breakpoint', '1x', array('sizes'=>array('sizes'=>'??', 'sizes_image_styles'=>'??')));Comment #21
alexpott@sidharrell we need to add dependencies for image styles listed in
sizes_image_stylesif theimage_mapping_typeis sizes.Comment #22
sidharrell commented@alexpott that might be a little beyond me at this point. I don't really understand what the code is doing, I just picked it up for the "Novice" "Needs Reroll" tags.
Comment #23
alexpottAdded dependencies for both types of image style mappings.
Comment #24
alexpottLet's use loadMultiple because then we can't load a non existing image style and it's more performant. ANd we can refactor some similar code in the field formatter.
Comment #25
wim leersThis patch looks awesome! Only found the tiniest of nitpicks, which can be fixed on commit.
Wow, very elegant! :)
Can be
string[], can it not?Comment #26
webchickChanged to string[], and also added a missing space on one of the switch statements.
Committed and pushed to 8.0.x. Thanks!