Template talk:Collapsible option

Version
editprotected You protected The Wrong Version! Please replace the page with the following:  Use  to show this template in its collapsed (hidden) state. Use  to show this template in its expanded (fully visible) state. Use  to show this template in its collapsed (hidden) state only if there is another template of the same type on the page. ( is the default.)

Thanks. —Ms2ger (talk) 15:28, 16 June 2008 (UTC)
 * Thanks for pointing this out. --- RockMFR 18:39, 16 June 2008 (UTC)

Edit request
Hi. Please prefix each "Use..." statement in the template with an asterisk to produce a wikistyle bullet list. (Suggest this makes reading the list easier when lines wrap, also when more "Use..." variations added after it.) Sardanaphalus (talk) 02:31, 22 August 2008 (UTC)
 * ✅ Happy‑melon 13:48, 23 August 2008 (UTC)
 * Thank you! Sardanaphalus (talk) 17:52, 23 August 2008 (UTC)

Copied from another talkpage
editprotected

Anyone, please? Sardanaphalus (talk) 17:53, 24 August 2008 (UTC)

And also please make a little edit so that it is possible to use this template in the doc page of a template without the "/doc" appeared. --Quest for Truth (talk) 20:07, 17 September 2009 (UTC)


 * ❌ Please give a complete and specific description of the edit requested so that clueless admins don't send the wiki spiraling into an early demise. Skomorokh  22:02, 17 September 2009 (UTC)
 * Came here wanting the same thing (usability on the /doc subpage) and concluded that mucking around with this template to make it an option was too much like hard work, but making a fork (Collapsible option-doc) was easy. Ergo, I did that. Rd232 talk 12:05, 25 October 2009 (UTC)
 * Scratch that. I've just realised that the magic word will work equally well for the /doc page and the template page, so I've amended this template. Rd232 talk 11:09, 26 October 2009 (UTC)

Consensus for universal use of template?
Gentlemen, it has been noted over the past several months that one or two editors are inserting this template into every navbox within certain WikiProjects, greatly expanding its transclusion count in a very brief period of time. Is this the result of some Wikipedia-wide navbox standardization consensus of which I am unaware? Or has such consensus been determined on a project-by-project basis? The courtesy of a timely response to this inquiry is requested. Thank you. Dirtlawyer1 (talk) 10:19, 21 September 2012 (UTC)
 * For the record, I note that nearly 12 weeks have elapsed since I made the above inquiry on this talk page, and none of the creators, editors, or proponents of this template have seen fit to answer the inquiry. Please note I hereby contest any purported universal use of this template by consensus, as no such consensus is reflected on this talk page or anywhere else on Wikipedia.  Accordingly, I will continue to delete this template from all navboxes that I maintain and from those on which I work as a superfluous bit of coding that serves no useful purpose.  Dirtlawyer1 (talk) 18:54, 13 December 2012 (UTC)
 * I am confused. Are you against the use of state in a navbox, or are you against adding documentation of this feature? this template does not add the feature, but generates the documentation of this feature.  depending on your objection, this may or may not be the correct forum. Frietjes (talk) 20:42, 13 December 2012 (UTC)
 * Frietjes, I am against the universal use of this template in what is rapidly becoming every navbox on Wikipedia. The feature which it documents is used so rarely in practice that including the documentation universally is redundant in almost all circumstances.  Every navbox template page does not require an advertisement for a feature whose application is rarely needed.  I believe the near universal addition of this template was ill-considered and represents one of those ideas whose greatest merit is that it generates a higher edit count for the users adding it to the navbox template pages.  In short, it is a template in search of a purpose.  Dirtlawyer1 (talk) 18:28, 14 December 2012 (UTC)
 * I see, so you are against adding documentation. I am personally against adding both state and  to templates which clearly don't need it.  however, I am not against adding  to templates that are using state.  I don't see anything wrong with documenting a feature. however, I don't see a need to add an additional feature to a template which doesn't need it. so, if you remove the, please also remove the state at the same time. Frietjes (talk) 18:44, 14 December 2012 (UTC)

Note: It's now possible to omit the "state=".
an editor has been adding [//en.wikipedia.org/w/index.php?title=Template:Algeria_topics&diff=next&oldid=525398100 this text] next to transclusions where state = is used, instead of state =. to allow for uniform presentation of this note, I suggest adding this note to this template. Please add the following line at the end of the template:

which, if there have been no other edits, should be the same as [//en.wikipedia.org/w/index.php?title=Special:ComparePages&page1=Template%3ACollapsible+option&page2=Template%3ACollapsible+option%2Fsandbox this diff]. thank you. Frietjes (talk) 21:20, 28 November 2012 (UTC)


 * Comment. I'm the editor to whom Frietjes refers, so, naturally, I approve his (her?) message. This one too, I think -- so long as omitting the "state=" will work where this template is shown. CsDix (talk) 22:50, 30 November 2012 (UTC)


 * Pictogram voting question.svg Question: I thought that the state parameter has always been optional, and that if it is omitted navbox and similar templates default to autocollapsed. This is true for cases where state in templates like Algeria topics, and for these templates to behave differently when state there would have to be a value specified in the first unnamed parameter when they are transcluded. Has there this been the case in a significant number of these transclusions? Or I guess what I'm trying to say is, why can't we just say that autocollapsed is the default state and leave it at that? Best — Mr. Stradivarius  (have a chat) 00:24, 1 December 2012 (UTC)
 * at least one editor [that'd be me, CsDix] has been changing state to state and then appending "Note: It's now possible to omit the "state="." just after this template.  I personally think this is pointless, but whatever.  however, if we are going to be adding this "first unnamed parameter" option to a load of templates, then rather than pasting "Note: It's now possible to omit the "state="." in every single template, might as well just document it here.  however, if people feel we should go back to state, then clearly this isn't needed.  the convention, as far as I recall, has been to use state and reserve   for navbox with collapsible groups.  until we can have that discussion, I was hoping to add the additional documentation here, which could be easily tracked, and removed later if necessary.  thank you. Frietjes (talk) 01:11, 1 December 2012 (UTC)


 * This is just about the convenience (and, cumulatively, the space saved) by using  rather than   -- isn't it..? CsDix (talk) 03:02, 1 December 2012 (UTC)
 * Ok, now I see what's going on - thanks for the clarification. Are there any templates that this documentation would apply to which use the first unnamed parameter for anything other than a shortcut for the state parameter? We need to think of all the possible cases when working this out. — Mr. Stradivarius  (have a chat) 05:34, 1 December 2012 (UTC)
 * Yes, that's what I'm also wondering when I said "... so long as omitting [etc]" above. Also, wouldn't the state-handling of those templates using this collapsible-option message need to be amended to include, e.g. by a bot..? (If so, I'm still thinking it's probably worth doing -- although maybe that's because I wouldn't be programming the bot!) CsDix (talk) 09:08, 1 December 2012 (UTC)
 * Ok, Yes check.svg Done. As this is an optional parameter, I couldn't see any harm in adding it. However, its addition to the template should not be taken as an endorsement to add state to more navboxes. I think a change on this large a scale needs a full discussion where all community members have a chance to comment. I suggest starting a new thread at WP:VPT to make sure there is a solid consensus for rolling this out on a wide scale. Best — Mr. Stradivarius  (have a chat) 12:32, 1 December 2012 (UTC)

Thanks, Mr. Stradivarius. However, could... ...please, as... In other words, I'm think I'm thinking of...
 * 1) the parameter be renamed "statename";
 * 2) the value become "optional";
 * 3) the "state =" in the message added become "state=";
 * 4) the message added start on a new line;
 * 5) and an inline example included,
 * 1) "state optional" suggests the parameter is something about the state itself rather than the "state=" wording;
 * 2) the syntax would then become "statename=optional";
 * 3) there isn't a space between "state" and the subsequent equals-sign in the main message;
 * 4) the message added is more easily noticed when it has been added;
 * 5) an example should make clear what's meant by the added message.
 * can be omitted (for example, }}

