Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
theme system
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Jun 2015 at 13:34 UTC
Updated:
4 Sep 2015 at 16:54 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #1
star-szrIt would probably be nice to have SafeMarkup::implode (or ::join) again (#1825952: Turn on twig autoescape by default) for cases like this rather than this roundabout way.
Comment #2
star-szrPostponed on some further discussion on #2501975: Determine how to update code that currently joins strings in SafeMarkup::set() for now.
Comment #3
cilefen commentedRelated: #2505931: Remove SafeMarkup::set in ViewListBuilder
Comment #4
star-szrComment #5
akalata commentedNo longer blocked, though the discussion in #2501975: Determine how to update code that currently joins strings in SafeMarkup::set() might be valuable to identify the best solution in this case.
Comment #6
akalata commentedPostponed for real on #2505931: Remove SafeMarkup::set in ViewListBuilder. Whatever pattern we find works there can most likely be used here as well.
Comment #7
akalata commentedComment #8
stefan.r commentedThis may work once #2505931-170: Remove SafeMarkup::set in ViewListBuilder is in.
Comment #9
wim leers#2505931: Remove SafeMarkup::set in ViewListBuilder just landed :)
Comment #10
dawehnerPerfect!
Comment #11
stefan.r commentedThis needs to be updated still
Comment #12
stefan.r commentedComment #13
stefan.r commentedComment #14
Anonymous (not verified) commentedThe patch in #12 doesn't work, or at least broke something:
Comment #15
stefan.r commentedAh yes, that was wrong
Comment #16
Anonymous (not verified) commentedManual testing gives me the same result as #14.
And given that #12 came up green, we are missing coverage.
Comment #17
stefan.r commented@pjonckiere did you test #15? Against HEAD? Because it works fine for me:
I'm not sure about this needing automated tests, the
item_listalready has test coverage so asserting for the correct output of that theme function (ie. a<ul class="comma-list">etc.) in every single caller seems a bit redundant? We also can't assert for the comma list as it's CSS based, so this would need to be tested manually.If anything asserting that the field list is not empty would be a nice to have for the future?
Comment #18
Anonymous (not verified) commentedYes. The IS specifies to look at the "Used in Views" tab. Based on your screenshot, I think you are looking at the "Entities" tab?
I was more thinking of a "is the output there" kind of test. But fair enough.
Comment #19
Anonymous (not verified) commentedFwiw, I see following in my source:
Comment #20
stefan.r commentedAh, that makes sense, thanks!
Comment #21
stefan.r commentedAdded that test and this should fix the issue from #18
Comment #22
Anonymous (not verified) commentedNow it's working, but a space got lost (cf screenies). I would think that a list_type of "comma-list" would do that for you, but that doesn't seem to be the case.
Other than that, the fix and the test look good to me!
Comment #23
stefan.r commentedI just manually tested myself and it didn't have the CSS issue (Firefox). Do you have the same problem in the comma separated item lists on admin/structure/views? Which browser was this?
Comment #24
wim leersNit: no need to create this variable. Just do:
(You only want to assign it to a variable if you're going to use the variable.)
Can be fixed on commit, or not at all :) Doesn't really matter.
Comment #25
alexpottCommitted 9f85d56 and pushed to 8.0.x. Thanks!
Didn't fix the unused variables... it's a test :)