Template talk:Collapsible list/Archive 1Collapsed option?It would be most helpful to a collapsed option when only one list is present. Can this be done? —MJCdetroit 17:53, 27 July 2007 (UTC)
|
|
|
- Item 1
- Item 2
- Item 3
- Item 4
- Note the second does not work in all browsers. Plastikspork ―Œ(talk) 17:26, 18 February 2011 (UTC)
List semantics, and an unneeded fork
I'd always assumed that this template produced an HTML list. However, after seeing it forked to {{collapsible bulletlist}} the other week, it appears that this template simply hacks the appearance of a list by using line breaks. Merging {{collapsible bulletlist}} here would be trivial if this template used a styled <ul>
(or indeed <ol>
as an option) rather than hacking up a list with divs and line breaks and would be both a semantic and accessibility win. Chris Cunningham (user:thumperward: not at work) - talk 22:39, 22 March 2011 (UTC)
- That's got to be the way forward. Anything which emulates a list without actually using list markup is to be avoided. Note also {{Unbulleted list}}. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 23:03, 22 March 2011 (UTC)
I agree {{collapsible list}} could do the functionality of {{collapsible bulletlist}}. I'm not sure if it's better as its own or not. There's good arguments to be made for both single-use templates and for larger multi-use ones. The vast number of {{collapsible list}}'s transclusions makes it a bit more difficult to modify and innovate as it's hard to predict what it may break. The test cases shows off only one type of use; I assume there's more use cases. For the bullet list, I'm looking to implement a few things. (1) the ability to have nested collapsible bullet lists. (2) the ability to easily merge into an existing list of any depth. (3) a fix for the overlapping of the list title & the "show/hide" text when the box is too small for the text. I haven't looked into 1 so far, but 2 & 3 are mostly fixed. For 2, it works currently only for a depth of one but not above. ~ Justin Ormont (talk) 08:10, 23 March 2011 (UTC)
Here's a (non-working) example of (1) | which would turn into: | which would turn into: |
---|---|---|
|
|
|
Here's a (non-working) example of (2): | which would turn into: |
---|---|
|
|
Example of 3: |
---|
One long title
|
If combined, for the method, using the CSS list-style-type
might be best; alignment may not be correct though. ~ Justin Ormont (talk) 08:10, 23 March 2011 (UTC)
- I doubt whether (1) and (2) can be made to work with proper semantic HTML markup, because you'll be marking up items as sub-lists in order to hide the, when the items are really still part of the top-level list. Conversely, "and more" is not an item in the list. Please don't abuse HTML in that way. Not only is it bad practice semantically (it may help you to visualise the problem if you use <OL> instead of <UL>) and for accessibility; but it may also have unintended consequences elsewhere. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 11:04, 23 March 2011 (UTC)
- Agreed about the "and more..." those are rather convoluted uses of it. You can see it in action (pre-template form) 2011 Wisconsin protests and (template form) 2011 Libyan uprising. The uses are in the infobox. I have a few working solutions to (2), the leading is encase the collapsible bulletlist within
<ul><li>
element which pushes it out to the right indentation so it aligns properly. Although this does have the effect of creating a second bullet list that simply looks like a single one. I'm not sure that's a problem though. ~ Justin Ormont (talk) 11:42, 23 March 2011 (UTC)
- Agreed about the "and more..." those are rather convoluted uses of it. You can see it in action (pre-template form) 2011 Wisconsin protests and (template form) 2011 Libyan uprising. The uses are in the infobox. I have a few working solutions to (2), the leading is encase the collapsible bulletlist within
Could we just get the code currently in use converted first before inventing new use cases and asking for features? The current sandbox code looks okay to me on the one test case provided. Can someone sanity-check it? By default it has no bullets; bullets will be displayed by passing |bullets=blah
. Chris Cunningham (user:thumperward: not at work) - talk 11:12, 26 March 2011 (UTC)
- The spacing of the sandbox is larger than the live version. I'd recommend setting
"line-height: inherit;"
for the <li> and"margin: 0pt;"
for the <ul>. With those additions, the spacing is the same between the live and sandbox. ~ Justin Ormont (talk) 17:09, 26 March 2011 (UTC)- Looks good, modulo some margin tweaks. I would say it's basically ready to go. By the way, I have noticed that many articles calling this are adding bullets using •, so it is useful to have an option to turn on the bullets as well. Thanks for taking the time to do this! Plastikspork ―Œ(talk) 19:09, 26 March 2011 (UTC)
- Want to have a shot at fixing the margins in the sandbox? I added Justin's tweaks but we've still got some extra spacing. Once the testcases are a good enough match I'll deploy it. In the long run I want rid of the divs; it should be possible to do the whole thing with nested lists, though we'll need some changes to the site JS to make it work. Who's the best person to ask about that? Chris Cunningham (user:thumperward: not at work) - talk 15:34, 27 March 2011 (UTC)
- I have everything lined up in the sandbox. In firefox & chrome, it's pixel perfect between for the test cases, and untested in other browsers, but assumed to be correct. Bullets are rather untested, perhaps some more tests cases for that. The normal list looks good to ship though. ~ Justin Ormont (talk) 20:21, 27 March 2011 (UTC)
- So it's actually off by two pixels only in the very bottom of the first testcase. One of those pixels is due to the reference being [14] instead of [10], the other pixel, I'd just ignore. The only css difference I see is a computed
"list-style-type: none;"
vs."list-style-type: disc;"
. ~ Justin Ormont (talk) 20:54, 27 March 2011 (UTC)- It looks good to me as well. I will go ahead and copy the sandbox code over to the live template. Thanks! Plastikspork ―Œ(talk) 22:23, 27 March 2011 (UTC)
- So it's actually off by two pixels only in the very bottom of the first testcase. One of those pixels is due to the reference being [14] instead of [10], the other pixel, I'd just ignore. The only css difference I see is a computed
- I have everything lined up in the sandbox. In firefox & chrome, it's pixel perfect between for the test cases, and untested in other browsers, but assumed to be correct. Bullets are rather untested, perhaps some more tests cases for that. The normal list looks good to ship though. ~ Justin Ormont (talk) 20:21, 27 March 2011 (UTC)
- Want to have a shot at fixing the margins in the sandbox? I added Justin's tweaks but we've still got some extra spacing. Once the testcases are a good enough match I'll deploy it. In the long run I want rid of the divs; it should be possible to do the whole thing with nested lists, though we'll need some changes to the site JS to make it work. Who's the best person to ask about that? Chris Cunningham (user:thumperward: not at work) - talk 15:34, 27 March 2011 (UTC)
- Excellent. Cheers guys. Now we can move onto improvements and new features. Chris Cunningham (user:thumperward: not at work) - talk 22:25, 27 March 2011 (UTC)
- FYI, I had to make this change, after our changes broke that template. Basically, it appears to have broken some cases when you pass a wikitable as input. Hopefully this was an isolated case. If not, we may want a special case when there is only one input. Thanks! Plastikspork ―Œ(talk) 03:06, 28 March 2011 (UTC)
Also if you're passing a bullet list *item1\n *item2\n *item3, it fails for the first element of the list. I added an example to the testcases page, it's the one w/ the dice picture. I've also added a few other testcases for better coverage. As for making a special case for just one input, they could be passing in four wikitables instead of just one. I think we'd need a more general solution. ~ Justin Ormont (talk) 05:47, 28 March 2011 (UTC)
- Yes, I had to make this change as well, which was exactly the issue you noticed. So far, the only real problems that I have seen are cases where this template is being used with only one item, and hence isn't really being used to generate a list. Could we fix this by checking to see if {{{2}}}, {{{3}}}, ... are all empty, and if so, we don't use <ul> and <li>? Or, we need to add a newline before the (first) item. Plastikspork ―Œ(talk) 06:04, 28 March 2011 (UTC)
- I think if we added a newline before the first element, it would cause spacing issues. ~ Justin Ormont (talk) 06:40, 28 March 2011 (UTC)
Found another failure case. Embedded bare <li>
fails. Example: {{Collapsible list |title=Fleet Data List |1=<li>362 active |2=<li>50 orders |3=<li>100 options}}
. Previously, it produced a bulleted list, now it produces a bare list. Not sure if this is widely used, and it fails gracefully. I added another testcase for it. I also temporarily put the old Collapsible list template into the sandbox so we can see the differences. ~ Justin Ormont (talk) 06:40, 28 March 2011 (UTC)
Perhaps we should just identify all the cases where people are just using the collapsible-list as a simple way to create a collapsible box. I'd recommend putting in {{#if:{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}||[[Category:Pages using collapsible-list as a simple collapsible-box]]}}
. Then create a new template which specifically does that well (like the old version). Then check the category and identify the templates/pages responsible and change them over to that simple-collapsible-box template. And yes, this is exactly how my forks get created :) Justin Ormont (talk) 07:07, 28 March 2011 (UTC)
- Could we differentiate between "failure", as in actually breaking pages, and "behaviour changes", where something simply looks different? Perfect backwards compatibility does not need to be a goal here as the purpose is to improve the semantic value of such lists. If existing uses are manually including their own bullet points or table markup then they're doing it wrong and are likely impossible to navigate sensibly by keyboard or screen reader already. Chris Cunningham (user:thumperward: not at work) - talk 10:22, 28 March 2011 (UTC)
- The two that I mentioned ({{Infobox medal templates}}, and {{Sidebar with collapsible lists}}) were actual failures. In the first one, it was completely broken after the change. In the second one, it was failing to render the first bullet in inputs in the form '* item 1\n* item2\n* item 3'. For medal templates, I simply substituted the old simplified version of this template into that template. It was just using this template to create a collapsible table, and hence not creating a list, and wasn't using more than {{{1}}}. In the second case, I copied a simplified version of this template into a subtemplate. It too wasn't using this template to create lists, but simply passing lists to it, so it didn't need more than {{{1}}}. Perhaps it would be a good idea to have
{{collapsible div box}}
, which would be this template, but without the list part. It would only have one input for the body of the div. This template could use that template to create the outer div container, and just concentrate on creating the inner list portion. This new template could then be used in applications which are only using {{{1}}} and are generating their own lists, or passing tables, or whatever. Thanks! Plastikspork ―Œ(talk) 01:19, 29 March 2011 (UTC)- Well, what brought this discussion about was my desire to try to do something about the degree to which list content is faked or created using excessive table hacks right now, as demonstrated by the examples on Template:Infobox civil conflict/testcases. It'd certainly be a good idea to decide when a simple collapsing div would be better, but if we create such a thing too early the danger is that {{collapsible list}} will simply be abandoned en masse even for content where it's the best solution. Chris Cunningham (user:thumperward: not at work) - talk 09:03, 29 March 2011 (UTC)
- The two that I mentioned ({{Infobox medal templates}}, and {{Sidebar with collapsible lists}}) were actual failures. In the first one, it was completely broken after the change. In the second one, it was failing to render the first bullet in inputs in the form '* item 1\n* item2\n* item 3'. For medal templates, I simply substituted the old simplified version of this template into that template. It was just using this template to create a collapsible table, and hence not creating a list, and wasn't using more than {{{1}}}. In the second case, I copied a simplified version of this template into a subtemplate. It too wasn't using this template to create lists, but simply passing lists to it, so it didn't need more than {{{1}}}. Perhaps it would be a good idea to have
- Also of note: {{br separated entries}}. Chris Cunningham (user:thumperward: not at work) - talk 15:15, 28 March 2011 (UTC)
- Yes, I created that template for the sole purpose of putting line breaks between "birth_name", "birth_date", and "birth_place". If you check the talk page, I never intended it to be used for lists, which is why the name is not "br list", and it only allows for three inputs. Plastikspork ―Œ(talk) 01:19, 29 March 2011 (UTC)
The update broke a wikitable I put inside the template for my welcome message. Any workaround? /ƒETCHCOMMS/ 21:50, 3 April 2011 (UTC)
- I removed the "1 =", but even better would be to switch over to using {{hidden}} or {{hidden begin}} since it's not a list, and this template will add some list markup. I will demonstrate in a second. Thanks! Plastikspork ―Œ(talk) 21:59, 3 April 2011 (UTC)
Is there a way to get the lists to indent without a bullet? Previously, preceeding the first item with a colon indented the entire list—see Wikipedia:WikiProject Video games/Deletion/Archivesbox. —Ost (talk) 17:00, 5 April 2011 (UTC)
- Try this. Frietjes (talk) 19:35, 5 April 2011 (UTC)
- Looks good and you even edited it for me. Thanks! —Ost (talk) 22:08, 5 April 2011 (UTC)
Scalability
Vipera berus has a collapsible list with 75 items, and this template only supports 50. Is there something like {{collapsible list start}}
for wrapping an existing list? Or is the prefered method to just use {{hidden begin}}? Frietjes (talk) 23:17, 1 April 2011 (UTC)
- I would say that {{hidden begin}}/{{hidden end}} is your best choice for such situations. It's essentially equivalent to just using the top and bottom parts of this template, as far as I can tell. Thanks! Plastikspork ―Œ(talk) 18:56, 2 April 2011 (UTC)
As part of a bullet list hierarchy
I am seeking a solution for a collapsible bullet list which is subordinate to a non-collapsible bullet hierarchy. The template {{Collapsible bulletlist}} is close, but not quite doing what is expected. I don't know if that's because I'm not using it right or it can't be done. A complete explanation and example is at Template talk:Collapsible bulletlist#As part of a bullet list hierarchy. —EncMstr (talk) 21:33, 10 April 2011 (UTC)
Bold title
Is it possible to avoid the bold list title, as in have a normal font style? McLerristarr | Mclay1 15:20, 25 May 2011 (UTC)
- Try {{collapsible list|titlestyle=font-weight:normal}}. Frietjes (talk) 22:26, 25 May 2011 (UTC)
- Thank you. I tried so many things but I didn't realise there was a separate "font-weight" thing. McLerristarr | Mclay1 12:30, 26 May 2011 (UTC)
@Frietjes: "titlestyle=font-weight:normal" doesn't really solve the problem. This is what comes out of it:
- One
- Two
- Three
I'd appreciate if you could help me figuring out how to make the title box white. --Երևանցի talk 19:22, 6 April 2014 (UTC)
- @Yerevantsi: to make it white, append background:transparent (or background:white). I updated your example. Frietjes (talk) 18:58, 8 April 2014 (UTC)
- @Frietjes: this ping won't work, as you didn't include a signature in that edit. @Yerevantsi: this should notify you. — Mr. Stradivarius ♪ talk ♪ 20:24, 8 April 2014 (UTC)
Thank you guys! --Երևանցի talk 21:31, 8 April 2014 (UTC)
- {{collapsible list |titlestyle=font-weight:normal;background:transparent; worked for me. Thanks a lot! --AlbertJB (talk) 15:00, 26 May 2017 (UTC)
Trying to adopt this to a Wikia based Wiki
Hi I'm trying to adopt this template for use on a Wikia based wiki and cant get it to work is there any JavaScript needed to make it work. I believe the issues that I'm having may be caused by the lack of the correct JavaScript. Any help would be great.--Dcheagle 21:23, 12 April 2012 (UTC)
Borked?
Responding to a help desk question. The examples in the documentation looked fine until I purged the doc page, now they are borked:
Markup | Renders as |
---|---|
{{Collapsible list/sandbox |title=[[European Free Trade Association]] Members |[[Iceland]] |[[Liechtenstein]] |[[Norway]] |[[Switzerland]]}} |
|
Thoughts? ---— Gadget850 (Ed) talk 10:16, 18 September 2012 (UTC)
Appears to be fixed, in any case. —Kerfuffler harass
stalk 15:39, 18 September 2012 (UTC)
- This was due to bugzilla:40306. —TheDJ (talk • contribs) 16:22, 18 September 2012 (UTC)
- Ah. Forgot HTML5 was to be enabled. Thanks. ---— Gadget850 (Ed) talk 16:29, 18 September 2012 (UTC)
Some styling to be moved?
Hello. Does anyone else agree that the stylings currently at the ends of the NavFrame, NavHead and NavContent tags should precede (respectively) the {{{framestyle}}}
, {{{titlestyle}}}
and {{{liststyle}}}
in each tag, otherwise they can override these parameters rather than provide default settings..? CsDix (talk) 01:30, 25 February 2013 (UTC)
- Agreed. How can we petition for this to happen? –aʙᴊıᴋʟaᴍ[ᴛ|ᴄ] 15:00, 17 March 2013 (UTC)
- Sorry not to reply more promptly. Making an {{Edit protected}} request might be worth a try..? CsDix (talk) 01:18, 23 March 2013 (UTC)
mw-collapsible
Can anybody rewrite it according to mw:Manual:Collapsible elements? --DixonD (talk) 14:15, 27 March 2013 (UTC)
- Prepped this in Template:Collapsible_list/sandbox. Open for review —TheDJ (talk • contribs) 14:09, 17 June 2013 (UTC)
variable values
Where can i find possible options for the variables: framestyle, titlestyle nad liststyle? — Preceding unsigned comment added by 143.97.2.35 (talk) 08:15, 17 June 2013 (UTC)
Formatting
Hello,
I'm trying to get the heading on the title of the collapsible list to be the same as in normal text; unfortunately, the "font-weight:normal" code doesn't seem to work and the text remains bold and a blue background appears. Any suggestions? Brigade Piron (talk) 19:44, 29 January 2014 (UTC)
Use jquery.makeCollapsible?
Can this be migrated to the mw:ResourceLoader/Default modules#jquery.makeCollapsible? Helder 19:01, 4 February 2014 (UTC)
titlestyle
If titlestyle and framestyle aren't used, the default styling is:
- 1
- 2
- 3
i.e. the title is left-aligned, with no background added, while the entire title+list isn't surrounded by a border.
As soon as titlestyle and/or framestyle are used, however – say, to specify a width and add some padding – this happens:
- 1
- 2
- 3
i.e. the title is centrered on a background, while the title+list is surrounded by a border.
Are these behaviouors intentional? (If so, for any particular reason?)
(As it's framestyle rather than bodystyle or just style etc, perhaps the border is to be expected – but titlestyle's behaviouor does seem odd.)
Sardanaphalus (talk) 10:51, 20 April 2014 (UTC)
expand=no
does: ... expand
When I set |expand=no
, the table expands. That is a bug. I propose to change the behaviour into confirmed-only (for example by {{yesno}}). -DePiep (talk) 23:16, 23 June 2015 (UTC)
- By design. Any value triggers 'true'. Simply omit the parameters to collapse.
-- [[User:Edokter]] {{talk}}
18:54, 24 June 2015 (UTC)- That's the point: that is not "simply", it is counter-intuitive. It is half-code (the programmer expects me to take half their chair). -DePiep (talk) 19:37, 24 June 2015 (UTC)
- This code style makes this template unusable in subtemplates (IOW: one can not even pass-through parameter value settings vs value usage). What an amateur attitude, coming down from mw. I had hoped this would recede with Lua. -DePiep (talk) 20:19, 1 July 2015 (UTC)
- And no I won't use the hack you're about to tell me. -DePiep (talk) 20:21, 1 July 2015 (UTC)
- I'm not sure what hack I'm about to tell you... Suffice to say, the parameter is presence-based, not value-based. That means you have to test and pass using
{{#if:{{{expand|}}}|{{!}}expand=1}}
, which is quite common for boolean parameters.-- [[User:Edokter]] {{talk}}
20:53, 1 July 2015 (UTC)- That's the hack I expected. I wont use it, we're not mw-coding level here. As you say too: valueed params. To cut thing short: why not change and allow
|expand=no
for predictable input? -DePiep (talk) 20:58, 1 July 2015 (UTC)- That just moves the problem fron one template to another, doesn't it?
-- [[User:Edokter]] {{talk}}
05:21, 2 July 2015 (UTC) - Add
origArgs.expand = require('Module:Yesno')(origArgs.expand)
after line 96, update the documentation and check that no transclusions use "on" or any other synonym for true except "t", "yes", "y" and "1". HTH. Alakzi (talk) 13:21, 2 July 2015 (UTC)- (edit conflict) re EDokter Which problem is moved? To be clear: I propose to change this 'by design', as described. (might be moot after Alakzi post). -DePiep (talk) 13:25, 2 July 2015 (UTC)
- re Alakzi: might be better to only add a check for "no/n/0" + that behaviour change. All others (param value blank, any other value including "yes/true") should keep old behaviour
(=default: uncollapsed). This would need no checking, assuming/understanding that any editor entering|expand=no
intended to have it uncollapsed. -DePiep (talk) 13:30, 2 July 2015 (UTC)- The default is collapsed. Alakzi (talk) 13:36, 2 July 2015 (UTC)
- Confusion only.
|expand=
is uncollapsed (defaulting param value). -DePiep (talk) 13:55, 2 July 2015 (UTC)
- Confusion only.
- The default is collapsed. Alakzi (talk) 13:36, 2 July 2015 (UTC)
- That just moves the problem fron one template to another, doesn't it?
- That's the hack I expected. I wont use it, we're not mw-coding level here. As you say too: valueed params. To cut thing short: why not change and allow
- I'm not sure what hack I'm about to tell you... Suffice to say, the parameter is presence-based, not value-based. That means you have to test and pass using
- That's the point: that is not "simply", it is counter-intuitive. It is half-code (the programmer expects me to take half their chair). -DePiep (talk) 19:37, 24 June 2015 (UTC)
param | value | show/hide now | show/hide proposed | note |
---|---|---|---|---|
<absent> | hide | unchanged | default for template | |
expand=
|
<blank> | unchanged (b/c existing uses) | param is present | |
expand=
|
no | show | hide | behaviour change proposal* |
expand=
|
yes | show | unchanged | value is not tested now |
expand=
|
true | show | unchanged | |
expand=
|
false | show | unchanged | |
expand=
|
monkey (any other text) | show | unchanged | value is not tested now |
- *"no" value could be list of confirmed negatives: no, n, 0, false.
-DePiep (talk) 13:55, 2 July 2015 (UTC)
No, |expand=
has no effect: {{Collapsible list|1|2|3|expand=}}
→
- 1
- 2
- 3
Alakzi (talk) 14:00, 2 July 2015 (UTC)
- You're right. My main point stays. -DePiep (talk) 14:26, 2 July 2015 (UTC)
- So fix it. :-) Alakzi (talk) 15:12, 2 July 2015 (UTC)
- ? -DePiep (talk) 15:20, 2 July 2015 (UTC)
- Change the module to do what you want it to. Alakzi (talk) 15:30, 2 July 2015 (UTC)
- Ah. Well, as I read it EDokter wrote opposition, no intention to change the "by design" thing. -DePiep (talk) 15:35, 2 July 2015 (UTC)
- I have no problem with someone else adding it, as long as it doesn't change the default behaviour.
-- [[User:Edokter]] {{talk}}
16:25, 2 July 2015 (UTC)
- I have no problem with someone else adding it, as long as it doesn't change the default behaviour.
- Ah. Well, as I read it EDokter wrote opposition, no intention to change the "by design" thing. -DePiep (talk) 15:35, 2 July 2015 (UTC)
- Change the module to do what you want it to. Alakzi (talk) 15:30, 2 July 2015 (UTC)
- ? -DePiep (talk) 15:20, 2 July 2015 (UTC)
- So fix it. :-) Alakzi (talk) 15:12, 2 July 2015 (UTC)
- You're right. My main point stays. -DePiep (talk) 14:26, 2 July 2015 (UTC)
- consensus then:
|expand=no
will show (uncollapse) the list. I may need more time to test & implement this; if anyone else takes action that's OK with me. Also, it's up to the implementor to choose wrt input like uc, "false", and "N". ping @Alakzi and Edokter:. -DePiep (talk) 20:53, 2 July 2015 (UTC)
style per listitem?
Is it possible to add like |itemstyle=
that set the style for each element? -DePiep (talk) 16:49, 10 November 2015 (UTC)
- The line spacing of {{vgrelease}} is larger than list-item spacing for {{collapsible list}}, so if several instances of the former are used to list multiple releases such as for different platforms, the result is really ugly. At Nights into Dreams I just added half an em of
margin-bottom
to each item make it less ugly, and the way I had to do it was with a div wrapper on every item. This shouldn't be necessary - {{unordered list}} for example hasitem_style
for this purpose. I was pretty annoyed to find this template doesn't have this feature too. Hairy Dude (talk) 02:19, 19 September 2017 (UTC)
Why font-size set?
Module:Collapsible list module code sets this:
'font-size: 105%;'
eg for NavHead and NavContent. Is there an explanation? As I read it now, it alters the style unsollicited. -DePiep (talk) 11:06, 15 December 2015 (UTC)
- Don't know... Perhaps because it is used mainly in infoboxes?
-- [[User:Edokter]] {{talk}}
11:52, 15 December 2015 (UTC)- My guess too: to undo some inherited 95% setting from somewhere. Could be by a class too if I understand this correct. Found a way out. -DePiep (talk) 12:03, 15 December 2015 (UTC)
Collapsing multiple objects simultaneously that are in different places of the page/article.
Is it possible to have a "show" button that will un-collapse, for instance, bundled images that are in different places on an article (in a table, specifically)? My specific issue is that my structure images in my tables spread out the table quite a bit, and if there were a single point at which they could all get bundled, so the table's values could be referenced more easily, it'd be a wonder. (EDIT: let me know if I am explaining myself clearly on what it is I suggest, and whether or not it can be utilized with the extant template wiki-codes in current use or if the idea is viable in a new template of some kind) Nagelfar (talk) 22:34, 4 March 2016 (UTC)
- If this doesn't exist, where would be the place to request the implementation of such a function for WP? Nagelfar (talk) 16:12, 1 April 2016 (UTC)
Mobile
Is there any particular reason why this is un-collapsed by default on mobile? Can it be fixed? I gather it has something to do with the mobile site using an entirely different set of JavaScript scripts which doesn't include support for this. Hairy Dude (talk) 15:26, 14 March 2016 (UTC)
- Yes, mobile doesn't support these scripts, because most pages don't need them and mobile needs to be lean and mean. —TheDJ (talk • contribs) 18:19, 1 April 2016 (UTC)
List name overlaps with [show]/[hide] button in infobox
Lorem ipsum dolor | List
|
---|
Lorem ipsum dolor | List
|
---|---|
Lorem ipsum dolor | List
1 |
As shown in the first infobox, when using {{collapsible list}}
as an infobox data item with a long label, the list name overlaps with the [show]/[hide] button. I was going to contrast that with the behavior of {{Hidden}}
, but apparently using that in the same infobox fixes the problem, so I've shown that in a separate infobox. Languorrises (talk) 00:54, 18 March 2018 (UTC)
- Just realized that Justin Ormont mentioned this in the List semantics, and an unneeded fork section above, but it doesn't seem it was ever fixed. Languorrises (talk) 01:05, 18 March 2018 (UTC)
- This should now be fixed. —TheDJ (talk • contribs) 06:22, 7 June 2018 (UTC)
- @TheDJ: I don't think it is, as my example just below this section still displays "squishing". As does the example in this section. I'm on current Chrome on a Mac, if that helps. —Joeyconnick (talk) 07:15, 7 June 2018 (UTC)
- Sorry, I had to revert because I ran into some problems I had not anticipated. —TheDJ (talk • contribs) 11:25, 7 June 2018 (UTC)
- @TheDJ: I don't think it is, as my example just below this section still displays "squishing". As does the example in this section. I'm on current Chrome on a Mac, if that helps. —Joeyconnick (talk) 07:15, 7 June 2018 (UTC)
- This should now be fixed. —TheDJ (talk • contribs) 06:22, 7 June 2018 (UTC)
Unbolded title
Is it possible to use an unbolded title? ~ Dissident93 (talk) 21:20, 3 June 2019 (UTC)
- Dissident93: easiest way would be to use {{nobold}}, i.e.
|title={{nobold|Blank title}}
|titlestyle=
is an alternative. However, next tofont-weight:normal;
you'll also have to setbackground:transparent; text-align:left;
—it works just as well, but it's a little excessive. Jay D. Easy (t • c) 17:05, 19 July 2019 (UTC)- Got it, thanks. ~ Dissident93 (talk) 23:02, 20 July 2019 (UTC)
Template-protected edit request on 21 May 2020
This edit request to Template:Collapsible list has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Hi can someone give me access to the full code? I try to import the template into swwiki. Otherwise I am also happy if anybody who knows this better than me can do it for me. Kipala (talk) 10:47, 21 May 2020 (UTC) Kipala (talk) 10:47, 21 May 2020 (UTC)
- Even if you don't have template editor rights, you should still be able to access the source code of a page by clicking the "View source" link. In this case, the entire source code of {{collapsible list}} is :
{{<includeonly>safesubst:</includeonly>#invoke:collapsible list|main}}<noinclude> {{documentation}} </noinclude>
- What's probably confusing you is that this wikitext (
#invoke:Collapsible list|main
) depends wholly on Module:Collapsible list. The source code of Module:Collapsible list is too long to post in a comment, but you can read it by clicking "View source" on that page. If you are trying to copy this page to another wiki, you need to copy both the template and the module to that wiki. * Pppery * it has begun... 13:23, 21 May 2020 (UTC)
The template works for mobile version in Chinese Wiki
How did the template in ZH Wiki actually work on mobile while EN Wiki didn't? https://zh.m.wikipedia.org/wiki/Template:Collapsible_list I wanted to extract the codes from ZH Wiki but couldn't find the difference from both template and module page in EN Wiki. Thank you. Pichnat Thong (talk) 19:33, 26 June 2020 (UTC)
- @Pichnat Thong: It depends on site JavaScript. On zhwiki there’s a gadget called “NavFrame” (zh:MediaWiki:Gadget-NavFrame.js, zh:MediaWiki:Gadget-NavFrame.css), which is set to load on mobile as well. On enwiki, this code is in MediaWiki:Common.js and MediaWiki:Common.css, which aren’t loaded on mobile (and this cannot be changed). You can ask interface administrators on WP:IAN to turn the enwiki code into a gadget and set it to load on mobile. (I’m not sure if it’s a good idea, though: these toggles are quite small and thus hard to press on a touchscreen.) —Tacsipacsi (talk) 19:58, 26 June 2020 (UTC)
It wouldn't be hard for browsers with latest update these days. You won't have to click on exact place as it spanned over the bar. I would ask them for this. Pichnat Thong (talk) 02:28, 27 June 2020 (UTC)
titlestyle again
I have the same question as Sardanaphalus did four years ago in #titlestyle: why is it when I set the |titlestyle=
, the title is suddenly set to be centered and on a purple background? Or rather, I guess, why is it that the titles for collapsible lists are automatically set to be on transparent backgrounds with left-aligned text unless one tries to apply a style to the title, in which case the title's background and text alignment defaults to whatever Wikipedia default has a purple background with centred text?
- 1
- 2
- 3
- 1
- 2
- 3
When a user sets a title style parameter that has nothing to do with the background or text alignment, no reasonable user would expect the background or the text's alignment to change because style is usually inherited unless specifically overridden. {{Collapsible list}} sets up the expectation that the default style for the title of a collapsible list is left-aligned on a transparent background but then throws out that default when you actually go to tweak the style of the title.
The LUA responsible is here:
local div2style = formatAttributes( 'style', 'font-size: 105%;', args.title_style, args.titlestyle, not ( args.title_style or args.titlestyle ) and 'background: transparent; text-align: left;' )
As near as I can tell, it should actually be:
local div2style = formatAttributes( 'style', 'font-size: 105%; background: transparent; text-align: left;', args.title_style, args.titlestyle )
What do people think about fixing this? Or is there some deep, hidden but important reason it was set up this way in the first place? —Joeyconnick (talk) 20:47, 2 June 2018 (UTC)
- @Joeyconnick: no problem with fixing this, but we would first need some scope about how many people are relying on that behavior. —TheDJ (talk • contribs) 06:23, 7 June 2018 (UTC)
- @TheDJ: Okay... how would that be generated/determined? Some kind of query for when {{Collapsible list}} has a
|titlestyle=
set that doesn't include both "background: transparent;" and "text-align: left;"? I wouldn't really know where to begin if that's what would be or similar to what would be required. —Joeyconnick (talk) 07:18, 7 June 2018 (UTC)- We wait for a month or so and then this link will tell us. —TheDJ (talk • contribs) 20:50, 7 June 2018 (UTC)
- Okay. —Joeyconnick (talk) 05:45, 8 June 2018 (UTC)
- @TheDJ: so that doesn't seems to have helped because for
|titlestyle=
, it's listing > 50 unique values on 2961 pages. Can we drill down? I guess we now know an upper limit for the number of pages any change will impact. —Joeyconnick (talk) 21:40, 28 July 2018 (UTC)- working on it, I added Category:Pages using collapsible list with titlestyle to get started, we can add more logic to sort by value after the category fills up and we have a good set of examples. Frietjes (talk) 16:18, 21 July 2019 (UTC)
- Thanks Frietjes! I did some quick and dirty searches:
- So I think that means there are roughly 3037 − 1406 − 374 = 1257 pages where changing the default would have an impact. —Joeyconnick (talk) 04:07, 25 July 2019 (UTC)
- Joeyconnick, I split the tracking category into 2 subcategories (with both background/text-align and without). the without subcategory should be the list of pages which will be impacted by changing the default (as soon as it finishes filling up). Frietjes (talk) 13:22, 25 July 2019 (UTC)
- Joeyconnick and TheDJ: I think the tracking categories are close to being filled now and it looks like there aren't that many pages in Category:Pages using collapsible list without both background and text-align in titlestyle compared to Category:Pages using collapsible list with both background and text-align in titlestyle. I think we can fix/update the ca. 150 articles in Category:Pages using collapsible list without both background and text-align in titlestyle and then change the default to append the value of
|titlestyle=
rather than overwrite. Frietjes (talk) 14:36, 28 July 2019 (UTC)- Thanks... this is really promising and your coding help has been invaluable! ~150 could be fixed by hand if necessary, even. 🙂 —Joeyconnick (talk) 18:20, 28 July 2019 (UTC)
- Joeyconnick, I updated the syntax for most of them. assuming my edits aren't reverted, we can probably go ahead with the change soon. Frietjes (talk) 13:27, 30 July 2019 (UTC)
- Thanks... this is really promising and your coding help has been invaluable! ~150 could be fixed by hand if necessary, even. 🙂 —Joeyconnick (talk) 18:20, 28 July 2019 (UTC)
- working on it, I added Category:Pages using collapsible list with titlestyle to get started, we can add more logic to sort by value after the category fills up and we have a good set of examples. Frietjes (talk) 16:18, 21 July 2019 (UTC)
- @TheDJ: so that doesn't seems to have helped because for
- Okay. —Joeyconnick (talk) 05:45, 8 June 2018 (UTC)
- We wait for a month or so and then this link will tell us. —TheDJ (talk • contribs) 20:50, 7 June 2018 (UTC)
- @TheDJ: Okay... how would that be generated/determined? Some kind of query for when {{Collapsible list}} has a
- P.S. this change still needs to happen as well.. I think it is good to go and the longer it is delayed, the more pages will start showing up in Category:Pages using collapsible list without both background and text-align in titlestyle that will need to be cleaned up again. —TheDJ (talk • contribs) 13:46, 15 March 2020 (UTC)
- Hi all... I have emptied Category:Pages using collapsible list without both background and text-align in titlestyle as best I can (can't seem to find where it's called at COVID-19 pandemic in Pakistan but oh well). Could someone please make this change? I don't have template editor rights or I'd do it myself. Paging Frietjes or really anyone with templateeditor! —Joeyconnick (talk) 17:18, 1 July 2020 (UTC)
- Joeyconnick, now implemented. the COVID-19 pandemic in Pakistan page just needed to be purged. should I remove the tracking now? Frietjes (talk) 17:25, 1 July 2020 (UTC)
- That's weird... I thought I had purged it, but anyway, amazing! Thank you! I'm wondering if we need to do the same process for liststyle? See #Liststyle centers text and does not make it smaller – is this related? (pinging Jonesey95) —Joeyconnick (talk) 17:39, 1 July 2020 (UTC)
- Joeyconnick, now implemented. the COVID-19 pandemic in Pakistan page just needed to be purged. should I remove the tracking now? Frietjes (talk) 17:25, 1 July 2020 (UTC)
- Hi all... I have emptied Category:Pages using collapsible list without both background and text-align in titlestyle as best I can (can't seem to find where it's called at COVID-19 pandemic in Pakistan but oh well). Could someone please make this change? I don't have template editor rights or I'd do it myself. Paging Frietjes or really anyone with templateeditor! —Joeyconnick (talk) 17:18, 1 July 2020 (UTC)
show/hide alignment option?
I just noticed the use of this template for the indigenous parameter of the infobox in the Languages of the United States article. Actually, I didn't notice it at first because its unexpected alignment there caused me to miss seeing the show/hide toggle. Can the show/hide toggle be optionally positioned left-justified instead of right? If not, could it be?
A similar question was asked previously at #Changing where Show/Hide appears?, above. I'm guessing that this might need changes at MediaWiki:Common.css, but I'm hoping not. Wtmitchell (talk) (earlier Boracay Bill) 07:45, 28 February 2011 (UTC)
Having the same problem with this template. Is there a way to place the show/hide link on the left, without altering Common.css? Thanks! Sal9000 (talk) 11:53, 29 March 2011 (UTC)
- Right, it appears that is set by either MediaWiki:Common.js or MediaWiki:Common.css. Try asking at WP:VPT. Thanks! Plastikspork ―Œ(talk) 18:54, 2 April 2011 (UTC)
- I did some checking, and I am wrong. This is possible with templates like {{hidden top}}/{{hidden bottom}},
- Item 1
- Item 2
- Item 3
- Perhaps we should add this feature to this template? Thanks! Plastikspork ―Œ(talk) 18:59, 2 April 2011 (UTC)