...in the template's code.

I'm also thinking it might be worth adding a space between each  and   in the main message, to produce e.g.

...in order to make the separation between the Template name (however unorthodox and/or lengthy it might be) and the state parameter.

Hope this wouldn't be too much trouble. And thanks for your WP:VPT suggestion, which I intend to act on. CsDix (talk) 20:22, 2 December 2012 (UTC)


 * Update: Haven't done anything at WP:VPT as there doesn't seem to be any push for or against this template's use (i.e. leaving this template for editors to discover and use or bypass works seems to be working fine). CsDix (talk) 17:46, 12 February 2013 (UTC)

Edit request on 12 February 2013
Currently, this template message's last sentence, about whether (and what) default state might be in use, seems to be presented as more of an afterthought than as worthwhile as the rest of the message's information. So, here's a version (in the template's sandbox) giving this sentence its own line and more handling. (If this version is implemented, I'll add an example to the documentation to indicate how the message changes when a custom default state is supplied.)

CsDix (talk) 17:41, 12 February 2013 (UTC)
 * Yes check.svg Done, but with . -- Red rose64 (talk) 19:48, 12 February 2013 (UTC)
 * Thanks for your speedy action – and for the amendment. (I'd commented out the space as, depending on the browser, I thought it might otherwise affect the output; but, if you reckon not, that's fine.) CsDix (talk) 22:03, 12 February 2013 (UTC)
 * Except when editing a page, browsers never get to see parser functions like  - these, like all other Wiki markup, are converted to HTML by the Wikimedia servers. -- Red rose64 (talk) 22:47, 12 February 2013 (UTC)
 * Understood – thanks for explaining. CsDix (talk) 00:53, 13 February 2013 (UTC)

Template-protected edit request on 29 January 2014
The semicolon formatting used at the very start of this template can produce uneven linespacing when the template is added below other content, so please replace the first line ; How to manage this template's visibility with How to manage this template's visibility

Thank you,

213.246.85.251 (talk) 11:31, 29 January 2014 (UTC)
 * Red information icon with gradient background.svg Not done for now: I'm not going to do this as proposed as there is no consensus to change the size of the text from 110% to 120%. Please do one of the following:
 * Re-propose your request using the existing Larger
 * Put your request in the sandbox and make appropriate testcases (maybe show all three sizes; Larger, Big, and )
 * Thank you for your assistance. Technical 13 (talk) 15:07, 29 January 2014 (UTC)
 * I moved the bolding inside the template. I agree that the font-size should remain the same at 110%. Hopefully, this will solve the problem with the rendering. Funandtrvl (talk) 17:50, 29 January 2014 (UTC)

Template-protected edit request on 14 May 2014
Please replace the template's code with the sandbox version here (current as of this message). The changes made are:
 * 1) The pp-template code placed after rather than before the template's main code, compressed but otherwise unchanged;
 * 2)  (115%) rather than  (110%) heading (more consistent beside other headings and/or font-sizes over 100% when this template transcluded on template pages and/or within ); ...Having just seen the thread above, I've added a Heading size comparisons section to the testcases page;
 * 3) &amp;thinsp;s rather than &amp;nbsp;s (better transition between  templates. It displays as (1) "the parameter" and (2) "default state is ". A space should be inserted after   at (1), and a space inserted before   at (1) and (2). Brianhe (talk) 18:16, 12 November 2014 (UTC)
 * It appears to have been like that since, which is directly related to the section above this one. -- Red rose64 (talk) 20:45, 12 November 2014 (UTC)
 * I have made the changes in the sandbox All the best: Rich Farmbrough, 23:39, 15 November 2014 (UTC).


 * Yes check.svg Done - uncontroversial spelling fix. GermanJoe (talk) 18:43, 16 November 2014 (UTC)
 * Sorry for the text removal, seems like the EPH-tool has a bug (or I simply pressed the wrong button). Thanks for the revert. GermanJoe (talk) 13:38, 17 November 2014 (UTC)

Please add back curly brackets
Hi, could someone add back the curly brackets (braces), so that it is much easier to cut and paste into another template? This revision shows the braces in an easy cut/paste format. Thanks, Funandtrvl (talk) 23:53, 4 December 2014 (UTC)


 * Apologies for the delay before responding to your note. The braces etc were removed in case the template's message gave the impression that the collapsible option was only for templates taking no other parameters (or wouldn't work with templates taking other parameters, e.g. templates using Navbox with collapsible sections). On the other hand, I suspect the bulk of those templates using this option are Navboxes that do take no other parameters, so I'll experiment with some rephrasing that reintroduces the convenient copy-pasteable text. Thanks for prompting, Sardanaphalus (talk) 18:59, 11 December 2014 (UTC)
 * The template now includes the previous code examples as parentheses after each option. Hope that suffices, Sardanaphalus (talk) 21:50, 17 December 2014 (UTC)
 * Thank you!! Funandtrvl (talk) 23:35, 18 December 2014 (UTC)

