Template talk:Collapsible list
Add topic| This is the talk page for discussing improvements to the Collapsible list template. |
|
| Archives: 1, 2Auto-archiving period: 6 months |
| This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
| ||||||||
Info on `list_style`
[edit]Where can I find information on how to use `list_style`? Closed Limelike Curves (talk) 16:16, 7 August 2024 (UTC)
Title invisible in infoboxes when in dark mode
[edit]I'm not familiar enough with MediaWiki's source code to figure out where exactly this goes wrong, so I don't know where to file a bug.
Due to the rule
@media screen and (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .mw-parser-output [style*="background"] {
color: #202122;
}
}
the color of collapsible list title text exactly matches the background of infoboxes (var(--background-color-interactive-subtle)) when using dark mode. This makes the title invisible in dark mode when this template is used within an infobox. Other text in infoboxes, if anything, has color: inherit !important, or uses a suitable var(--color-*). -- Stiiin (talk) 17:18, 5 December 2024 (UTC)
Support for parameters from template hidden
[edit]This could have support for some parameters used in template hidden so that same module could be used for both (and replace need for second template). It seems headerstyle and contentstyle are only fields that might be needed to add support (alternate names for parameters)? Ipr1 (talk) 14:35, 3 February 2025 (UTC)
Errors
[edit]@Zackmann08: Some articles such as Sahara have an infobox showing "Lua error in Module:Collapsible_list at line 142: attempt to call method 'expandTemplate' (a nil value)". That is because the new code in Module:Collapsible list calls frame:expandTemplate but frame is actually a table, not a Scribunto frame. The table is values which comes from {{Infobox valley}} which invokes Module:Compact list which calls clist(values) where clist = require('Module:Collapsible list').main. I'm not sure what to do about that. Probably start by reverting the change to this module then try mw.getCurrentFrame in the sandbox. Johnuniq (talk) 06:22, 2 February 2026 (UTC)
Facepalm @Johnuniq: thanks for the ping. No easy solution here... Will investigate further. For now have reverted. --Zackmann (Talk to me/What I been doing) 06:26, 2 February 2026 (UTC)
- Oh, I just tried a solution and didn't notice your revert. A diff of my edit will be a bit extreme because I cleaned the whitespace at the same time. Have a look at what I did and see if it works. Johnuniq (talk) 06:29, 2 February 2026 (UTC)
- That confused the hell out of me! But it looks like your fix did it. I'm not seeing any errors any more. Sorry I missed that... Didn't consider the case of another module calling Module:Collapsible list... Just thought about {{Collapsible list}}. I'll be offline for a bit pretty soon, but if any other issues pop up, let me know! Zackmann (Talk to me/What I been doing) 06:31, 2 February 2026 (UTC)
- No problem. Johnuniq (talk) 06:48, 2 February 2026 (UTC)
- That confused the hell out of me! But it looks like your fix did it. I'm not seeing any errors any more. Sorry I missed that... Didn't consider the case of another module calling Module:Collapsible list... Just thought about {{Collapsible list}}. I'll be offline for a bit pretty soon, but if any other issues pop up, let me know! Zackmann (Talk to me/What I been doing) 06:31, 2 February 2026 (UTC)
- Oh, I just tried a solution and didn't notice your revert. A diff of my edit will be a bit extreme because I cleaned the whitespace at the same time. Have a look at what I did and see if it works. Johnuniq (talk) 06:29, 2 February 2026 (UTC)
@Mr. Stradivarius: Just curious: Your original version of this module (July 2013) has some code that is still present:
for k, v in pairs( frame.args ) do
origArgs = frame.args
break
end
Is that doing something clever that a plain
origArgs = frame.args
would not? Johnuniq (talk) 06:48, 2 February 2026 (UTC)
- Hmmm, I guess the current code only executes
origArgs = frame.argsifframe.argsis not empty. Johnuniq (talk) 07:02, 2 February 2026 (UTC)- @Johnuniq: Yes, I think the intention was to use the frame args if any are present, and if not, use the parent frame args. — Mr. Stradivarius ♪ talk ♪ 02:47, 14 February 2026 (UTC)