Module talk:Sidebar/Archive 2: Difference between revisions

Content deleted Content added
MiszaBot II (talk | contribs)
m Robot: Archiving 1 thread from Template talk:Sidebar. (ARCHIVE FULL)
m Replaced deprecated <source> tags with <syntaxhighlight> (via WP:JWB)
 
(6 intermediate revisions by 3 users not shown)
Line 63:
: They don't always apply to whole articles, though. [[user:thumperward|Chris Cunningham (not at work)]] - [[user talk:thumperward|talk]] 11:06, 6 July 2009 (UTC)
 
::Not to mention the technical difficulties of forcing them to always appear at the top. And what about where an infobox and a sidebar is used on the same article; which one should win out? This type of stuff needs to be decided case-by-case, and if a sidebar needs to appear at the top of an article, it's far easier and simpler to just put its template call at the top of the article's source than to try and force a technical solution from within the template. <span style=white-space:nowrap>「[[User:Dinoguy1000|<span style=color:#00f>ダイノ</span><span style=color:#080>ガイ</span>]][[Special:Contributions/Dinoguy1000|<span style=color:#F90>千?!</span>]]」<sup>[[Help:JP|?]] · [[User talk:Dinoguy1000|<small style=font-weight:normal>Talk⇒Dinoguy1000]]</supsmall>]]</spansup></span> 18:59, 6 July 2009 (UTC)
:::That's what I meant: place the template at the top of the page source. Also, I'd think that the infobox would come first since it is more important/relevant. Images, however, I think should come after since ''should'' always apply to a specific section (I think it's sloppy when this isn't the case). [[User:SharkD|SharkD]] ([[User talk:SharkD|talk]]) 06:44, 7 July 2009 (UTC)
 
Line 78:
::If it is necessary, I'd prefer a means of turning it off on a per-template basis, instead of having to adjust each individual link. <span style="border:1px solid #f57900;padding:1px;">[[User:SharkD|<span style="color:#8f5902;padding-left:1px;">SharkD</span>]] [[User_talk:SharkD|<span style="color:#fff;background:#fcaf3e;">&nbsp;Talk&nbsp;</span>]]</span> 01:00, 20 November 2009 (UTC)
::: I have no idea. [[User:Anomie|Anomie]][[User talk:Anomie|⚔]] 02:55, 20 November 2009 (UTC)
::::Just as a pointer, {{tl|Navbox}} has used the "nowraplinks" class for a long time now. Other than that, I have no opinion on whether it's really necessary here. <span style=white-space:nowrap>「[[User:Dinoguy1000|<span style=color:#00f>ダイノ</span><span style=color:#080>ガイ</span>]][[Special:Contributions/Dinoguy1000|<span style=color:#F90>千?!</span>]]」<sup>[[Help:IJP|?]] · [[User talk:Dinoguy1000#top|Talk⇒Dinoguy1000]]</sup></span> 04:15, 20 November 2009 (UTC)
:I went ahead and modified the template so that the behavior can be disabled if needed. It is still enabled by default. <span style="border:1px solid #f57900;padding:1px;">[[User:SharkD|<span style="color:#8f5902;padding-left:1px;">SharkD</span>]] [[User_talk:SharkD|<span style="color:#fff;background:#fcaf3e;">&nbsp;Talk&nbsp;</span>]]</span> 05:30, 20 November 2009 (UTC)
 
Line 86:
== Problem with width ==
 
Something recently caused [[:Template:Violence against women]] to broaden, and it wasn't edits to the template itself. It uses this sidebar template, but reverting a recent edit to this made no difference. Can anyone think what might have caused it? [[User:SlimVirgin|<fontspan colorstyle="color:black">[[User:SlimVirgin|SlimVirgin]]</fontspan>]] <small><sup><font color="gold">[[User_talk:SlimVirgin|TALK|]]</font><fontspan colorstyle="limecolor:gold">TALK|</span>]][[Special:Contributions/SlimVirgin|<span style="color:lime">CONTRIBS]]</fontspan>]]</sup></small> 04:06, 7 September 2011 (UTC)
: The culprit appears to be the inclusion of "width:22em". I added "width:auto" to the [[:Template:Violence against women]], which overrides this statement. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 15:30, 7 September 2011 (UTC)
::Thanks for doing that, Frietjes. [[User:SlimVirgin|<fontspan colorstyle="color:black">[[User:SlimVirgin|SlimVirgin]]</fontspan>]] <small><sup><font color="gold">[[User_talk:SlimVirgin|TALK|]]</font><fontspan colorstyle="limecolor:gold">TALK|</span>]][[Special:Contributions/SlimVirgin|<span style="color:lime">CONTRIBS]]</fontspan>]]</sup></small> 21:59, 7 September 2011 (UTC)
 