Misleading big header formatting
It occurs to me that this template has a top line that suggests a header (but is not). I find it way too big in any sense for what is just a single parameter description (think of what if the template has dozens?). Also the wording is not specific enough (for example, visibility=collapse only?). Can someone make a proposal with downsized importance? -DePiep (talk) 19:09, 23 December 2014 (UTC)


 * I think it is (meant to be) a heading, but, so as not to e.g. perturb ToCs when transcluded, not a standard section/"equals-signs" (official term?) heading. I'm not sure how wise it would or wouldn't be to make it a standard (third-level?) heading, though I imagine it's probably best not. Having just experimented a little, there doesn't seem to be much if any scope for reducing its size and/or removing its boldface here (PC running Firefox-based browser) without making it look like just another sentence. Although it's only with reference to one parameter, that parameter is many e.g. Navboxes' one and only parameter, so I'd say it's pretty significant.
 * As regards the wording, I'm not sure what you mean/indicate by "visibility=collapse only?"..?
 * Sardanaphalus (talk) 15:31, 24 December 2014 (UTC)
 * Quick reply: don't (try to) turn it into a heading at all, not even a correct one. -DePiep (talk) 15:35, 24 December 2014 (UTC)
 * Yes it's used often. That does not imply it should use 75% of a screen. And it's still a parameter, I don't see why that merits a section of whichever level. Just take a look at any template with 3 or 12 or 30 parameters. How are these documented? 30 sections? -DePiep (talk) 10:09, 25 December 2014 (UTC)


 * I have started some changes in Collapsible option/sandbox. Notes:
 * Reduced size of text. Each option can simply open with the self-example, instead of repeating the demo. Aim at pattern showing.
 * Mention "hide/show" to give that connection.
 * Removed "how to add a parameter". Parameters are general in template usage & editing (in articles), it is not specific to this one.
 * Added: caption to overwrite the caption (allowing for any header applicable in that documentation). todo: how to add a sectionheader this way?
 * todo: 'another template of the same type' I do not understand. Clarify?
 * This template's self-options (nobase, statename) need to be checked for correct functioning in here.
 * -DePiep (talk) 10:37, 25 December 2014 (UTC)

Protected edit request, 12 January 2015
I propose & request to replace (the opening line of code): How to manage this template's initial visibility with As I mentioned above, current formatting suggests a section header, while it actually is formatted text only. The effect is that the reader is visually confused with the status of this paragraph. Also, in whichever context structure (like surrounding section or parameter listing) it is placed, it interrupts that structure.
 * Request
 * Ratio

In general, such a block of text should not contain any higher level setting at all, because it is variable or undetermined what its position is in the transcluding (receiving) page.

As it is proposed now, it will have a semicolon for default paragraph, and that can be overruled (including blanked) by using title. This gives a general format by default, and an option to tailor specific situation (including adding a section header). The anchor is present always, so sectionlinking is always possible by standard name.

