thiemowmde added a comment.

On IRC @daniel and I decided that we actually want to wrap the whole list of values in another span even if it has only one element.

As argued in the comments in https://gerrit.wikimedia.org/r/317127 I disagree:

The one and only guarantee we want to give is that the output is always a single DOM element (or nothing).

Therefore we must wrap multiple elements in an other span. Otherwise some outputs would be "<span>2001</span>, <span>2002</span>". This would have multiple issues that can all be avoided by wrapping it in something like <span class="wb-statements">…</span>.

If the output is a single DOM element anyway, there is no need to do this. The contrary: It will cause unnecessary confusion if a single statement is wrapped in something that claims to be a list, but is none. This becomes very obvious the moment we support other list renderings. An <ul> with a single element is bad. Instead the element itself should be returned, not wrapped in anything.


TASK DETAIL
https://phabricator.wikimedia.org/T147307

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: hoo, thiemowmde
Cc: gerritbot, Izno, Aklapper, Lydia_Pintscher, daniel, aude, Lucie, thiemowmde, hoo, Lewizho99, Maathavan, D3r1ck01, Wikidata-bugs, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to