Jump to content

Topic on Talk:Contributors/Projects/Columns for references

RexxS (talkcontribs)

On the English Wikipedia, we use the "magic word" #tag to implement Template:Reflist so that group names can be passed as well. However, to test the new responsive features before asking for a config change, we really need the full syntax for <references responsive>, otherwise #tag will close it with </references responsive>, which is not what is wanted. So to explicitly enable the feature, should it be references responsive="1", or references responsive="true", or references responsive="responsive", or what? Knowing the preferred syntax will allow constructs like #tag:references|{{{refs|}}}|responsive="1"|group={{{group|}}} etc.

TheDJ (talkcontribs)
RexxS (talkcontribs)

@TheDJ: Indeed it does. I had already guessed at a value when setting up en:wp:Template:Reflist/sandbox3 ready to test on Thursday, but I'm always wary of making assumptions about how someone else has coded undocumented features, in case they change their mind later. If responsive="1" is the attribute value currently being used, then I'll stick with that. FWIW, I favour "true"/"false" for binary values, with "yes"/"no" a second choice, when proper boolean types are not available.

Billinghurst (talkcontribs)

just asking if responsive is left nude responsive="" which behaviour will it undertake?

Vriullop (talkcontribs)

list-style-type on this template is not working in enwiki and other wikis. I wonder if it is list-style-type:inherit defined at en:Mediawiki:Common.css.

RexxS (talkcontribs)
Vriullop (talkcontribs)

My fault, I messed the syntax. BTW, in enwiki the responsive parameter raises a cite error in Template:Reflist/sandbox en:Special:Permalink/770590439, while in other wikis it does not.

RexxS (talkcontribs)

Yes I noticed that on the simplified sandbox I prepared to test responsive (Reflist/sandbox3). The deployment of 1.29.0-wmf.15->1.29.0-wmf.16 is scheduled for 19:00–21:00 UTC today, so it's probably best to review things on enwiki after it's live.

RexxS (talkcontribs)

The roll-out seems to have fixed the errors and the column changing is working as advertised, although the column width at around 39em may be a tad wide for some tastes.

I can confirm that the syntax {#tag:references||responsive=1} is functional if anybody needs to re-write templates.

The only downside I've found so far is that applying a list-style-type to a containing div doesn't work "out-of-the-tin" as it used to. That will make having the list-style as a parameter to a wrapper template just a bit messier until we've sorted out the CSS.

RexxS (talkcontribs)

The CSS is now sorted, thanks to @Vriullop - we now have a working sandbox version of template Reflist on enwiki that uses the responsive code.

Jdforrester (WMF) (talkcontribs)

Hey all, just to clarify, MediaWiki treats all HTML-like tags' attribute values except "0" – even no value — as truthy, which is why we suggest people write <references responsive /> and <references responsive="0" /> rather than more explicitly spelling it out; that said, <references responsive="1" /> should definitely work, as should <references responsive="at this point I'm just wasting bytes" />. HTH!

RexxS (talkcontribs)

I'm sure you'll have remembered by now, @Jdforrester (WMF), that any template using #tag: requires values for its named parameters, so we can write #tag:references||responsive="at this point I'm just wasting bytes" if you wish, but we can't write #tag:references||responsive as that doesn't work. It's true that #tag:references||responsive= does work though.

Reply to "Actual syntax"