-DePiep (talk) 19:20, 12 January 2015 (UTC)
 * Request sandbox code so that other editors can better understand what you're saying &mdash; Martin (MSGJ · talk) 20:01, 12 January 2015 (UTC)
 * Good point. I paused the request. -DePiep (talk) 20:11, 12 January 2015 (UTC) - done.


 * Testcases + code in sandbox
 * Code: Collapsible option/sandbox (note: that's #2; #1 is active otherwise).
 * Testcases: Template:Collapsible option/testcases.
 * -DePiep (talk) 20:30, 12 January 2015 (UTC)
 * Red information icon with gradient background.svg Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. Template:Collapsible_option/testcases shows that your code is broken. Please fix it before reinstating this request. — &#123;&#123;U&#124;Technical 13&#125;&#125; (e • t • c) 21:05, 12 January 2015 (UTC)
 * 1. "please make your requested changes to the template's sandbox first"??? 2. What is broken? -DePiep (talk) 21:35, 12 January 2015 (UTC)
 * title=;Parameter option |state=}} — &#123;&#123;U&#124;Technical 13&#125;&#125; (e • t • c) 22:56, 12 January 2015 (UTC)
 * That was the testcase input, not the template output. I've reformatted these lines into code. -DePiep (talk) 23:11, 12 January 2015 (UTC)


 * Reopening request
 * Addressed: explanation was needed not code changes. I'll reopen the request. . -DePiep (talk) 23:51, 16 January 2015 (UTC)
 * Note: proposed code now in regular  (not /sandbox2) . To prevent confusion. Testcases are adjusted. -DePiep (talk) 12:22, 17 January 2015 (UTC)
 * Pictogram voting comment.svg Note: I oppose using an id in that way, and I'm not sure why this heading needs to be changed in that way. I oppose the lack of backwards compatibility for this change, and there has been insufficient discussion to change the default behavior. I'll leave the request open or someone else to close since I've already closed it once. —   13:15, 17 January 2015 (UTC)
 * I'm not sure why this heading needs to be changed in that way.  - sigh. Why didn't you read the ratio provided? And why not actually click and read any secondary reasoning provided? I have little patience with this reply, Tech13, because you clearly say you did not read it at all (as opposed to, say, "I have a question"). And this is the second time in this thread (my #1 @21:35). I don't see what I am supposed to reply to. -DePiep (talk) 17:34, 17 January 2015 (UTC)
 * I did read the rationale provided, and I did read the section above, and I'm still not convinced this is needed or a good idea. I never said I didn't read all of it, and I'm not sure where you came up with that notion.  I see this as a solution where there is no problem.  Anyways, like I said, I won't enact or decline this request (unless of course it sits around for an undue amount of time and it is clear no-one is going to act on it, in which case I'll close it as a lack of consensus to fix a problem that hasn't been adequately established to exist). —   17:50, 17 January 2015 (UTC)
 * The very first sentence of the ratio says it. Then you write "I'm not sure why". (And again, #3, you conclude there is no problem to fix). If you repeatedly fail to see it (without trying to), I can not help you. Instead of "I don't understand so I oppose", you can say "I don't understand, so I'm out". -DePiep (talk) 08:21, 18 January 2015 (UTC)
 * Simply: if you don't understand the issue and write so, that does not constitute lack of consensus. It is lack of understanding -- a pity, but no blocker. (And, it obfuscates your other possibly reasonable remarks. However it is not up to other editors to clean up your comments). -DePiep (talk) 08:25, 18 January 2015 (UTC)

No comment on the merit of this request but I don't understand your code. What is the purpose of checking the title parameter twice in the following line? &mdash; Martin (MSGJ · talk) 10:23, 19 January 2015 (UTC)
 * The two #ifs do different things, since the parameter in the first #if check has an empty fallback value while the one in the second check does not. The whole thing returns   if title is not defined, nothing if it is defined but empty, and the parameter value followed by a line break if it is defined and non-empty. It could be replaced by  which does the same thing with an #if case less.
 * A more semantically correct alternative would be to keep the div from the current live version: This also automatically bolds any custom title, removing the need for the line break. SiBr4 (talk) 11:40, 19 January 2015 (UTC)
 * , why say it is answered while you are just asking a question? Do you continue?
 * As writes. If that improves internal code, fine with me. -DePiep (talk) 11:53, 19 January 2015 (UTC)
 * Thanks for answering. I'll take a look at this tomorrow unless someone gets there before me. &mdash; Martin (MSGJ · talk) 16:36, 19 January 2015 (UTC)


 * I still oppose this. There needs to be discussion and consensus will need to be assessed by an uninvolved editor.  I'm still of the mindset that changing the default behavior of this script is bad and DePiep's I don't like the default behavior isn't a good enough reason to modify it for everyone else. —   16:47, 19 January 2015 (UTC)
 * "current formatting suggests a section header, while it actually is formatted text only". I wrote. That is not an opinion, that is saying the format is bad and out of style. Avoid various kinds of overemphasis. And you saying "still" is weird, because this is your third or so angle of approach. Whatever I write, tomorrow I must expect another reason. -DePiep (talk) 17:09, 19 January 2015 (UTC)
 * That is your opinion. My opinion is that I don't think it looks like a header.  So, this is still a solution in search of a problem. —   17:23, 19 January 2015 (UTC)
 * Bingo: another day another another angle (you are trolling, right?). The other day it was "not enough discussion". "There needs to be discussion" you write without even reading two other editors right before your post. That's an attitude. So I think your going for quantity of text as argument, and having it your way by ididnothearthat.
 * "I don't think it looks like a header" is good for you, but does not nullify the issue. It also does not conclude that we can not change it (take note).
 * This is what the code says:
 * &lt;div style="font-size:120%;font-weight:bold;"> How to manage this template's initial visibility &lt;/div>
 * That is a break of style, an ad hoc style. Is there any example of this style used in such a situation? -DePiep (talk) 05:57, 20 January 2015 (UTC)

Description of autocollapse could be improved
It could just be me, but I find this statement unclear/ unhelpful: This wording suggests that the options are:
 * |state=autocollapse to show the template in its collapsed state but only if there is another template of the same type on the page
 * 1) appear in a collapsed state (if there's another template)
 * 2) not appear at all

It would be clearer if the logic were inverted:
 * |state=autocollapse to show the template in its expanded state, unless there is another template of the same type on the page, when it is shown in its collapsed state

Scarabocchio (talk) 17:53, 24 March 2015 (UTC)
 * Unclear to me too. Maybe better prevent any "unless"-construct, because that turns logic (such sentences, I have to read twice and make notes). This?:
 * |state=autocollapse
 * Does  the template (expanded state) when it is the first autocollapse-template on the page
 * Does  the template (collapsed state) when there is any other autocollapse-template above on the page.
 * -DePiep (talk) 19:21, 24 March 2015 (UTC)
 * DePiep, Putting the two cases on separate lines is good, and much clearer -- but I don't think the autocollapse works like you have described it. I think that it's like this:
 * |state=autocollapse
 * Does  the template (expanded state) if there are no other autocollapse-templates on the page
 * Does  the template (collapsed state) if there is another autocollapse-template on the page.
 * ie if you have more than one, ALL are collapsed. Scarabocchio (talk) 21:27, 24 March 2015 (UTC)
 * Well, see: current text is so unclear ;-). Your text then is better. I won't go in the wording any further, but we agree an improvement is needed. Let's do it. -DePiep (talk) 21:35, 24 March 2015 (UTC)

Hmmm ... a little more digging shows that the state of the other template(s) doesn't make any difference to the autocollapse. Trying the following (yes, one by one rather than all on the same page :-) gives the following results:
 * both closed


 * the second (and only  case) is closed


 * the second (and only  case) is closed

So, even if there's only one, that template is still collapsed, which leads us more towards:
 * |state=autocollapse
 * the template if it is the only collapsible template (=navbar?) on the page
 * the template to the header line if there are any other templates of the same type

I think that the new wording will have to be written by someone who fully understands the phrase "template of the same type" used in the current doc, to make the autocollapse dependencies explicit, and clearer than they are now. Scarabocchio (talk) 04:17, 25 March 2015 (UTC)
 * More background: Help:Collapsing.
 * It says: "Adding the autocollapse class causes the table to collapse when there are 2 or more collapsible tables on the page." That simple ;-). -DePiep (talk) 11:25, 25 March 2015 (UTC)
 * So, your 21:27 post is the right one. In the current doc text (first quote here): "... only if there is another template of the same type on the page ... ", 'of the same type' is confusing (what type?) and wrong (class not type). It could just say 'using the same autocollapse class'. -DePiep (talk) 11:32, 25 March 2015 (UTC)

More digging... it's got nothing to do with autocollapse, and it doesn't actually have anything to do with templates at all. "if there is a template of the same type" should be "if there is another wikitable with the  attribute":

is enough to collapse the template.

Given that most editors will have little idea about wikitable attributes, the wording will need to be generous
 * state=autocollapse
 * shows the template  to the header line if there is another navbar, sidebar, or other wikitable with the collapsible attribute on the page
 * shows the template in its  state if there are no other collapsible items on the page

