Template talk:Collapse top/Archive 1
![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 |
Change of color
I changed the orange color to light green, because the former color is really too conspicuous for me to focus on reading real discussions hidden in the table box. (e.g. WP:SPI) If you think that the changed color is not desirable, feel free to change to any "neural color". Thanks--Caspian blue 23:36, 16 January 2009 (UTC)
Width
Extended content
|
---|
Note, this template (AFAICT) gives no option to increase width. For those who want to widen the template, adding something like [[:File:Grey line.png|700px]] works. -Stevertigo 16:04, 19 March 2009 (UTC) |
Usability?
While collapse boxes save space, they actually impair usability in several major respects. For example the text within the collapse box is not searchable in the usual way, and clicking and entry in a table of contents no longer takes the user to a particular section if the section is collapsed. The template should be changed so that it says what the collapse box does: "The following content has been placed in a collapse box to save space." Short Brigade Harvester Boris (talk) 21:52, 22 May 2009 (UTC)
- Hi, can't you do that if you're an admin? --Caspian blue 22:03, 22 May 2009 (UTC)
- Hey CB, thanks for the response but I'm unclear on two points: (1) Do what? (2) I'm not an admin, so not sure what that part of your comment means. Short Brigade Harvester Boris (talk) 22:18, 22 May 2009 (UTC)
- I thought 1) you are waiting for other admin's input on this even though you can "do" the change of the text 2) The thought was based on my assumption that you're "of course" an admin (why don't you run for RfA? :)). Sorry for the confusion. --Caspian blue 22:26, 22 May 2009 (UTC)
- Actually I used to be an admin. But it wasn't fun. So I quit. Short Brigade Harvester Boris (talk) 22:41, 22 May 2009 (UTC)
- I thought 1) you are waiting for other admin's input on this even though you can "do" the change of the text 2) The thought was based on my assumption that you're "of course" an admin (why don't you run for RfA? :)). Sorry for the confusion. --Caspian blue 22:26, 22 May 2009 (UTC)
- Hey CB, thanks for the response but I'm unclear on two points: (1) Do what? (2) I'm not an admin, so not sure what that part of your comment means. Short Brigade Harvester Boris (talk) 22:18, 22 May 2009 (UTC)
"need to be substed for the time stamp to work properly." What?
Can anyone explain this from the /doc:
- {{Collapse top}}, or the redirect {{DAT}}, and {{Collapse bottom}} need to be substed for the time stamp to work properly.
Yes, I just edited it, but only for consistency with the /doc being shared, and DAT being used in the example above; I have no idea why it is so or if it currently is needed. Mark Hurd (talk) 08:29, 31 May 2009 (UTC)
Documentation error - Around header text
In Template:Collapse top#Around header text / "Replace with:" where it says
- {{subst:Collapse|Heading}}
shouldn't that read
- {{subst:Collapse top|Heading}}
? --- ToET 00:14, 6 September 2009 (UTC)
- I just found that error as well. The documentation seems to be wrong (WP:SPADE). I do wish "whoever has powers" would fix this to save a lot of research time. Thanks to whomever fixes it. --Aladdin Sane (talk) 04:08, 22 October 2009 (UTC)
Done, feel free to just fix it yourselves next time, template documentation is usually in a subpage and not protected. Amalthea 08:18, 22 October 2009 (UTC)
- Thanks. I admit I missed the edit links in the docs. The "Edit this page" tab being missing, I failed to look more closely. —Aladdin Sane (talk) 12:48, 22 October 2009 (UTC)
- I just found that error as well. The documentation seems to be wrong (WP:SPADE). I do wish "whoever has powers" would fix this to save a lot of research time. Thanks to whomever fixes it. --Aladdin Sane (talk) 04:08, 22 October 2009 (UTC)
Accessibility issue needs to be fixed.
{{Editprotected}} The font size reduction is too much for some readers even as-is, but when this template is used inside another that already had a reduced font size (e.g. a {{todo}}), it's just a killer, as the 10% font size reduction becomes 20% and so on. The problem is that this template recycles CSS classes intended for navboxen, when this is not a navbox and is not meant to actually look like one. The fix I have implemented overrides the font shrinking and (in the browsers I've tried so far) keeps the text at exactly its original size (inside another shrinking template such as a todo list the text inside this template will be the same size as the rest of the text in the todo box or whatever).
I have fixed this at {{Collapse}}; you can just copy-paste the div font-size code (2 occurrences).
PS: I don't think this needs some protracted consensus discussion, as the shrinkage effect is almost certainly an unintended consequence of the class used, and a severe WP:ACCESS problem like this trumps editorial whims. Also, the change can't really have any negative effect, since all it does it stop a cascade of ever-shrinking font sizes. — SMcCandlish Talk⇒ ʕ(Õلō)ˀ Contribs. 15:21, 17 January 2010 (UTC)
Done. I didn't see the need to use a div though. I set the fontsize on the tablecell instead. —TheDJ (talk • contribs) 20:55, 17 January 2010 (UTC)
Refactoring
I have added this text:
- In line with with the Wikipedia:refactoring guideline, if an editor who comments are included in a collapsed discussion objects to the use of this template to alter the look of a talk page, then it should not be used.
under a section called "General information". As the Wikipedia:refactoring guideline says
- Refactoring is a form of editing whose goal is to improve readability while preserving meaning. It is a stronger term than copy editing and can include removing superfluous content, summarizing long passages, and any other means that alter the presentation of information.
Which is I think a fair description of the use of this template on talk pages when it is used to alter the look of a talk page by collapsing a conversation and as the refactoring guideline goes on to say:
- Refactoring should only be done when there is an assumption of good faith by editors who have contributed to the talk page. If there are recent heated discussions on the talk page, good faith may be lacking. If another editor objects to refactoring then the changes should be reverted.
I think this addition is justified as it resolves any potential edit-war on the talk page by reverting to the status quo. -- PBS (talk) 10:31, 1 March 2010 (UTC)
merge template
{{editprotected}}
could someone add a {{mergefrom}} template to this page, please? put the following at the top of the page:
<noinclude>{{mergefrom|Template:Hidden archive top}}</noinclude>
This merger will require modification of this template, and a merger of templates {{cob}} and {{hab}} as well. --Ludwigs2 16:34, 1 March 2010 (UTC)
Done — Martin (MSGJ · talk) 17:17, 1 March 2010 (UTC)
Other wikis
What do I need to do to get this to work on my wiki? See http://libertarianwiki.org/Template:Collapsetop 161.98.13.100 (talk) 02:48, 17 March 2010 (UTC)
- You need to add some code to your Wikimedia:Common.css and Wikimedia:Common.js file. I added this change to :no:MediaWiki:Common.js (you will probably not rename show/hide as I did there) and this change to :no:MediaWiki:Common.css at the Norwegian wiki to get it running. Nsaa (talk) 13:09, 30 March 2010 (UTC)
The explanation is at mw:Manual:Stealing_content_from_Wikipedia. Tisane (talk) 15:50, 30 March 2010 (UTC)
How to pass partly red text to the custom warning message?
This {{cot|custom warning|this is a custom warning line that will do your <span style="color:blue;">'''face blue'''</span>}} do not work:
custom warning
|
---|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
- Interesting... I'm not sure why that doesn't work, and I'll look into it, but in the meantime here's a workaround using {{color}}:
{{cot|custom warning|this is a custom warning line that will do your {{color|blue|'''face blue'''}}}} {{lorem ipsum}} {{cob}}
custom warning
|
---|
this is a custom warning line that will do your face blue |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
- --Ludwigs2 17:21, 30 March 2010 (UTC)
- I believe the problem is the "=" sign in an unnamed parameter. Try using {{cot|custom warning|2=this is a custom warning line that will do your <span style="color:blue;">'''face blue'''</span>}} instead. Plastikspork ―Œ(talk) 18:03, 30 March 2010 (UTC)
custom warning
|
---|
this is a custom warning line that will do your face blue |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
Works in IE, not Chrome?
This is my experience. Thoughts? — Timneu22 · talk 21:10, 15 June 2010 (UTC)
- Are you referring to this? Plastikspork ―Œ(talk) 21:43, 15 June 2010 (UTC)
- Precisely. Mmmph. Pretty sure these things used to work. Is that where I should follow the discussion (I realized it wasn't specifically this template's issue)? — Timneu22 · talk 22:59, 15 June 2010 (UTC)
- I would say so. It seems to be a broader issue. Thanks! Plastikspork ―Œ(talk) 17:12, 23 June 2010 (UTC)
- Precisely. Mmmph. Pretty sure these things used to work. Is that where I should follow the discussion (I realized it wasn't specifically this template's issue)? — Timneu22 · talk 22:59, 15 June 2010 (UTC)
Font colour
Can a parameter be added for the font colour of the heading? Hazard-SJ Talk 22:52, 15 August 2010 (UTC)
- You can achieve this now by overloading the background colour parameter (see wikitext):
Heading
|
---|
Text |
- It's a bit of a hack, but it works. Plastikspork ―Œ(talk) 01:37, 17 August 2010 (UTC)
Weird
Hi. Have a look at the collapsible template at Template:Infobox power station/doc#Parameter names and descriptions, and full syntax. Any idea why the template headers change colours when added to the collapse template? Rehman(+) 12:05, 24 October 2010 (UTC)
- I'm not seeing that happening. what browser are you using? --Ludwigs2 14:57, 24 October 2010 (UTC)
- I'm using Mozilla Firefox 3.6.11. It's the same with Internet Explorer 8.0.7600.16385. Rehman(+) 15:07, 24 October 2010 (UTC)
- On up-to-date versions of Safari (5.0.2) and Firefox (3.6.6) on a Mac, the template headers are the same color (dark gold). Unfortunately, whoever wrote this tempalte didn't use the standard {{infobox}} format, so it's a pain to diagnose. I'll bet that if you converted it to the standard format, the problem you're seeing would go away. --Ludwigs2 16:05, 24 October 2010 (UTC)
- Sorry my bad. I didn't mean the dark gold section headers. I meant the left column headers (Offician name, country, etc). It changes from no colour, to something like light-bluish.... Rehman(+) 00:07, 25 October 2010 (UTC)
- Ah, I see. well, this is probably caused by the template inheriting the 'Navbox' class of the table that makes {{collapse top}} work. you might be able to fix it by monkying with the class of the infobox table to prevent inheritance, but (as I said above) the better approach would be to convert this mess to standardized {{infobox}} format. --Ludwigs2 01:13, 25 October 2010 (UTC)
- Well, the genius behind that mess is me ;) I will see what I can do to turn the template to the standard format, as I never came across it before. The template is pretty much inherited from {{Infobox dam}}; and took me about a month to get it working. So would take another month or two to convert it again. ;) Kind regards. Rehman(+) 09:38, 25 October 2010 (UTC)
- No, it will take you 15 minutes or so to familiarize yourself with the format, and 30 minutes to an hour to do the conversion. it should work first or second draft. The only two gotchas are
- keep in mind that you can't have headers and label/data with the same index (the header will cancel out the label/data). so, if you use
|header5=
, you'll want to use|label6=
and|data6=
- try to leave yourself a little wiggle room. you can use index numbers up to 80, they don't need to be in sequence, and it's a pain to readjust all the index numbers to add new parameters, so skipping a couple of index numbers before each header (or at other likely points) makes updating the template much easier in the future.
- keep in mind that you can't have headers and label/data with the same index (the header will cancel out the label/data). so, if you use
- I'll take a look at converting infobox dam, myself. --Ludwigs2 16:22, 25 October 2010 (UTC)
- No, it will take you 15 minutes or so to familiarize yourself with the format, and 30 minutes to an hour to do the conversion. it should work first or second draft. The only two gotchas are
- Thanks. I will handle the {{Infobox power station}} soon. Kind regards. Rehman(+) 00:30, 26 October 2010 (UTC)
Finished converting both infoboxes, and guess what, the collapsible template at the end of the doc page still alters the left-column background colours. I just upgraded my Firefox to 3.6.12, still the same. It's not much of an issue at the power station infobox, but it may be worth fixing in other cases... Rehman(+) 01:16, 31 October 2010 (UTC)
- Eh, I went ahead and fixed it the old fashioned way. --Ludwigs2 03:26, 31 October 2010 (UTC)
- Heh, good work! Rehman(+) 03:30, 31 October 2010 (UTC)
Unnecessary characters at front
{{editprotected}}
At the start of this template are the characters {<noinclude></noinclude>
. The <noinclude>
tags don't surround anything and thus are spurious; additionally, unless I am badly mistaken (EDIT: I am), the initial Thus I would recommend removing the initial {
character appears to be unbalanced.<noinclude></noinclude>
. Actually, the initial {
is balanced out in {{collapse bottom}}
. Reaper Eternal (talk) 00:39, 6 March 2011 (UTC)
- That big chunk of code in the beginning just expands out to
{|
. I haven't a clue why it's so elaborate, but I'd rather not yet touch it myself. Magog the Ogre (talk) 02:47, 6 March 2011 (UTC)- Some of the other code looks as though it could be shortened as well. I've placed a tidied up version in Template:Collapse top/sandbox if anyone cares to look. -- WOSlinker (talk) 17:03, 6 March 2011 (UTC)
- Nice work, I have implemented the change. Thanks! Plastikspork ―Œ(talk) 21:19, 6 March 2011 (UTC)
- Some of the other code looks as though it could be shortened as well. I've placed a tidied up version in Template:Collapse top/sandbox if anyone cares to look. -- WOSlinker (talk) 17:03, 6 March 2011 (UTC)
Collapse all page after???
was going to use this on the kings island page to colaps a table, but it colapses the entire page after colapse top, not just to colapse bottom. Maybe a conflict with a navbox at the bottom of the page? see here. how to fix this? --Nickvet419 (talk) 08:09, 19 March 2011 (UTC)
got it, collapse bottom need to be on its own line.--Nickvet419 (talk) 08:18, 19 March 2011 (UTC)
Restrict namespace
Can we restrict this so it cannot be used in articles? It is structured in such a way that it will not show in the print version. For example, try the "printable version" of this page. For this reason, I think it should only be used on user pages and talk pages, but restricting to non-articlespace would be a start. Frietjes (talk) 22:26, 8 April 2011 (UTC)
- Can the print stylesheet be modified so that the CSS class used by this template is displayed instead of hidden? That would probably be easier. Jehochman Talk 14:26, 9 April 2011 (UTC)
- It uses the navbox class, which is hidden in print. We definitely don't want to change that, since large chunks of navigation links aren't useful in print. To restrict it from articles, we would just need to add some thing like
{{main other | ... existing code ... | <span class="error">This template should not be used in articles ... </span> }}
- which would warn editors of what went wrong. It doesn't look like it has been used very frequently. Per MOS:COLLAPSE, I don't know why we need it in print anyway. The larger problem is that editors use the {{navbox}} template to do exactly the same thing. Thanks! Plastikspork ―Œ(talk) 14:32, 9 April 2011 (UTC)
max-width ?
Is there any possibility a max-width parameter could be added that would accept percentages as values? Cloveapple (talk) 05:47, 26 August 2011 (UTC)
- You could probably do this now by overloading the "indent" parameter, say "indent=0px; max-width: 50%", but a better idea would be to add a separate "style" paramter. Frietjes (talk) 20:11, 26 August 2011 (UTC)
- Thanks. I don't understand template coding enough to add a new parameter myself, but I'll try using the indent parameter and see what happens.Cloveapple (talk) 00:17, 27 August 2011 (UTC)
Expand parameter not working
I've copied the "Template:Collapse top" and "Template:Collapse bottom" to my user space on another wiki. Everything works as expected except that when the page loads the collapse box is uncollapsed / shows / is open by default. Once it has loaded, then I can show or hide the box by clicking the link and it works just fine.
As I understand it, the box should be collapsed by default when the page loads. No amount of my attempting to fix the problem has worked. Leaving the expand parameter out of the parameter list, setting the expand parameter to false, and setting the expand parameter to 0 all fail to collapse the box. Though I've modified the original template code to fit my needs in my user space, I've also tested an unmodifed version of the template copy-pasted directly off the wikipedia page into my user space and still get the same behaviour. In other words, the problem I'm having isn't due to an error introduced through my modifications; it happens even when the template hasn't been edited by me.
This is the template code I copied from wikipedia, pasted into my user space, and was able to make work successfully with the exception of the default expand-collapse issue noted above:
<div style="margin-left:{{{indent|0px}}}"><!-- NOTE: width renders incorrectly if added to main STYLE section--> {| <!-- Template:Collapse top --> class="navbox collapsible {{{{{|safesubst:}}}#if:{{{expand|}}}||collapsed}}" style="background: transparent; text-align: left; border: {{{border|1px}}} solid {{{b-color|silver}}}; margin-top: 0.2em; {{{{{|safesubst:}}}#if:{{{width|}}}|width:{{{width}}};}}" |- ! style="background-color: {{{bg|#CFC}}}; text-align:center; font-size:112%;" | {{{1|{{{title|{{{reason|{{{header|Extended content}}} }}} }}} }}} {{{{{|safesubst:}}}#if:{{{warning|{{{2|}}}}}} |{{{{{|safesubst:}}}!}}- {{{{{|safesubst:}}}!}} style="text-align:center; font-style:italic;" {{{{{|safesubst:}}}!}} {{{2|The following is an archived debate. <span style="color:red;">'''Please do not modify it.'''</span>}}} }} |- | style="border: solid {{{border2|1px silver}}}; padding: {{{padding|8px}}}; background-color: {{{bg2|white}}}; font-size:112%;" {{{{{|safesubst:}}}!}}<noinclude> {{lorem ipsum|3}} {{Collapse bottom}} {{Documentation}} <!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude>
I don't know if this would have any relevance, but I'm viewing the page in IE 8 (32-bit version) on a Windows 7 64-bit machine. But I'm able to see the template work correctly on the wikipedia page devoted to "Template:Collapse top", so it doesn't appear to be a browser-related issue. Thank you in advance for any assistance any one is able to offer. CCB2011 (talk) 05:33, 13 December 2011 (UTC)
- If I'm not mistaken, the collapse template makes use of some Javascripts local to English Wikipedia. Your problem might lie in that the other wiki doesn't have the right Javascripts, or has them installed for different parameters. WP:VPT would be a good place to ask. Magog the Ogre (talk) 08:18, 13 December 2011 (UTC)
- Check the project and skin CSS files as well. Collapsible Navboxes work by using javascript to hide and show table columns via css. If you don't have the right css classes (or if you have the cascade set up the wrong way) that can monkey-wrench them. --Ludwigs2 14:25, 13 December 2011 (UTC)
- Thank you, Magog and Ludwigs, for your responses. The other wiki is indeed using the installed JavaScripts with different parameters. They have a different implementation of a collapse box on that site and, with assistance from an admin, I've finally been able to find a Template that works. CCB2011 (talk) 00:53, 25 December 2011 (UTC)
Left title alignment feature, for much better reading flow in prose
![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
A new feature for left alignment of title has been installed, in the Template:Collapse top/sandbox, and tested in the Template:Collapse top/testcases subpages.
The new feature's documentation for the Template:Collapse top/doc page:
Parameters...
- 'left'
- If this parameter evaluates to true (i.e. is not empty), the title will be aligned left instead of centered, for better reading flow in prose, e.g. template documentation. It has no effect on the position of the box. There's no corresponding 'right', as there's no need for it, and it would interfere with the position of the "show/hide" button.
I've been having to painstakingly simulate this with |title=<div style="text-align: left;">Title here</div>
at templates like Template:Blockquote paragraphs because the centered text, while appropriate for warnings and notices, is quite reader-annoying when the template is used, for example, to hide blocks of boring source code test cases in the middle of documentation that someone's reading.
I've also fixed the problem that "heading" wasn't a synonym of "title".
Also simplified the red-bold warning code. We have a template for that, at {{strongbad}}
, so no need to do it with manual span and CSS (also has the benefit of using the semantically correct <strong>...</strong>
markup, instead of the purely typographic boldfacing of <b>...</b>
, which is what MediaWiki's '''...''' boldfacing resolves to.)
Example demonstrating all three changes:
Boring flamewar
|
---|
The following is a closed discussion. Please do not modify it. |
Code: {{Collapse top/sandbox|expand=y|left=y|heading=Boring flamewar|warning=y}} |
— SMcCandlish Talk⇒ ʕ(Õلō)ˀ Contribs. 08:14, 3 February 2012 (UTC)
Done And protected {{strongbad}} and {{strong}} for you, to prevent template vandalism since they are now used in this widely-used template. Anomie⚔ 21:10, 3 February 2012 (UTC)
Wording
I have changed archived to closed as it is in Template:Hidden archive top it was agreed on the talk page there that "archive" was not correct because archive has a specific meaning as in WP:ARCHIVE and that close was more appropriate. I would also suggest that the wording on {{Hat}} "This discussion has been closed" is more elegant than the phrase here "The following is a closed debate" and would suggest replacing the latter with the former. -- PBS (talk) 23:45, 7 February 2012 (UTC)
- Was thinking of that myself. You saved me from lodging another editprotected request. :-) — SMcCandlish Talk⇒〈°⌊°〉 Contribs. 07:51, 16 February 2012 (UTC)
Import to another wiki?
If I want to import this template to another wiki (well, I've done it and it doesn't work) what else do I need to do? I'm suspecting that the class="navbox collapsible" stuff needs to come too: where does that live? William M. Connolley (talk) 10:17, 6 April 2011 (UTC)
- http://en.wikipedia.org/wiki/MediaWiki:JQuery-makeCollapsible.js
- http://en.wikipedia.org/wiki/MediaWiki:JQuery-makeCollapsible.css
- I know this is used in the show/hide functionality. Reaper Eternal (talk) 10:41, 6 April 2011 (UTC)
- Thanks for the help. I tried importing those too, but it wasn't enough. I think I'll try talking to my admin - possibly the mediawiki I'm using needs an upgrade (perhaps a clue is that when I view those js/css on my wiki, they don't format nicely as they do here) William M. Connolley (talk) 20:39, 6 April 2011 (UTC)
Bump. Could some guru point me to the instructions on how to import the cot/cob templates to another wiki? --Surturz (talk) 05:14, 8 May 2013 (UTC)
Font color for title
![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
color: {{{fc|black}}}
By adding the code above for the title style. As seen on the test cases, I have added fc as a arg value so when background colors are so bad for the black text it can be changed.—CKY2250 ταικ 22:18, 13 November 2013 (UTC)
Question: Cky2250, I see that your edit removed the
{{{bg1}}}
parameter.[1] Is this intentional? — Mr. Stradivarius ♪ talk ♪ 23:28, 13 November 2013 (UTC)- Pinging because I messed up the first notification: Cky2250. — Mr. Stradivarius ♪ talk ♪ 23:32, 13 November 2013 (UTC)
- Hmmm, I have no idea what you're talking about. I only added code. Are you copying the sandbox script to the final? If so the previous person must have added directly to the final script.—CKY2250 ταικ 00:58, 14 November 2013 (UTC)
- Maybe it would help if I clicked the link, whops lol. Yes what a just said is the case then. The sandbox was outdated.—CKY2250 ταικ 01:01, 14 November 2013 (UTC)
- So here is the updated sandbox [2]—CKY2250 ταικ 01:06, 14 November 2013 (UTC)
Done. Glad we straightened that one out. :) — Mr. Stradivarius ♪ talk ♪ 09:02, 14 November 2013 (UTC)
Relevant RfD
An RfD is being held that may affect templates similar to this one: See Wikipedia:Redirects for discussion/Log/2014 February 15#Template:Cop. —/Mendaliv/2¢/Δ's/ 02:13, 16 February 2014 (UTC)
What does "expand=no" do?
Currently, |expand=no
expands the box. That is because it has code <code> #if:{{{expand|}}}||collapsed}}</code>. The documentation says: "If this parameter evaluates to true (i.e. is not empty) ...". That may be correct, helpful it is not. I suggest changing that behavior:
|expand=yes
inyes, y, YES, Y, 1
expands.
All other values & settings (including: <blank>, omitted, + default behaviour) then do expand=no
.
Code proposal (subst: requirements omitted here):
{{yesno|{{{expand|no}}}|def=|no=collapsed}}
(see {{yesno}}. Theno=
setting is optional, could be left blank too = returns blank in these cases). -DePiep (talk) 07:53, 12 March 2014 (UTC)
Switch "warning" is not an accurate description
![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
The switch "warning" does not accurately describe what it does or its purpose. Suggest renaming to "closed" with "warning" as an alias for compatibility only. Since the purpose is to note a closed discussion, this will help avoid confusion for editors who don't make the connection between "warning" and "closed discussion". If this change is made, I'll update the documentation accordingly. Ego White Tray (talk) 03:03, 3 July 2014 (UTC)
Not done: the text "Please do not modify it" sounds enough like a warning to me, and I'm not a fan of adding parameter aliases unnecessarily. If others think there is a problem too, though, then perhaps we could consider changing it. — Mr. Stradivarius ♪ talk ♪ 10:29, 3 July 2014 (UTC)
Allow case for Title=
I noticed that if the parameter is passed as "|Title=" instead of "|title=" then it fails to display the title text. It should be a simple matter to include this case.~Technophant (talk) 19:49, 6 September 2014 (UTC)
- It's a feature of the template parser that parameter names are case-sensitive on all characters (unlike page names, where the case of the first character is immaterial). It's a general principle that when writing templates, parameter names are all-lowercase, unless there be a good reason to use another case variant. Each case variant complicates the template code, and slows down processing. --Redrose64 (talk) 20:29, 6 September 2014 (UTC)
Mobile View
I recognized that this template is not working in mobile view. :) The contents are not displayed. (Tested on Chrome 37.0, IE 11.0) --Jmkim (talk) 01:47, 9 September 2014 (UTC)
- This is because the template uses the
navbox
class, which is hidden in mobile view. --Redrose64 (talk) 10:00, 9 September 2014 (UTC)- nor will it appear in print. we should replace this with other options (e.g., {{hidden begin}}) in articles where we want the information to appear in mobile view or in print. Frietjes (talk) 14:37, 9 September 2014 (UTC)
- @Frietjes: with regards to this edit to the documentation. "Any contents enclosed by this template will not appear in mobile view or in print. For this reason, the use of this template within articles is discouraged" Surly it is discouraged anyway for use in article spaces. Indeed I would go as far as to suggest placing some code in the template to stop its usage in article space. -- PBS (talk) 22:04, 9 September 2014 (UTC)
- PBS yes, we should add some namespace detection and have the template return an error if someone tries to use it in an article. however, at the moment, it is still used in over 200 articles, so some cleanup is needed first. I have cleaned up about 100, but it will take some time to do the rest. Frietjes (talk) 13:26, 10 September 2014 (UTC)
- @Frietjes:with what are you replacing their usage? -- PBS (talk) 13:38, 10 September 2014 (UTC)
- PBS yes, we should add some namespace detection and have the template return an error if someone tries to use it in an article. however, at the moment, it is still used in over 200 articles, so some cleanup is needed first. I have cleaned up about 100, but it will take some time to do the rest. Frietjes (talk) 13:26, 10 September 2014 (UTC)
- @Frietjes: with regards to this edit to the documentation. "Any contents enclosed by this template will not appear in mobile view or in print. For this reason, the use of this template within articles is discouraged" Surly it is discouraged anyway for use in article spaces. Indeed I would go as far as to suggest placing some code in the template to stop its usage in article space. -- PBS (talk) 22:04, 9 September 2014 (UTC)
PBS, a few different options.
- (1) if it is a simple table that is being collapsed, you can replace
{{collapse top|title=The title}} {| class="wikitable" |- ... |} {{collapse bottom}}
with
{| class="wikitable collapsible collapsed" style="width:100%" |- ! colspan=X | The title <!-- Note X should be the number of columns in the table --> |- ... |}
- (2) if the table is very wide, you can emulate the font size used in infoboxes, but still have a fullsized title with
{| class="wikitable collapsible collapsed" style="width:100%; font-size:88%" |- ! colspan=X | {{resize|114%|The title}} <!-- Note X should be the number of columns in the table --> |- ... |}
- (3) for more complicated cases, you can simply replace {{collapse top}}/{{collapse bottom}} with {{hidden begin}}/{{hidden end}}
{{hidden begin|style=border:1px solid #aaa|titlestyle=text-align:center;|title=The title}} {{hidden end}}
- (4) or, if you don't don't really want the border, and you want something very minimalist, you can use
{{hidden begin|toggle=left|title=List}} {{hidden end}}
- Frietjes (talk) 13:48, 10 September 2014 (UTC)
- some examples of all of these approaches are (1) Alialujah Choir, (2) Atypical antipsychotic, (3) Chebyshev polynomials, and (4) Mesoclemmys tuberculata. Frietjes (talk) 13:53, 10 September 2014 (UTC)
- of course, in some cases, collapsing probably wasn't need at all, in which case, I simply remove it (e.g., C.D. Primeiro de Agosto (basketball)). Frietjes (talk) 13:54, 10 September 2014 (UTC)
Use in Wikitables
Is there any way this can be used in Wikitables (or is there something else that can do it)? I've played around with it a bit, but haven't managed to find a way of doing so. I was wondering whether it would be possible to collapse certain rows in tables like this, so that election results tables with tonnes of parties can be rendered more readable. Cheers, Number 57 12:26, 17 September 2014 (UTC)
- Infoboxes are a form of table, and these sometimes include collapsible sections; indeed at Help:Infobox we see that the image upper right is a screenshot of Norwegian Lundehund which presently has two collapsible sections. The techniques used for collapsing there might be adaptable for tables in general. But, MOS:COLLAPSE should be observed. --Redrose64 (talk) 13:21, 17 September 2014 (UTC)
Protected edit request on 16 January 2015
![]() | This edit request to Template:Collapse top has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please copy full {{Collapse top/sandbox}} code into live page.
- Changes:
|expand=
now reads the value, and only shows (uncollapses) with a confirmation:
{{#switch:{{lc:{{{expand|no}}}}} |y|yes|expand|expanded|uncollapse|uncollapsed|show=uncollapsed |#default=collapsed}}
So a setting like |expand=no
does not show the content. Before: any value of expand= would cause a showing. This situation is a behavior change, but we should consider that the editor actually entered "do not expand", so it makes sense.
- See {{Collapse top/testcases}}.
DePiep (talk) 23:32, 16 January 2015 (UTC)
Question: This change doesn't support t, true, on, +, or 1 -- Why not use {{Yesno}} to handle most of it? There are a couple there that yes/no doesn't respect (t, true, and on) and should probably be added to it. For the record, I support this request as long as the additional terms for affirmation are added. —
{{U|Technical 13}} (e • t • c)
18:12, 17 January 2015 (UTC)- {{yesno}} would require complicated logic here (as in: interacting parameters), eg to cover "blank" and "omitted". YesNo would still need to diff between negative and positive words somehow. The {{#switch}} list as proposed does the single one thing that is needed: check for postitive confirmation of the expand= setting (=question).
- The "true" and "1" option can be added to the switch list (pls do so if we agree).
- A note: I have added {{lc:}} to be editor-friendly; however it could be considered uncommon practice. If that's the case, {{lc:}} can be removed without asking. -DePiep (talk) 18:39, 17 January 2015 (UTC)
- Suggest keeping it simple. Just use yes and no or common abbreviations of them. You cannot try to guess every different thing an editor may try to type and you shouldn't try to. That's the reason we have template documentation. — Martin (MSGJ · talk) 10:32, 19 January 2015 (UTC)
- 1. It should cover existing usages. We don't know which word the editor used. Behaviour for existing setting like
|expand=true
should not change (editor intended uncollapse, saw uncollapse when preview/saved, and so should see this after a code change. 2. I see no advantage having to go to the /doc to check whether one should use "uncollapse" or "expand" (duh). Already today the /doc uses|expand=true
as example; you would break that. 3. Code exists to help the editor. Indeed "keep it simple" -- for the editor first. 4. You have not covered the blank and omitted options. -DePiep (talk) 11:48, 19 January 2015 (UTC)- KIS
Sleave it alone. If an editor is confused the first place to look is in the documentation. It says "If this parameter evaluates to true (i.e. is not empty) ...", if an editor can not understand what that means then we probably should recommend that they use {{discussion top}} Simples!.- 4. keep it simple - for the editor, not for the template code. Forcing a /doc visit is a complication. "If an editor is confused" - prevent that. It's cheap. 5. Having to remove a parameter to set it is not simple in any mind. Also, it is not consistent wikiwide. 6. As described, some behaviour change wrt the current doc will happen. Saying 'it's documented so it's OK' is not OK. The whole point is to change the illogic situation. -DePiep (talk) 13:19, 19 January 2015 (UTC)
- KIS
- 1. It should cover existing usages. We don't know which word the editor used. Behaviour for existing setting like
- Suggest keeping it simple. Just use yes and no or common abbreviations of them. You cannot try to guess every different thing an editor may try to type and you shouldn't try to. That's the reason we have template documentation. — Martin (MSGJ · talk) 10:32, 19 January 2015 (UTC)
- Really? How hard is it to change your proposal from:
{{#switch:{{lc:{{{expand|no}}}}} |y|yes|expand|expanded|uncollapse|uncollapsed|show=uncollapsed |#default=collapsed}}
- to:
{{#switch:{{Yesno|{{{expand|no}}}}} |yes|expand|expanded|uncollapse|uncollapsed|show=uncollapsed |#default=collapsed}}
- I mean seriously... How much more KIS
Scan it be? —{{U|Technical 13}} (e • t • c)
23:27, 19 January 2015 (UTC)- 1. I already replied to your original remarks. This is not a sequence reply, you are restarting. (Really, it sounds plain stupid to think it is about making it simple "for you" [=me]. Where did you read that?). 2. You have written yourself that YesNo requires extra attention for these options. That is complicating. Complicated not as in "difficult" at first, but complicated as in "multiple interacting elements". 3. Adding the YesNo as you did in the code already IS a complication: nested template. And there is no need for that. 3. You still need to prove that omitted and blank are covered as intended. -DePiep (talk) 06:35, 20 January 2015 (UTC)
- You have not responded to a confirmation made @18:39, three days ago. Why don't you connect to a positive reply? -DePiep (talk) 06:51, 20 January 2015 (UTC)
Not done I am closing this request due to lack of consensus. DePiep: you are not going to get very far unless you are willing to compromise to some extent. — Martin (MSGJ · talk) 22:13, 21 January 2015 (UTC)
- "compromise"? What are you talking about? Is that rewarding Tech13 for starting with "leave it alone" and then not replying to any point or question? I think you can only say that if you didn't follow the thread, or maybe have a secret preference. -DePiep (talk) 22:47, 21 January 2015 (UTC)
- Or, assuming that you do not mean the politicians compromise "use the left half of the {{YTesNo}} template", could you at least point to which element of Tech13's remarks is worth incorporating? -DePiep (talk) 23:22, 21 January 2015 (UTC)
- You have not responded to a confirmation made @18:39, three days ago. Why don't you connect to a positive reply? -DePiep (talk) 06:51, 20 January 2015 (UTC)
- 1. I already replied to your original remarks. This is not a sequence reply, you are restarting. (Really, it sounds plain stupid to think it is about making it simple "for you" [=me]. Where did you read that?). 2. You have written yourself that YesNo requires extra attention for these options. That is complicating. Complicated not as in "difficult" at first, but complicated as in "multiple interacting elements". 3. Adding the YesNo as you did in the code already IS a complication: nested template. And there is no need for that. 3. You still need to prove that omitted and blank are covered as intended. -DePiep (talk) 06:35, 20 January 2015 (UTC)
Parameter name tweak
![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please change
{{{2|The following is a closed debate. {{strongbad|Please do not modify it.}} }}}
to
{{{2|{{{title|{{{heading|{{{header|The following is a closed debate. {{strongbad|Please do not modify it.}} }}}}}}}}}}}}
Why: Various notice and message box templates use differing parameter names for the title/heading/header of the box, and it's really annoying. Just support whatever term people are familiar with and apt to remember. — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼ 20:43, 22 January 2015 (UTC)
- Oppose: slippery slope... Next someone will want
{{{2|{{{title|{{{Title|{{{TITLE|{{{heading|{{{Heading|{{{HEADING|{{{header|{{{Header|{{{HEADER|{{{name|{{{Name|{{{NAME|{{{lede|{{{Lede|{{{LEDE|{{{lead|{{{Lead|{{{LEAD|The following is a closed debate. {{Strongbad|Please do not modify it.}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
... Where does it end? —{{U|Technical 13}} (e • t • c)
00:18, 23 January 2015 (UTC)Not done: per Technical13's objections. Please reactivate the edit request if a consensus emerges. — Mr. Stradivarius ♪ talk ♪ 02:54, 23 January 2015 (UTC)
Causing out of order error on talk page
On my talk page (linked in signature) I use {{cob}} & {{cot}} heavily for readability purposes.
In the January 2014 RFC section there is the following text.
- {{cot|[[Talk:Campus rape#rfc_493CA63|Talk:Campus rape]]}}
Hello! You have been randomly selected to receive an invitation to participate in [[Talk:Campus rape#rfc_493CA63|the request for comment on '''Talk:Campus rape''']]. Should you wish to respond, your contribution to this discussion will be appreciated.
For tips, please see {{section link|Wikipedia:Requests for comment|Suggestions for responding}}. If you wish to change the frequency or topics of these notices, or do not wish to receive them any longer, please adjust your entries at [[WP:Feedback request service]]. <!-- Template:FRS message -->— <!-- FRS id 20498 --> [[User:Legobot|Legobot]] ([[User talk:Legobot|talk]]) 00:04, 24 January 2015 (UTC){{cob}}
{{Cot|[[Talk:Hydraulic fracturing#rfc_4F603EA|Talk:Hydraulic fracturing]]}}
Hello! You have been randomly selected to receive an invitation to participate in [[Talk:Hydraulic fracturing#rfc_4F603EA|the request for comment on '''Talk:Hydraulic fracturing''']]. Should you wish to respond, your contribution to this discussion will be appreciated.
For tips, please see {{section link|Wikipedia:Requests for comment|Suggestions for responding}}. If you wish to change the frequency or topics of these notices, or do not wish to receive them any longer, please adjust your entries at [[WP:Feedback request service]]. <!-- Template:FRS message -->— <!-- FRS id 20550 --> [[User:Legobot|Legobot]] ([[User talk:Legobot|talk]]) 00:02, 25 January 2015 (UTC)
{{cob}}
- {{cot|[[Talk:Campus rape#rfc_493CA63|Talk:Campus rape]]}}
Which renders in reverse order as
Hello! You have been randomly selected to receive an invitation to participate in the request for comment on Talk:Campus rape. Should you wish to respond, your contribution to this discussion will be appreciated. For tips, please see Wikipedia:Requests for comment § Suggestions for responding. If you wish to change the frequency or topics of these notices, or do not wish to receive them any longer, please adjust your entries at WP:Feedback request service. — Legobot (talk) 00:04, 24 January 2015 (UTC) |
Hello! You have been randomly selected to receive an invitation to participate in the request for comment on Talk:Hydraulic fracturing. Should you wish to respond, your contribution to this discussion will be appreciated. For tips, please see Wikipedia:Requests for comment § Suggestions for responding. If you wish to change the frequency or topics of these notices, or do not wish to receive them any longer, please adjust your entries at WP:Feedback request service. — Legobot (talk) 00:02, 25 January 2015 (UTC) |
Can anyone explain why Campus Rape renders at the bottom rather than in order? — Preceding unsigned comment added by SPACKlick (talk • contribs) 08:19, 26 January 2015
- Yes: the
{{cob}}
template must appear on a new line, it can't be appended to the previous line. This is true of all templates that close a table, such as{{s-end}}
, because the MediaWiki software only processes table markup such as|}
when it appears at the start of a line. The effect of it appearing mid-line is that the table is unclosed, and most browsers, on encountering non-table content inside an unclosed table, will move it above the table. --Redrose64 (talk) 11:59, 26 January 2015 (UTC)
anchor?
I wish to link - within the same page - to a section of text that has been collapsed using this template. Without giving a whole new section heading in the page, how do I do this? Is it possible to add an anchor or 'id' parameter to the template in the same way that mediawiki tables have the "id=" parameter (described here Help:Table#Section_link_or_map_link_to_a_row_anchor? Wittylama 12:50, 2 February 2015 (UTC)
- Yes, but you need to place the anchor either before the
{{collapse top}}
, or inside the|title=
parameter. If you put the anchor inside the collapsed content, it will only work when the section is expanded, see Wikipedia:Village pump (technical)/Archive 133#Section headers in collapse boxes. --Redrose64 (talk) 15:28, 2 February 2015 (UTC)- Let's add
<span id="{{{title|Extended content}}}"/>
to the titlebar. -DePiep (talk) 18:15, 2 February 2015 (UTC) - Redrose64 - yes, that's the problem I'm trying to address, being able to link directly to the box in its collapsed state... Clearly I'm not the only one, going by that Village Pump archive discussion. The page I'm working on will have many of these boxes (collaposed by default), linked to from other tables within the page. I've found a workaround though, which is to create a 5th-level-sub-heading befor each of the collapsed boxes, and then force the Table of Contents to not display beyond 4th level. This stops the ToC from being ridiculously long, but still gives me section headings to anchor to. Not perfect, but it's good enough for my needs. Wittylama 09:03, 3 February 2015 (UTC)
- @Wittylama: I'm guessing that you refer to User:Wittylama/SAI. That's fine for a user page, but if you intend utilising the technique in an article, you need to be aware of MOS:COLLAPSE. --Redrose64 (talk) 09:10, 3 February 2015 (UTC)
- @Redrose64:, shit. Yeah... that's what I'm working on. And, because it's an article about an annual competition that's happened for decades, there's already lots of tables of stats/results, and once I start adding in results for each year it will become visually very long. What do you recommend? I guess that the only options are to either: a) break the International Competitions by Year section of tables into a new sub-page, or b) to simply remove the "collapse" functions and live with the page being visually much longer. Wittylama 09:25, 3 February 2015 (UTC)
- How about separate pages for each decade, or even each year? You could ask at Wikipedia talk:WikiProject Music if there is a recommended format for this sort of thing. --Redrose64 (talk) 09:30, 3 February 2015 (UTC)
- Sub-pages for each year would be unnecessarily small, I could do one for each decade though - and even combine the "chorus" and "quartet" competition tables per-year in that (making a maximum of 20 tables per-sub page. However in the mean time, while I'm building the page in a sandbox, I'll keep it all together. Thanks for your help @Redrose64:. Wittylama 10:41, 3 February 2015 (UTC)
- How about separate pages for each decade, or even each year? You could ask at Wikipedia talk:WikiProject Music if there is a recommended format for this sort of thing. --Redrose64 (talk) 09:30, 3 February 2015 (UTC)
- @Redrose64:, shit. Yeah... that's what I'm working on. And, because it's an article about an annual competition that's happened for decades, there's already lots of tables of stats/results, and once I start adding in results for each year it will become visually very long. What do you recommend? I guess that the only options are to either: a) break the International Competitions by Year section of tables into a new sub-page, or b) to simply remove the "collapse" functions and live with the page being visually much longer. Wittylama 09:25, 3 February 2015 (UTC)
- @Wittylama: I'm guessing that you refer to User:Wittylama/SAI. That's fine for a user page, but if you intend utilising the technique in an article, you need to be aware of MOS:COLLAPSE. --Redrose64 (talk) 09:10, 3 February 2015 (UTC)
- Let's add
Template Guides
It actually took me having to ask someone else about this page to find it. If any experienced editor has time, perhaps they should write a guide to template use such as this. I think it would help a lot of editors to have one place to look to find the appropriate template for a situation. --Tarage (talk) 04:19, 5 February 2015 (UTC)
Align the whole template
For example, if the collapsible template is set to 500px wide (instead of default 100%), is there a way to align the whole template to left (or right), instead of center? Rehman 06:34, 22 February 2015 (UTC)
- User:Rehman, you can overload the width parameter (e.g.,
|width=500px; float:right
). Frietjes (talk) 00:56, 3 March 2015 (UTC)
Restricting this template to non-articles
as indicated in the threads above, this template removes the content from both the print version and mobile view. unfortunately, most editors do not realize this, and continue to use it in articles. I have been cleaning this up at a rate of about three every two weeks, which isn't much, but is still a hassle. to make the issue more obvious, I propose adding a namespace switch which would (1) make the contents viewable in the print version and in mobile view, and (2) uncollapse the contents to make it obvious that things aren't working as the editor may have intended. basically, something like this change. note that this would, currently, have zero impact on existing uses since I have fixed all the uses in articles. comments? suggestions? Frietjes (talk) 13:53, 8 November 2014 (UTC)
- This is more a problem with the template than with the usage. There are many times where it is valuable to hide some content in an article inside a collapsed box (e.g. long lists of data that are valuable but threaten to swallow an article), but that information should definitely appear in print and should probably appear in the mobile view - in fact, I'm not at all sure why we'd ever want to disable this kind of box in mobile, regardless of namespace. I'm unsure whether this should be a change made to the template or to the called class, as I'm not sure how this feature is used in the class as called by other templates. – Philosopher Let us reason together. 01:23, 9 November 2014 (UTC)
- so, it should be always expanded in mobile view? Frietjes (talk) 17:36, 9 November 2014 (UTC)
- I would prefer to have it work in mobile the way it does in normal, if that's not possible (and I think it isn't), my second choice would be tho have it always expanded in mobile view. Obviously, I would also have it always expanded in print view. – Philosopher Let us reason together. 18:58, 9 November 2014 (UTC)
- so, it should be always expanded in mobile view? Frietjes (talk) 17:36, 9 November 2014 (UTC)
Collapses to the bottom of the page - troubleshooting
I use this template fairly often and I occasionally either have or see others have the issue of the template being stuck to the very bottom of the talk page despite appearing in a higher section. I've seen this resolved by putting {{cot}} on its own line. I think either (1) this fix should be mentioned in the documentation to save editors' time, or (2) fixed in the code so that documentation would not be necessary. czar ⨹ 13:23, 22 March 2015 (UTC)
Feature request - clicking title text toggles show/hide
Right now to show or hide the text in the collapsed box, one has to click the "show/hide" button at the right side of the screen. For new users I think it would be more helpful to have the title text clickable, so that clicking the text of the title of the box would open or close the box. Blue Rasberry (talk) 16:46, 22 May 2015 (UTC)
- try asking at MediaWiki talk:Common.css or MediaWiki talk:Common.js, and hopefully you aren't using this template in articles. Frietjes (talk) 17:48, 25 May 2015 (UTC)
Why is this feature not working today?
You cannot collapse any of the lists as there is no hide button, is there something wrong, never happened before. - TheChampionMan1234 05:41, 2 June 2015 (UTC)
- Change class to: "mw-collapse" if you are using the latest version of mediawiki. - Anon — Preceding unsigned comment added by 207.170.229.132 (talk) 19:23, 11 June 2015 (UTC)
Protected edit request on 30 June 2015
![]() | This edit request to Template:Collapse top has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
It seems strange that {{collapse top}} should produce different output than {{collapse}}. I propose the following change, from
font-size:112%; color: {{{fc|black}}};
to
{{{{{|safesubst:}}}#if:{{{fc|}}}|color: {{{fc}}};|}}
Which removes the oversized font in the header (not present in {{collapse}}) and doesn't change the [show] link to black unless fc=black
is specified. The cascasding smaller font size issue that the font-size:112%
was designed to fix is already fixed by another instance of font-size:112%
later on in the template.
Ahecht (TALK
PAGE) 19:51, 30 June 2015 (UTC)
- This template is used on more than 10 time the number of pages compared to {{collapse}}, so why do you want to harmonise this template to look like that one? -- PBS (talk) 21:53, 30 June 2015 (UTC)
- I had proposed changing this one since it was the newer template (this one was created two years later as an alternate version of {{Collapse}}), but the transclusion count disparity is a good point. I don't have a strong preference either way. --Ahecht (TALK
PAGE) 21:59, 30 June 2015 (UTC)- Please confirm that Template:Collapse top/sandbox contains the correct code. — Martin (MSGJ · talk) 11:40, 1 July 2015 (UTC)
- @MSGJ: Thanks for mocking that up. The more I look at this template, the more I realize that the hacks being used because we're misusing the navbox class don't really work. The
font-size:112%
was put in there because the fact that navbox setsfont-size:88%
caused problems with nested collapsed sections, but the math was flawed. 112% times 88% is only 98.6%, not 100%. Instead of trying to use an absurd value such as 113.6363636%, I just rewrote the sandbox version here to not use the navbox class, and instead integrated the parameters from that class into the template. If you think we shouldn't change the appearance of this template, and instead make {{collapse}} match this one, I would still propose that we adopt this sandbox version but remove thefont-size:88%
part. --Ahecht (TALK
PAGE) 15:27, 1 July 2015 (UTC)- @Frietjes:. IIAC: Sandbox now explores correcting navbox class styles by correcting font-size locally. That is noit the route I'd like to go. And btw, collapse has class=navbox? At all? IMO better not. -DePiep (talk) 21:15, 1 July 2015 (UTC)
- I have no idea what you are saying. Frietjes (talk) 21:16, 1 July 2015 (UTC)
- OK, I drop this. -DePiep (talk) 21:55, 1 July 2015 (UTC)
- @Frietjes: Why did you change
{{{width|100%}}}
to{{{{{|safesubst:}}}#if:{{{width|}}}|{{{width}}}|100%}}
? Doesn't the former do exactly the same thing as the latter, but without the added complexity? I'm also not sure why you added {{main other}} for the background, as this template should never be used in mainspace per MOS:SCROLL (you'd either use tables with collapsible cells or {{navbox}}). --Ahecht (TALK
PAGE) 21:27, 1 July 2015 (UTC)- No, they are not the same; the former will evaluate to empty string if width is blank. Alakzi (talk) 21:35, 1 July 2015 (UTC)
- as Alakzi says, there is a difference between the two when
|width=
is defined but blank. with the navbox class, this was not an issue since the default width for navbox is basically 100%. as far as using this template in main space, I would love to see it issue a warning or simply not appear in articles per the thread above. Frietjes (talk) 21:36, 1 July 2015 (UTC)- Got it, I didn't consider defined but blank. --Ahecht (TALK
PAGE) 22:18, 1 July 2015 (UTC)
- Got it, I didn't consider defined but blank. --Ahecht (TALK
- I have no idea what you are saying. Frietjes (talk) 21:16, 1 July 2015 (UTC)
- @Frietjes:. IIAC: Sandbox now explores correcting navbox class styles by correcting font-size locally. That is noit the route I'd like to go. And btw, collapse has class=navbox? At all? IMO better not. -DePiep (talk) 21:15, 1 July 2015 (UTC)
- @MSGJ: Thanks for mocking that up. The more I look at this template, the more I realize that the hacks being used because we're misusing the navbox class don't really work. The
- Please confirm that Template:Collapse top/sandbox contains the correct code. — Martin (MSGJ · talk) 11:40, 1 July 2015 (UTC)
- I had proposed changing this one since it was the newer template (this one was created two years later as an alternate version of {{Collapse}}), but the transclusion count disparity is a good point. I don't have a strong preference either way. --Ahecht (TALK
- I still see a few tweaks being made to the sandbox. Is this good to go? — Martin (MSGJ · talk) 10:19, 2 July 2015 (UTC)
- New subtopic: the effect of
|expand=
should be the same in both. My opinion: I find it bad practice to use the presence of that param in the call as a setting (irrelevant of any value assigned to it including blank) to determine the collapse/uncollapse effect. For example,|expand=no
does ...? Given existing uses, I guess only an explicit opt-no should be added (so: param value blank and non-defined should have old behaviour). Note that this proposal allows regular pass-through usage (when used as a subtemplate). -DePiep (talk) 13:20, 2 July 2015 (UTC)
- New subtopic: the effect of
Sandbox deployed — Martin (MSGJ · talk) 08:14, 3 July 2015 (UTC)
- now if we sync the logic for the expanded parameter, we can make {{collapse}} a wrapper for this template and {{collapse bottom}}. Frietjes (talk) 14:00, 5 July 2015 (UTC)
Anyone got any idea why this is happening?
— SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼ 01:18, 8 August 2015 (UTC)