Jump to content

Talk:Contributors/Projects/Columns for references

About this board

Neolexx (talkcontribs)

"2 or 3 columns" - does it mean that 3 is the maximum? or can be 4, ...? in default behavior I mean on some really wide screen.

Whatamidoing (WMF) (talkcontribs)

I don't know the answer, although I imagine that there is a limit. One wouldn't want to see 10 refs in 10 columns, no matter how wide the screen.

If you are interested in the difficulty of reading on a really wide screen, then you may be interested the Reading/Web/Desktop Improvements project.

Neolexx (talkcontribs)

I played a bit with zooming on my test page and I couldn't find any limit. At least 11 notes in 6 columns can be easily be: w:ru:File:Zoom50.png

Some unmerciful and unstoppable prettyprint, to my eyes, starting from the 11th note (up to 10 notes is always in one column at any screen, test page)

Me personally - it never bothered me too much. With my page zoom which is comfortable to me (175%) - I never saw articles with more than 2 columns. Sometimes only - with 3 columns, and I considered it as a rather freaky layout - but a lot of freaky looking places at Wikipedia so like not a big deal :-)

Yet now there is a rather intense conflict at ru-wiki about the "references responsive" behavior. Basically speaking, both parts agree that at narrow screens notes should be in one column. But on wider screen (and more than 10 notes) one side would like to keep the current unlimited freedom (3, 4, 6 columns), the other one - some top limit (say, 2 columns)


This is why I decided to clarify all technical details.

Whatamidoing (WMF) (talkcontribs)

Neolexx, it looks like the discussion was archived. Did editors come to a decision about the best approach?

Reply to "Maximum of columns"
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"
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