That's wordy, but should provide enough explanation to all editors regardless of their knowledge of wikitable syntax.

Scarabocchio (talk) 12:56, 25 March 2015 (UTC)
 * Agree, not "template". Better: "shows the table collapsed". Or "any other table or box", as the reader sees it. -DePiep (talk) 13:19, 25 March 2015 (UTC)

Width
I am going to add a description for another parameter called width. But it will only show if a width parameter is passed into his template. I am adding a new header to some templates that use and  but are not contained in a collapse box.

{| class="navbox collapsible " style="width: ;" |- ! class="navbox-title" style="background:none;" | |-

This template is a useful addition to add at the bottom as it is for many similar templates that use, but as you can see above I am also using another parameter called width for which I need to explain how it works. So I am going to add the text to this template, but it will only be visible if the parameter "width" is passed into this template -- PBS (talk) 10:53, 18 April 2015 (UTC)

I have added a second line activated in the same way called "align". -- PBS (talk) 14:44, 18 April 2015 (UTC)

Too complicated
I think that this template is far to complicated for one that is only visible on the talk page and is just a generalisation of a standard "doc" as used on thousands of template.

For example why use: How to manage this template's initial visibility How to manage this template's initial visibility

when the same affect can be manufactured with: How to manage this template's initial visibility How to manage this template's initial visibility

or using a standard header as shown in this section header: ===How to manage this template's initial visibility===

How to manage this template's initial visibility
? The disadvantage of the current style is that what is a simple piece of text looks very complicated for someone not familiar with <div style=... type of expressions which I think is an unnecessary barrier to those editors who wish to edit this template -- PBS (talk) 10:53, 18 April 2015 (UTC)


 * WP:SOFIXIT. Documentation should be clear and concise. Sardanaphalus has saturated the documentation with all kinds of unnecessary markup-fluff; that was his editing style. I wouldn't mind a blanket revert to pre-Sardanaphalus state.  11:41, 18 April 2015 (UTC)


 * I'd want it to be non-styled being boilerplate text. Stand-alone transclusions, without enveloping documentation page, must be covered as documentation, but deprecated. -DePiep (talk) 12:11, 18 April 2015 (UTC)
 * I am not sure what you mean, but I have simplified what is there. -- PBS (talk) 14:42, 18 April 2015 (UTC)
 * You answered my call. Explaining afterwards: When I transclude this into a regular /doc page, I want it to be plain text that I can sectionize & style as needed there (eg 2-= deep or 3-= deep). When it is stand-alone, it should show & act as a documentation page by itself. I'm glad that the constructed bolding (suggesting a section? LEvel?) has gone. -DePiep (talk) 17:30, 18 April 2015 (UTC)
 * Glad to be of help (as it is so easy to get lost down the rabbit hole with this type of thing). -- PBS (talk) 20:22, 18 April 2015 (UTC)
 * Yep. In this one, I am happy with any simplification, and won't do details. Support from Edokter is always welcome too. Stay bold in this I'd say. -DePiep (talk) 20:34, 18 April 2015 (UTC)

Also 1) this template has a wide gap at the bottom and 2) its heading isn't large enough. See Template:Herbs & spices/doc. The version now in the sandbox seems to work. — Preceding unsigned comment added by 195.147.63.233 (talk) 09:41, 20 April 2015 (UTC)

Template-protected edit request on 25 April 2015
Change line:

Unless set otherwise (see the state parameter in the template's code), the template's default state is

to

Unless set otherwise (see the state parameter in the template's code), the template's default state is

To bring in line with documentation. Ignore the nowiki tags.

--Jules (Mrjulesd) (talk)  17:32, 25 April 2015 (UTC)
 * Yes check.svg Done I see that nobase isn't working either, and the following parameters are undocumented: align, title-background, width. Alakzi (talk) 17:50, 25 April 2015 (UTC)


 * --Jules (Mrjulesd)  20:42, 25 April 2015 (UTC)

Transclude TemplateData on the documentation page?
Could we use this template to transclude TemplateData on the documentation page of all templates that use it?

Something like the following: {	"params": { "state": { "label": "State?", "description": "Should the navbox be collapsed, expanded or autocollapse?", "type": "line", "default": "autocollapse" }	},	"description": "Shows a navigational box of similar articles" } Would this work? Any downsides? What if the template already has TemplateData? &mdash; Martin (MSGJ · talk) 08:55, 19 May 2015 (UTC)

Bullet points
Wouldn't it make sense to use bullet points for the several items here? Easier on the eyes  czar  18:21, 26 January 2016 (UTC)

Auto transclusion
Could this documentation be automatically transcluded by Template:Navbox when used in the template namespace and the state parameter is defined? I.e. something like the following &mdash; Martin (MSGJ · talk) 13:42, 19 February 2016 (UTC)
 * Many navboxes already have it, so duplication would ensue. -- Red rose64 (talk) 21:14, 19 February 2016 (UTC)
 * Additionally, with that code, this template would confusingly show on navboxes that have state set without allowing overriding it (e.g., collapsed instead of state). Regarding duplication, it should be possible to only show this template's output if called from navbox: add to the latter and have this template return nothing if the parameter isn't set. SiBr4  (talk ) 21:44, 19 February 2016 (UTC)

Template-protected edit request on 8 October 2016
Please see Collapsible option/sandbox. The instances of should be changed with  to prevent potentially confusing instructions on templates (such as Template:AC/DC) which are subpages. This will allow AC/DC to show the help  instead of. This is especially useful in this case, as AC is used by ArbCom. -- The Voidwalker  Whispers 20:44, 8 October 2016 (UTC)
 * Looks like the nobase param was introduced here and later simplified. Appears to be an inconsistency with the current documentation too. — Andy W.  ( talk  · ctb) 16:05, 9 October 2016 (UTC)
 * Yes check.svg Done — Andy W.  ( talk  · ctb) 16:08, 9 October 2016 (UTC)

Description of autocollapse could be improved (reboot)
Some 20 months ago, and I had a fruitful conversation (Description of autocollapse could be improved, above) over improving the, um, sub-optimal description of the autocollapse option.

In addition, the layout and the use of the and the example use (e.g.  ) is confusing. We currently have something that looks like this:

I suggest restructuring, adding bullet points and correcting the false implication that the autocollapse is dependent only on other templates ("another template of the same type"), which is incorrect ... something like this, perhaps:

Scarabocchio (talk) 06:10, 2 November 2016 (UTC)
 * Looks like an improvement to me. Notes:
 * Opening: "To set this template's ... when it first appears "
 * Use either "title bar" or "header line", not both.
 * Last sentence "Unless ..." is a double: "Unless otherwise" and "default" are the same. Maybe write: Default behaviour, when a parameter value missing, is autocollapse. -DePiep (talk) 08:15, 2 November 2016 (UTC)


 * I agree with your points. I've added the box title (How to manage this template's initial visibility) to show some additional repeated text. Let's see what other comments come in. Scarabocchio (talk) 08:28, 2 November 2016 (UTC)

I've removed the box title, and replaced 'header line' with 'title bar'. I can't find a satisfactory way of explaining the template default default (sic) display mode without using a lot of text. Perhaps just lose the final line, given that we cannot say what the default setting for any given template will be? State of play so far:

Scarabocchio (talk) 08:49, 2 November 2016 (UTC)
 * Even better. I like the listing setup (but I'm a technician, other people may like a more verbose description). Consider using "collapsed" not "in its collapsed state": needlessly long. Etc for "expanded". -DePiep (talk) 10:28, 2 November 2016 (UTC)
 * The repetition of the state (collapsed..collapsed..collapsed) is a bit clunky. Perhaps lose the last one in each option:

Scarabocchio (talk) 12:14, 2 November 2016 (UTC)
 * In a list, is it not clunky. It's structuring and short. Maybe verbose, in a novel, we need variant descriptions... -DePiep (talk) 20:47, 2 November 2016 (UTC)
 * Let's not loose it into perfectionism. I'd go with the 08:49 version. Make that a formal proposal? -DePiep (talk) 13:46, 4 November 2016 (UTC)
 * Agreed. I'm pretty much off-net until Tuesday.  I can do it then, or you could kick it off before if you wish Scarabocchio (talk) 17:45, 5 November 2016 (UTC)
 * No, we'll wait untill you are back online. See you. Meanwhile, this is what I ended up with:


 * -DePiep (talk) 23:13, 5 November 2016 (UTC)

Template-protected edit request on 10 November 2016

 * Procedural: for clarity of talk, the Collapsible option/sandbox version is to be used, whatever that version is. -DePiep (talk) 15:41, 10 November 2016 (UTC)

Following discussions here and here with, we have evolved an improved version of the documentation text, one which:-
 * clarifies what affects the state of the autocollapse, removing erroneous statement about 'another template of the same type'


 * adds bullet points into the structure to make it clearer and more obvious that there are three options


 * presents the options in a language that is accessible to the majority of readers

Please change the documentation to read as follows:

Specifically, this involves
 * 1) removing the initial (and redundant) header line 'How to manage this template's initial visibility'
 * 2) changing the texts as given, replacing the example 'Nordic Council' with the template name
 * 3) removing the last line about the possible initial state, as this does not (and cannot) identify the initial default state, and the default is irrelevent to someone who wishes to explictly set a given state.

Scarabocchio (talk) 12:29, 10 November 2016 (UTC)


 * Support. Since I am involved, I will not make this change myself. -DePiep (talk) 12:33, 10 November 2016 (UTC) (TE)


 * The documentation page Template:Collapsible option/doc is not protected, deactivating the edit request. — xaosflux  Talk 13:02, 10 November 2016 (UTC)
 * Apologies for the lack of an explicit target ... this is a template that creates a divbox of documentation information. The text to be replaced is that which is the output of the template itself, NOT the /doc text. Scarabocchio (talk) 13:41, 10 November 2016 (UTC)
 * (Procedural: the request has been reactivated -DePiep (talk) 15:51, 10 November 2016 (UTC))


 * There should probably be something about the last option being the default, even if it's only:


 * Other than that, I'd like to see the exact code change as suggested in the sandbox, since this template is used on nearly 99,000 pages.  Paine   u/ c  13:51, 10 November 2016 (UTC)


 * For clarity use: " : (default) and  are equivalent".  — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼  14:29, 10 November 2016 (UTC)
 * My understanding of the current phrase "Unless set otherwise (see the |state= parameter in the template's code), the template's default state is autocollapse" is that autocollapse is NOT necessarily the default, and cannot be described as such. Scarabocchio (talk) 14:37, 10 November 2016 (UTC)
 * As Scarabocchio says: the template itself can have a default set, so the statement is incorrect (in general)., remove the addition? 15:47, -DePiep (talk) 15:48, 10 November 2016 (UTC)
 * I think I see what both of you mean; however, I'm still not clear what is meant by "the statement is incorrect". The statement is only incorrect if the default parameter is not used when it should be used, e.g., expanded.  If "expanded" is used in the "default" parameter, then the last word becomes "expanded", rather than "autocollapse".  How exactly is that "incorrect"?   Paine   u/ c  02:19, 11 November 2016 (UTC)


 * Question: could the documentation be given a heading, e.g. "Visibility options"? &mdash; Martin (MSGJ · talk) 15:00, 10 November 2016 (UTC)
 * Adding any heading would blindly change the page layout on 99k pages. So better not into this proposal. Worth a separate development though. -DePiep (talk) 15:36, 10 November 2016 (UTC)


 * Sandboxed but not tested. Real life calls so gotta go.  Feel free to tweak it as necessary.   Paine   u/ c  15:08, 10 November 2016 (UTC)
 * Procedural: for clarity of talk, the Collapsible option/sandbox version is to be used, whatever that version is. -DePiep (talk) 15:41, 10 November 2016 (UTC)
 * Red information icon with gradient background.svg Not done: please establish a consensus for this alteration before using the template. I don't see much opposition to updating the template, but please come to some sort of consensus about what that update will be first. Each thread so far has changed the sandbox, and personally I'd like to see a "yeah, that looks good" from more than one person before "the change" is implemented. Primefac (talk) 21:09, 10 November 2016 (UTC)
 * You're right to do so, but a consensus was disrupted after the template was added. Hard to blame the OP for this. On top of this, editors did not simple !vote against because of an obvious error, but started the discussion anew, thereby even introducing an error -- then leaving. In other words, drive-by editors reopened the talk instead of understanding the Request-process, thereby driving the process in the mud. -DePiep (talk) 22:17, 10 November 2016 (UTC)
 * I realize that you and the proposer have worked on this very hard, and I do consider it very nice work for the most part; however, there may be implications that need to be addressed. For example, some pages like Nordic Council use a /doc page rather than to directly apply this template, as is done at Counties of Sweden.  That means that the div box used here will appear within that /doc page as another little box – a box within a box.  That's okay with me, but is it acceptable to all?  Only a discussion would determine that for certain.   Paine   u/ c  02:48, 11 November 2016 (UTC)
 * The divbox is not part of the intended solution -- it was used here on the template talk page merely to show what that solution might look like on the page. Now that the sandbox exists, it can be cut. Scarabocchio (talk) 07:27, 11 November 2016 (UTC)
 * Actually, there only has been one edit to the original proposal. -DePiep (talk) 22:18, 10 November 2016 (UTC)
 * Good points, you both. Scara and I missed the point to state exactly which code to replace. I suggest we prepare a new/improved proposal from this, then add a new request template. (also to address: current version opens with a bold line. Should return to not break doc page layout that use this). Scarabocchio, will be back on this later on. -DePiep (talk) 10:53, 11 November 2016 (UTC)

