Talk:Contributors/Projects/Columns for references

Jump to: navigation, search

About this board

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)

Does this answer your question ?

https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Template:Reflist&diff=353314&oldid=179860

As far as I understand it can actually be anything but 0, but 1 seems most logical.

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)

I'm not sure which template you mean, @Vriullop, but Template:Reflist on enwiki is working as normal with the five preset list style types. There's a previous discussion at https://en.wikipedia.org/wiki/Template_talk:Reflist#list-style-type_on_other_wikis of some issues that may be relevant to your problem.

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"
Vriullop (talkcontribs)

How do I apply the responsive behavior in reference like lists not using the reference tag? For example in en:Template:Refbegin. Obviouly this template should be complemented with a new "Refitem" template adding some class to each item.

Jdforrester (WMF) (talkcontribs)

You can't. Templates like that continue to be hacks that are not supported, I'm afraid.

IKhitron (talkcontribs)

Finally somebody else thinks these splitted templates should not be here, and it's not just me , Jdforrester (WMF).

Whatamidoing (WMF) (talkcontribs)

In terms of improving accessibility, you might look at the work that User:RexxS was planning for w:en:Template:Reflist recently (look in /Sandbox2, I believe), to eliminate fixed numbers of columns (e.g., pages that always use three columns, no matter how narrow a reader's screen is, which can look very bad). That work has been overtaken by this change, but it might be an improvement over what the refbegin template is currently doing.

Reply to "Template refbegin"
Billinghurst (talkcontribs)

(just confirming) At English Wikisource we have had built into the templates the components for different browsers. I am presuming that is all left out of the extension and should be pumped into global.css. Thanks.

Jdforrester (WMF) (talkcontribs)

I don't understand your question.

The code to support multi-column references lives in the Cite repo and supports Chrome/Firefox/Opera/Safari/IE/Edge as normal. Nothing needs to be added to "global.css" (I presume you mean Common.css?)

Billinghurst (talkcontribs)

Thx @Jdforrester (WMF) I did mean commons.css. The link is useful, especially for those who struggle find code-snippets like that in the morass of places.

Jdforrester (WMF) (talkcontribs)

Sure. :-) As always, please don't add anything Common.css unless you have an incredibly good reason to do so, as it slows down the site for all users; in general we can set things in config instead (and if we can't, we can build it).

Reply to "For browsers ..."
There are no older topics