Template talk:Collapsed

From Wikimedia Commons, the free media repository

Jump to: navigation, search

Contents

[edit] class="collapsible collapsed navbox"

Where is this class described? What page has the code? I am curious to go there and watch its evolution, and learn some more. --Timeshifter (talk) 08:18, 17 August 2008 (UTC)

Well, the collapsible feature takes javascript so it's in MediaWIki:Common.js which imports MediaWiki:CollapsibleTables.js. The navbox class is just styling so it's in MediaWiki:Common.css. Rocket000(talk) 00:10, 18 August 2008 (UTC)
Thanks. I have a lot to study and learn. --Timeshifter (talk) 08:21, 18 August 2008 (UTC)
I've been meaning to do some documentation for these but never got around to it yet. Here's a start. Rocket000(talk) 09:36, 18 August 2008 (UTC)
Thanks. I bookmarked it. --Timeshifter (talk) 10:12, 18 August 2008 (UTC)

[edit] Font sizes

Can the default font size be changed to 95% or 100%. I assume it is at 90% now. Maybe a font size option can be created like the one for Template:On Wikipedia.

I find the text to be too small in this template I created: User:Timeshifter/Template:Diagrams charts graphs. It uses the {{Collapsed}} template inside it. Thanks again for creating Template:Collapsed. It may solve many problems on the Commons. --Timeshifter (talk) 11:46, 18 August 2008 (UTC)

I went with the standard size used all over en.wp. To me it looks the same size as the side bar links. Maybe it's your browser settings that making it look really small? Rocket000(talk) 13:00, 18 August 2008 (UTC)
OK. I agree that the text and links in a sidebar need to be small. Otherwise, lines of the text begin to wordwrap, and it looks bad and laddered. Also, the column can get too long. I am a basic webmaster too, and have noticed this problem with sidebars if the text is too large.
But this template is for main text in the center column, and so I suggest making the text a little larger. I would like to use this template for the non-English introductions found here:
So the English introduction would remain exposed, but the translations would be put in a {{Collapsed}} show/hide box under the English introduction. So it needs to be easily readable by any international reader with any level of visual acuity. Some languages are harder to read at smaller text sizes such as the ones with intricate characters such as Arabic, Persian, Hebrew, Chinese, Japanese, etc.. --Timeshifter (talk) 13:43, 18 August 2008 (UTC)
Ok, I dropped the navbox class and put the styling in directly so it can be changed. For example, you can do
I'm going to work on making new templates or possibly convert old ones like {{hidden}}. Rocket000(talk) 20:26, 23 August 2008 (UTC)
Great! Thanks again. It looks like there is a width parameter used in the above box. I went ahead and listed the width parameter in the instructions. Your instructions are very clear by the way. --Timeshifter (talk) 16:35, 24 August 2008 (UTC)
Thanks. Yeah, I didn't list all the parameters. I left out what I think will be the least used. People get confused if you throw too many instructions at them. :) But I should've include width as that will probably be used a lot. What I would really like is a way to change "show" and "hide" text. We can with javascript but that's not a good idea since a new class would need to be defined in the site's .js/.css for each template that uses a different word(s). I wish I knew more about javascript, there must be a way to allow users to define the words in the template itself. Rocket000(talk) 18:03, 24 August 2008 (UTC)
I think most people will figure it out since show/hide boxes exist in most Wikipedias, I believe. It is kind of intuitive with the open/close link there on the right side of them all, as far as I know. Maybe you can also put the small arrowheads used in some of the other show/hide templates, or the icon used at the top of columns in sortable tables. Or both. The more visual cues the better. --Timeshifter (talk) 19:12, 24 August 2008 (UTC)

[edit] Category:Félix Houphouët-Boigny

Category:Félix Houphouët-Boigny

I tried out the template for the category introduction. I left the English intro in the open, and put the rest in the show/hide box. See:

I noticed that unless I inserted 2 blank lines before the template code for the box, the box would show up too close to the text above it at Category:Félix Houphouët-Boigny. Using just one blank line did not seem to separate the box enough from the text above it. It seems to be because the previous text had template code brackets }} at the end. --Timeshifter (talk) 19:33, 24 August 2008 (UTC)

Yeah, that will happen when next to certain templates. For those cases, you can adjust the margin (usually margin=1em 0. Remember "margin" sets all sides so the 0 is needed to keep the left and right sides' margin the same. Rocket000(talk) 03:17, 28 August 2008 (UTC)

[edit] Showing contents by default

Could someone take a look at this and/or the associated js/css and add a way to give the template call a parameter which allows us to show content by default instead of hiding it by default? Thanks.  — Mike.lifeguard | @en.wb 23:42, 16 January 2009 (UTC)

I created {{collapsible}}. It could have easily been done with this template (they're basically identical) but I figured it would be easier to use both of these without another parameter to remember. Also, the name makes more sense. Rocket000(talk) 04:31, 17 March 2009 (UTC)
Oh well, restore it if you want it. Rocket000 (talk) 13:49, 15 April 2009 (UTC)