about the default setting
I can see how this template can be confusing, and especially how the wording you changed in the last sentence in the sandbox may have been confusing. The way you have it now appears to indicate that the template/navbar on which this /doc-type template goes has a state that is determined by the default parameter in this /doc-type template, which isn't true. The navbar's default state is determined by its state parameter, and then the default parameter in this /doc-type template may be used to actually show what the navbar's default state setting is.  Paine  u/ c  06:55, 14 November 2016 (UTC)
 * Hmmm ... I still think that my version is correct (ie the initial state comes from state, falling back to a default from default). I'll try and reword it.  The key thing that should be included if any text on the default is included, is that that default value itself comes from a parameter. ie that it may change in the future, and should not be depended on by any editor that wants a particular initial state set. Scarabocchio (talk) 08:27, 14 November 2016 (UTC)
 * Okay then, but you might want to keep in mind that the default parameter in this template does nothing to actually control the default state in the template to which it's applied. That's controlled only by the state parameter in the templates to which this template is applied.  The wording should reflect that, as it did before you changed it.   Paine   u/ c  10:52, 14 November 2016 (UTC)
 * Why does the default parameter even exist? The main template's initial state, ie its default state, is set by state. Using default to overwrite the setting made in the very same code is redundant. What's the problem if we remove default from this documentation page completely? -DePiep (talk) 12:41, 14 November 2016 (UTC)
 * The default param exists in this template to notify editors that the default state in any particular navbar is differently defined by the template's state param from the usual default of "autocollapse" (and to show when it's not differently defined and is still "autocollapse"). It's still a good question, though, because in a fairly high sample of the usages, I found none that had a change in the default state to "expanded" or "collapsed", so maybe the param can be removed?   Paine   u/ c  18:28, 14 November 2016 (UTC)
 * I get it, not redundant then, but to document what the default state is set to for the particular main template. I suggest: default should add to the proper bullet text (1/3): "This is the default state for this template.", nothing more. -DePiep (talk) 21:11, 14 November 2016 (UTC)

I don't like the idea that the default (ie the setting chosen if state= is not set) can change without describing how it might do so. To declare that a value has a default will risk that someone depends on it. If the default is given, the parameter should be described (or at least mentioned). That said, my favoured solution is to use the documentation to tell the editor how to set a given state, and leave out all mention of the default (choice and parameter). In the mean time: Scarabocchio (talk) 09:04, 15 November 2016 (UTC)
 * Missing the '=collapsed' option. -DePiep (talk) 10:24, 15 November 2016 (UTC)


 * re the default (ie the setting chosen if state= is not set) can change without describing how it might do so: so that default is changed by changing code inside the main template (template programming). However, this doc template is aimed at template-users (=editors editing an article). Because of this, 'changing the default inside the main template' is not topic of this doc template. At most, this doc template could describe what that default setting is. ('if you do not set the state parameter, the template will show xxx on the page.'). -DePiep (talk) 13:50, 15 November 2016 (UTC)
 * Fine. Having noted my reservations, I withdraw them .... Write something in the sandbox, and let's get this edit request moving again. Scarabocchio (talk) 14:28, 15 November 2016 (UTC)
 * I also concluded (as a line of thinking): 1. remove all reference to any 'default' from this doc page; 2. insert just a 'default' mentioning that is needed in this doc. -DePiep (talk) 15:23, 15 November 2016 (UTC)

Improvements

 * To build an improved version -DePiep (talk) 21:03, 11 November 2016 (UTC)


 * Template:Authority: no documentation background missing? -DePiep (talk) 21:03, 11 November 2016 (UTC)
 * It depends on how the collapsible option is called. Called directly, it outputs text onto a plain background. The usual way is via documentation, which wraps the output in the bordered green background. Scarabocchio (talk) 09:34, 14 November 2016 (UTC)
 * OK, not to be changed in this proposal then. However, a point can be made that this template should have /doc style always (including light green background). -DePiep (talk) 12:42, 14 November 2016 (UTC)
 * I propose to make this template document-defined always (e.g. the green bg color). See documentation for code settings . not that helpful-DePiep (talk) 21:14, 14 November 2016 (UTC)
 * Why not add Documentation subpage to this template? (needs a check on whether it can be nested into another doc page correctly). -DePiep (talk) 21:47, 14 November 2016 (UTC)

Signing off a final version?
,, , , , : I have made a final edit to the Collapsible option/sandbox ... can we agree on this text, and move on to updating the template? Scarabocchio (talk) 21:17, 1 December 2016 (UTC)
 * Support. Make this into edit request etc. -DePiep (talk) 21:30, 1 December 2016 (UTC)
 * Looks reasonable to me.  — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼  06:01, 2 December 2016 (UTC)
 * 72 hours, nem con ... I'll do this tomorrow morning. If there are any other requests for changes, they can be the subject of another TPER. Scarabocchio (talk) 21:56, 4 December 2016 (UTC)
 * Hmmm. How is the Default wording now? -DePiep (talk) 22:30, 4 December 2016 (UTC)
 * as Collapsible option/sandbox., I have 20 minutes for this today, and then nothing for 12 days. If you want to change anything, you will have to take over the TPER. Scarabocchio (talk) 11:46, 5 December 2016 (UTC)
 * Go ahead. In a new section I suggest. -DePiep (talk) 12:09, 5 December 2016 (UTC)