== Question on "sidebar with collapsible lists" template ==
Line 107:
== Recent changes ==
 
Recent changes have disturbed the widths of templates {{tl|Hinduism}} (width became smaller) and {{tl|Vaishnavism}} (width increased suddenly). I am unsure about the exact problem or which edits caused it. --[[User:Redtigerxyz|<font colorspan style= "color:red" >Redtigerxyz</fontspan>]] <sup> [[User talk:Redtigerxyz|Talk]] </sup> 17:26, 11 March 2012 (UTC)
:I think Frietjes fixed it. <span style="font-family:'Trebuchet MS'"> — [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User talk:Edokter|<span style="color:#080">talk</span>]]) — </span> 17:33, 11 March 2012 (UTC)
:: <s>The problem still exists. I observed when loading [[Hinduism]], template Hinduism appears 100 % width and on completion of loading, it suddenly becomes small width. What has changed? Should I add any parameters to the Hinduism et al templates? --[[User:Redtigerxyz|<font colorspan style= "color:red" >Redtigerxyz</fontspan>]] <sup> [[User talk:Redtigerxyz|Talk]] </sup> 17:37, 11 March 2012 (UTC)</s>
::: The second edit solved the problem. Thanks Frietjes. --[[User:Redtigerxyz|<font colorspan style= "color:red;" >Redtigerxyz</fontspan>]] <sup> [[User talk:Redtigerxyz|Talk]] </sup> 17:39, 11 March 2012 (UTC)
:::: yes, I almost had it in the first edit, but missed an extra }. looks like it works now. I also improved the logic for the new float option (now works if float exists but is blank). [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 17:41, 11 March 2012 (UTC)
 
Line 143:
* cellspacing
* cellpadding
---'''''—&nbsp;[[User:Gadget850|<span style="color:gray">Gadget850&nbsp;(Ed)</span>]]<span style="color:darkblue">&nbsp;</span>'''''</span><sup>[[User talk:Gadget850|''talk'']]</sup> 23:20, 23 September 2012 (UTC)
 
:There are many templates with these; {{tl|navbox}} and {{tl|infobox}} to name a few complicated examples. They need some CSS restructuring, including Common.css. Currently looking into it. <span style="font-family:'Trebuchet MS'"> — [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User talk:Edokter|<span style="color:#080">talk</span>]]) — </span> 17:45, 24 September 2012 (UTC)
Line 366:
|style="text-align: center; background:#FFFFFF; "|[[Image:GDP PPP Per Capita IMF 2008.svg|200px]]<br/>
|-
|<div class="NavFrame" style="border-style: none; padding: 0px; text-align: left; border-left: 0px; border-right: 0px; border-top: 0px; border-bottom: 0px;" cellpadding=0 cellspacing=0><div class="border-style: none; padding: 0px; background:#FFFFFF; text-align: left; font-size: 11px; height:1.9em;">&nbsp;&nbsp;'''[[:Category:Economies by country|Economies by country]]'''</div></div>
|-
! style="background:#ddddee; font-size: 95%; border-top: 1px solid #BEBEBE; border-bottom: 1px solid #BEBEBE; padding: 0 3px 0 3px;" | [[Outline of economics|General categories]]
|-
| style="font-size: 90%; padding: 0 3px 0 3px;" align="center"| <center>
[[Microeconomics]]{{·}} [[Macroeconomics]]<br/>
[[History of economic thought]]<br/>
Line 377:
! style="background:#ddddee; font-size: 95%; border-top: 1px solid #BEBEBE; border-bottom: 1px solid #BEBEBE; padding: 0 3px 0 3px;" | [[JEL classification codes#Mathematical and quantitative methods JEL: C Subcategories|Technical methods]]
|-
| style="font-size: 90%; padding: 0 3px 0 3px;" align="center" | [[Mathematical economics|Mathematical]]{{·}}[[Econometrics]]<br/>[[Experimental economics|Experimental]]{{·}} [[National accounts|National accounting]]<br/>
<center>[[Mathematical economics|Mathematical]]{{·}}[[Econometrics]]<br/>[[Experimental economics|Experimental]]{{·}} [[National accounts|National accounting]]<br/>
|-
! style="background:#ddddee; font-size: 95%; border-top: 1px solid #BEBEBE; border-bottom: 1px solid #BEBEBE; padding: 0 3px 0 3px;" | [[JEL classification codes|Fields and subfields]]
|-
| style="font-size: 90%; padding: 0 3px 0 3px;" align="center" |
<center>
[[Behavioral economics|Behavioral]]{{·}} [[Cultural economics|Cultural]]{{·}} [[Evolutionary economics|Evolutionary]]<br>
[[Economic growth|Growth]]{{·}} [[Development economics|Development]]{{·}} [[Economic history|History]]<br>
Line 400 ⟶ 398:
[[:Category:Economics|Categories]] {{·}} [[Index of economics articles|Index]] {{·}} [[Outline of economics|Outline]]
<br>
</div>
|-
| <div class="NavHead" style="border-style: none; padding: 0px; background:#ddddee; border-top: 1px solid #BEBEBE; text-align: center; font-size: 11px; height:1.9em;">'''[[Economy|The economy: concept and history]]'''</div>
Line 446 ⟶ 443:
:::::Well, this may be only a semantic (rather than substantive) distinction, but more strictly speaking, there is no "<nowiki>{{·}}</nowiki>" or "'''·'''" link separator in the right template above, only <nowiki>*</nowiki> link separators that end up looking like bullets. So I'm not sure that the above applies. But, suppose that someone asserts otherwise, ''presenting a replicable basis of verification''. That would be of interest, especially with a description of what the compromise in accessibility looks like to the affected person from use of <nowiki><br/></nowiki>. My thanks. --[[User:Thomasmeeks|Thomasmeeks]] ([[User talk:Thomasmeeks|talk]]) 20:26, 4 December 2012 (UTC)
::::::I don't know how much you know about [[cascading style sheets]], but [[MediaWiki:Common.css]] contains a number of stylings specific to the class <code>hlist</code>. The two chunks to particularly observe are this:
<sourcesyntaxhighlight lang=css>
/* Display list items inline and make them nowrap */
.hlist dd,
Line 455 ⟶ 452:
white-space: nowrap;
}
</syntaxhighlight>
</source>
::::::and this:
<sourcesyntaxhighlight lang=css>
.hlist dd:after,
.hlist li:after {
Line 463 ⟶ 460:
font-weight: bold;
}
</syntaxhighlight>
</source>
::::::Essentially, when the <code>hlist</code> class is applied to a bulleted list, the first chunk of code above eliminates the newlines which normally occur between list items; and the second chunk alters the bullets that ''would'' have appeared at the start of the line so that they are displayed them as a boldface <code>&amp;middot;</code> We can demonstrate that quite simply - if I put the following wikicode:
&lt;div class=hlist&gt;
Line 862 ⟶ 859:
::Within a few minutes, the problems mentioned above for the Econ sidebars displayed at [[Economic methodology]] and [[Heterodox economics]] were corrected.
::The blank line in Edit mode between each each view-mode ContentX line were already in [[Template:Economics sidebar]]. So the edit above required no added individual line formatting to fix the problem. Thank you so. --[[User:Thomasmeeks|Thomasmeeks]] ([[User talk:Thomasmeeks|talk]]) 20:56, 19 December 2012 (UTC)
== Edit request on 16 January 2013 ==
 
{{edit protected|answered=yes}}
<!-- Begin request -->
The repeated bits of styling code for [[Template:Celtic mythology|this Sidebar template]] prompted me to wonder whether Sidebar had a "basestyle" parameter in the same vein as [[Template:Navbox]]. As it didn't, I've added one to [http://en.wikipedia.org/w/index.php?title=Template:Sidebar/sandbox&oldid=533302165 this sandbox version] and it appears to work correctly with the test I added at the start of the [[Template:Sidebar/testcases|testcases]] page. So, if it does look legitimate, please replace the current Sidebar code accordingly and I'll update the documentation.
<!-- End request -->
[[User:CsDix|CsDix]] ([[User talk:CsDix|talk]]) 02:28, 16 January 2013 (UTC)
 
: As loathe as I am to make this any more customisable, this actually helps to reduce the amount of code required to style sidebars in most cases and so I've synced. Thanks. [[User:Thumperward|Chris Cunningham (user:thumperward)]] ([[User talk:Thumperward|talk]]) 10:08, 23 January 2013 (UTC)
:* Thank ''you'' for making the edit. I don't think it makes the template any more customisable, but, as you say, can streamline it. And, no need, I feel, to loathe customisation &ndash; I can see that "one size doesn't fit all", especially given the scope to which Wikipedia aspires. Thanks again, [[User:CsDix|CsDix]] ([[User talk:CsDix|talk]]) 02:50, 25 January 2013 (UTC)
== Edit request on 21 February 2013 ==
 
{{edit protected|answered=yes}}
<!-- Begin request -->
At present, the default{{\}}fall-back width for this template is 22.0em (line 6). But, on smaller screens{{\}}windows{{\}}resolutions, e.g. 1024 by 768, this is on the large side. Meanwhile, many Sidebars seem to have their widths set at or around 18.0em &ndash; see, for instance, those [[:Category:Political ideology templates]] using Sidebar. May, therefore, Sidebar's default width be decreased to a compromise 20.0em, please? (To do so, replace line 6 of the present code with the following:)
 
<code>{{nbsp|11}}<nowiki>-->width:{{#if:{{{width|}}} |{{{width}}} |20.0em<!--default/fallback width no greater than 20.0em, please, for the sake of smaller screens/windows-->}};<!--</nowiki></code>
 
<!-- End request -->
[[User:CsDix|CsDix]] ([[User talk:CsDix|talk]]) 01:58, 21 February 2013 (UTC)
:I've deactivated procedurally, since this is a rather innocuous but large change which would need consensus. I personally don't agree that this is an issue; the average screen size today is [http://www.w3schools.com/browsers/browsers_display.asp larger than] 1024px.[http://www.geek.com/articles/chips/most-popular-screen-resolution-increases-to-1366-x-768-20120411/] --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 03:10, 21 February 2013 (UTC)
:That said, I personally do not understand why we are hard-declaring the width here rather than adding that to the CSS using the <code>vertical-navbox</code> class. I would say the same for the cellspacing and cellpadding, which are deprecated attributes on top of that. And why are we providing all these custom parameters style parameters when the simple use of bodystyle would suffice? *sigh* --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 03:15, 21 February 2013 (UTC)
:* Why deactivate? Why not make the change, then see if people come running to have it undone or modified &ndash; in other words, ''prompt them'' to express a consensus &ndash; ? Right now, I must say your action seems to me to smack of something like censorship.
:: As regards width not being an issue, I'm afraid there are plenty of places where 1024 by 768 is the highest decent resolution available. Let's not lose sight of how well-equipped many of us might be. Meanwhile, on the other hand, how about Wikipedia in windows that aren't full-screen?
:: And, as regards custom parameters, who says one size (bodystyle, defaults) should fit all..?
:: [[User:CsDix|CsDix]] ([[User talk:CsDix|talk]]) 03:32, 21 February 2013 (UTC)
:::<p>Hardly censorship. The template you used should only be used for uncontroversial changes. This is controversial. Therefore, the template should not have been used. QED.</p><p>Those places are steadily becoming fewer. Should we limit everyone for the sake of the few (less than 10% now!)? In general though, the pages which use this template [[graceful failure|fail gracefully]].</p><p>I'm simply saying on the point of the custom parameters that one parameter ''would'' fit all: "style" or "bodystyle" (whichever we want to call it). --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 03:41, 21 February 2013 (UTC)</p>
:::: It ''smacks of'' censorship. Imagine a different point of view for a moment.
:::: I don't know whether or not changing the default width will be controversial. How do you know it will be &ndash; beyond yourself and anyone you know who shares your point of view &ndash; ?
:::: Why should a reduction of 2.0em be regarded as if only a limitation? Another point of view is that 22.0em rather than 20.0em is a greater limitation on the amount of text that can be displayed beside the sidebar, regardless of resolution etc.
:::: As regards style/bodystyle, then, I'm not sure what point you're making &ndash; apologies if I'm missing something obvious.
:::: [[User:CsDix|CsDix]] ([[User talk:CsDix|talk]]) 04:00, 21 February 2013 (UTC)
== Edit request on 24 February 2013 ==
 
{{edit protected|answered=yes}}
<!-- Begin request -->
Hello. I noticed that a means to specify the class for any particular heading and content section (e.g. in order to switch, temporarily, from hlist to plainlist) hasn't yet been implemented, so [http://en.wikipedia.org/w/index.php?title=Template:Sidebar/sandbox&oldid=540010153 this] version of the template in the sandbox should now provide this possibility (look for <nowiki>{{{headingNclass}}}es and {{{contentNclass}}}es</nowiki>). If all looks okay, please make it the live version.
 
<!-- End request -->
[[User:CsDix|CsDix]] ([[User talk:CsDix|talk]]) 05:00, 24 February 2013 (UTC)
 
: Adding even more customisation here rather belies the point of standardising it in the first place (one key reason for doing so was to attempt to increase the overall consistency of different sidebars). Is there a specific case where there is a consensus that this is necessary? [[User:Thumperward|Chris Cunningham (user:thumperward)]] ([[User talk:Thumperward|talk]]) 12:14, 27 February 2013 (UTC)
:: I fear you may be missing the point (hint: the parenthesis). Thanks, though, for your attention. [[User:CsDix|CsDix]] ([[User talk:CsDix|talk]]) 18:51, 27 February 2013 (UTC)
::: Again, is there a concrete example here? Do we really want to have a mix of different list types in a single sidebar? Please don't continue to re-enable editprotected requests while they're disputed. [[User:Thumperward|Chris Cunningham (user:thumperward)]] ([[User talk:Thumperward|talk]]) 10:13, 28 February 2013 (UTC)
:::: [[Template:Thermodynamics]], were it to be converted to use semantic lists while preserving the current format, would. However, I'm not sure whether I would support this request. It does seem to me that we're losing the opportunity for microformats (which I'm not sure we want in a sidebar). That said, I think this request would add more complexity than is worthwhile, and so I think on the few cases where we might want to do it, we can just change the classes ourselves. Just musing here. --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 17:03, 28 February 2013 (UTC)
:::: Never mind. As Izno indicates, it's something that can be done manually (i.e. less elegantly) anyway. Don't see why a mix would be a problem and the circumstance I had in mind was an hlist of links each of whose length meant they were rendered one per line, i.e. as if a plainlist. Just thought it was an oversight worth correcting, but I guess not. [[User:CsDix|CsDix]] ([[User talk:CsDix|talk]]) 00:39, 1 March 2013 (UTC)