daniel added a comment.

@thiemowmde wrote

If the output is a single DOM element anyway, there is no need to do this.

Consistency. If you were the poor soul writing a CSS rule for styling values in a statement list, you would hate any special casing here.

The contrary: It will cause unnecessary confusion if a single statement is wrapped in something that claims to be a list, but is none.

I think it causes confusion otherwise.

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.

It's even worse then: If we support <ul> rendering, and we skip it for a single value, the caller would not know whether to expect a block level element, or an inline element.

Your example actually makes me more convinced that we should not have a special case for single values.


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

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

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

Reply via email to