Template-protected edit request on 6 December 2016
Following discussions here, here and here, the output text of this template has been improved, to one which:-
 * clarifies what affects the state of the autocollapse, removing erroneous statement about 'another template of the same type'


 * adds bullet points into the structure to make it clearer and more obvious that there are three options


 * presents the options in a language that is accessible to the majority of readers


 * more fully and correctly describes the default initial visibility when the state parameter is not used.

Please change the text emitted by the template so that it matches [this text] in the sandbox. Scarabocchio (talk) 11:25, 6 December 2016 (UTC)
 * Yes check.svg Done &mdash; Martin (MSGJ · talk) 11:37, 6 December 2016 (UTC)

Instructional text
Can a statement be added to creators and other editors who come across this template be added that says something along the lines of:
 * You may copy and paste BASEPAGENAME to articles that should be transcluded.

Maybe below the initial visibility section? That way, no one will need to copy/paste into articles when the template parameter for "state" is already set for that. -- Star cheers peaks news lost wars Talk to me 17:56, 2 February 2018 (UTC)

Wrap this in a div with identifiable css class
So I can assign it the rule  of course. ―cobaltcigs 06:53, 21 October 2020 (UTC)

Problem with names including "/"
Namely.

All the best: Rich Farmbrough  15:41, 31 October 2020 (UTC).


 * Technically speaking, Template:HIV/AIDS in Africa is a subpage of Template:HIV. -- Red rose64 &#x1f339; (talk) 15:58, 31 October 2020 (UTC)

Not working
Possibly not the right place to ask this, but does anyone know why |state=expanded isn't working for the template here? Cheers, Number   5  7  10:20, 23 September 2021 (UTC)
 * Because Template:Netherlands Antilles elections doesn't recognise a passed-in state parameter - instead it sets autocollapse on the . -- Red rose64 &#x1f339; (talk) 20:41, 23 September 2021 (UTC)
 * I only added autocollapse to see if a lack of any state set in the template was causing the |state=expanded not to work. I've now removed it from the template, but it is still appearing collapsed... If there's something else that needs to be done, could you advise what? Cheers, Number   5  7  20:53, 23 September 2021 (UTC)
 * The presence of the triggers the collapse of the . -- Red rose64 &#x1f339; (talk) 22:39, 23 September 2021 (UTC)
 * So even setting the state to expanded can't override this? Number   5  7  22:51, 23 September 2021 (UTC)
 * You need to modify the code inside Template:Netherlands Antilles elections so that it recognises a passed-in state parameter and then passes that through to . -- Red rose64 &#x1f339; (talk) 22:54, 23 September 2021 (UTC)
 * How would I do that? Number   5  7  23:23, 23 September 2021 (UTC)
 * . -- Red rose64 &#x1f339; (talk) 23:35, 23 September 2021 (UTC)

Removal of statename
removed the  variable, but the current documentation still mentions it. Should it be restored to the template, or should it be removed from the documentation? jlwoodwa (talk) 03:24, 3 July 2023 (UTC)

Readability overhaul
I have overhauled the design of this template to improve readability; see the testcases to preview it. The new design shortens the text, removing a bunch of redundancy. Please let me know what you think; I'll plan to implement in a day or so if there are no concerns. Cheers, &#123;{u&#124; Sdkb  }&#125;  talk 20:13, 22 July 2023 (UTC)

Notified: Help talk:Collapsing. &#123;{u&#124; Sdkb }&#125;  talk 20:14, 22 July 2023 (UTC)


 * ✅ per WP:SILENTCONSENSUS. &#123;{u&#124; Sdkb  }&#125;  talk 22:20, 28 July 2023 (UTC)
 * I support this overhaul in general, but I don't think it looks right on navbox pages like Tommy Wiseau, where it is used outside of, and in the absence of, a proper documentation box. The ugly bold "Initial visibility" text provided some indication that there was a break between the navbox content and some sort of explanation. It was ugly but functional. I wonder if we need a built-in heading or something to separate the navbox from this template's content, which is now butted right up against many navboxes and looks like it is part of the template's transcludable content. I'm open to ideas. – Jonesey95 (talk) 03:55, 7 August 2023 (UTC)
 * Great minds think alike, @Jonesey95. See Bots/Requests for approval/SdkbBot 4, where I'm working on introducing proper documentation to these navboxes. Cheers, &#123;{u&#124; Sdkb  }&#125;  talk 05:32, 7 August 2023 (UTC)
 * Great idea! I was away for a week, so I hadn't caught up that far before I posted the message above. The replacement template is very nice. – Jonesey95 (talk) 15:35, 7 August 2023 (UTC)

Relevant BRFA
You are invited to join the discussion at Wikipedia:Bots/Requests for approval/SdkbBot 4. &#123;{u&#124; Sdkb  }&#125;  talk 05:11, 2 August 2023 (UTC)

Could we add syntax highlighting to the 2 bullets?
So that they would appear as: and others (myself included) have been adding syntax highlighting to improve the look of template docs for a while, so adding it to templates like these I think is the next logical step. ~ Tom.Reding (talk ⋅dgaf) 02:16, 27 February 2024 (UTC)
 * will show the template collapsed, i.e. hidden apart from its title bar.
 * will show the template expanded, i.e. fully visible.
 * Sounds worth a try to me. Do you want to give it a try in the sandbox? – Jonesey95 (talk) 03:15, 27 February 2024 (UTC)
 * I've made a change in the sandbox. Seems to work ok. -- WOSlinker (talk) 13:57, 27 February 2024 (UTC)
 * That's live now. -- WOSlinker (talk) 13:22, 28 February 2024 (UTC)
 * Looks good to me. – Jonesey95 (talk) 18:50, 28 February 2024 (UTC)