From Wikipedia, the free encyclopedia

Why doesn't this template work as expected in the mobile rendering?

I browsed to a page using this template on my phone and the content which was intended by page authors to be collapsed by default was instead showing and not collapsible. Can this be fixed? IMO mobile readers should be given as close to the same reading experience as practical.

Also, if this is going to remain broken for mobile views, the template documentation should describe what happens there and why. Otherwise desktop authors who don't themselves use mobile devices are given no hint that use of this template is buggy/broken for mobile readers. – jacobolus  (t) 19:04, 10 February 2023 (UTC) reply

The documentation is not protected. There are notes about collapsing at Help:Collapsing and MOS:DONTHIDE. – Jonesey95 ( talk) 19:23, 10 February 2023 (UTC) reply
Updated the documentation (also for {{ Collapse}}) with a "Limitations" section, transcluding the relevant material from Help:Collapsing#Limitations, so if that gets updated with new information like an MW upgrade resolving the issue, then the templates' /doc pages will automatically inherit the update.  —  SMcCandlish ¢ 😼  20:38, 14 December 2023 (UTC) reply

Protected edit request on 26 May 2023

It would be useful if it were possible to left align the textbox by introducing a |margin= parameter, i.e.:

  • Replace: margin: 0.2em auto auto;
  • With: margin: {{{margin|0.2em auto auto}}};

T.Shafee(Evo&Evo) talk 05:43, 26 May 2023 (UTC) reply

 Not done: I don't see a strong rationale to support a custom option here. Izno ( talk) 00:48, 17 June 2023 (UTC) reply
Also redundant with |indent= which has simple syntax for left alignment control, which was the stated use case. A |margin= could do more than that, but there's not any demonstrated need for it, and people would probably be apt to do silly things with it.  —  SMcCandlish ¢ 😼  20:34, 14 December 2023 (UTC) reply

Hide the title when the content is uncollapsed

Is there a way to have the line of text that is visible when the box is collapsed disappear when the box is uncollapsed. Clearly "something sort-of like this" can be done, given the [show] link disappears (replaced by [hide]). Two ideas that have been mentioned in the banner-shell redesign RFC suggest this would be a useful feature. DMacks ( talk) 20:53, 18 July 2023 (UTC) reply

The [hide]/[show] stuff is done by a site-wide Javascript feature that makes use of CSS classes like mw-collapsible, mw-collapsed, etc.; I think it may be built into MediaWiki. It's not "magic" done within the template code. There's not a facility I can think of in the basic MW templating language that would make what you want feasible, though I would think it could be done in Lua code by converting from a template to a module and then working something up in the module.  —  SMcCandlish ¢ 😼  20:13, 14 December 2023 (UTC) reply

Edit request 8 December 2023

Please sync with the sandbox so that constructions like |left=no work as intended (the sandbox wraps {{{left}}} and {{{warning}}} with {{ yesno}}). House Blaster talk 17:31, 8 December 2023 (UTC) reply

Do you need to use safesubst with those templates? — Martin ( MSGJ ·  talk) 22:24, 8 December 2023 (UTC) reply
Yes. * Pppery * it has begun... 02:13, 9 December 2023 (UTC) reply
Sandbox updated. House Blaster talk 02:22, 9 December 2023 (UTC) reply
I don't see any activity yet at Template:Collapse top/testcases indicating these changes have been tested.  —  SMcCandlish ¢ 😼  18:44, 9 December 2023 (UTC) reply
Disabling for now; will return when I have a minute to bang my head against subst magic. House Blaster talk 15:19, 12 December 2023 (UTC) reply
This seems like a lot of work for little to no actual utility. We probably have 1000+ templates with a |foo=yes parameter in them that does not also parse a no value; it's understood that you just omit or blank the parameter if you don't want the feature in question to trigger. (Or in a few cases we have |bar=no syntax, to turn off a feature that's on by default, but again without an explicit yes being parsed). Handling both seems uncommonly done, and mostly for complex templates that both have wider usage and a larger number of parameters that people can't be expected to just quickly get what the default results of which are by a quick skim of the /doc page. Anyway, I don't object to adding this feature, but it seems rather unnecessary, and if you plan to go template-by-template doing this, you may meet resistance to the code bloat and "Template talk:" churn it involves.  —  SMcCandlish ¢ 😼  20:08, 14 December 2023 (UTC) reply

Want parameter to make the box as wide as the title, and left aligned

Please see: Wikipedia talk:Manual of Style/Accessibility#Template:Collapse top, and Template:Collapse bottom.

I would like a parameter that makes the collapsed box as wide as the title and left aligned.

There is already a parameter to left align the title text. I am not talking about that. I want the box itself aligned to the left side of the page.

And I want the title text to wrap in narrower screens. -- Timeshifter ( talk) 16:54, 10 February 2024 (UTC) reply

From Wikipedia, the free encyclopedia

Why doesn't this template work as expected in the mobile rendering?

I browsed to a page using this template on my phone and the content which was intended by page authors to be collapsed by default was instead showing and not collapsible. Can this be fixed? IMO mobile readers should be given as close to the same reading experience as practical.

Also, if this is going to remain broken for mobile views, the template documentation should describe what happens there and why. Otherwise desktop authors who don't themselves use mobile devices are given no hint that use of this template is buggy/broken for mobile readers. – jacobolus  (t) 19:04, 10 February 2023 (UTC) reply

The documentation is not protected. There are notes about collapsing at Help:Collapsing and MOS:DONTHIDE. – Jonesey95 ( talk) 19:23, 10 February 2023 (UTC) reply
Updated the documentation (also for {{ Collapse}}) with a "Limitations" section, transcluding the relevant material from Help:Collapsing#Limitations, so if that gets updated with new information like an MW upgrade resolving the issue, then the templates' /doc pages will automatically inherit the update.  —  SMcCandlish ¢ 😼  20:38, 14 December 2023 (UTC) reply

Protected edit request on 26 May 2023

It would be useful if it were possible to left align the textbox by introducing a |margin= parameter, i.e.:

  • Replace: margin: 0.2em auto auto;
  • With: margin: {{{margin|0.2em auto auto}}};

T.Shafee(Evo&Evo) talk 05:43, 26 May 2023 (UTC) reply

 Not done: I don't see a strong rationale to support a custom option here. Izno ( talk) 00:48, 17 June 2023 (UTC) reply
Also redundant with |indent= which has simple syntax for left alignment control, which was the stated use case. A |margin= could do more than that, but there's not any demonstrated need for it, and people would probably be apt to do silly things with it.  —  SMcCandlish ¢ 😼  20:34, 14 December 2023 (UTC) reply

Hide the title when the content is uncollapsed

Is there a way to have the line of text that is visible when the box is collapsed disappear when the box is uncollapsed. Clearly "something sort-of like this" can be done, given the [show] link disappears (replaced by [hide]). Two ideas that have been mentioned in the banner-shell redesign RFC suggest this would be a useful feature. DMacks ( talk) 20:53, 18 July 2023 (UTC) reply

The [hide]/[show] stuff is done by a site-wide Javascript feature that makes use of CSS classes like mw-collapsible, mw-collapsed, etc.; I think it may be built into MediaWiki. It's not "magic" done within the template code. There's not a facility I can think of in the basic MW templating language that would make what you want feasible, though I would think it could be done in Lua code by converting from a template to a module and then working something up in the module.  —  SMcCandlish ¢ 😼  20:13, 14 December 2023 (UTC) reply

Edit request 8 December 2023

Please sync with the sandbox so that constructions like |left=no work as intended (the sandbox wraps {{{left}}} and {{{warning}}} with {{ yesno}}). House Blaster talk 17:31, 8 December 2023 (UTC) reply

Do you need to use safesubst with those templates? — Martin ( MSGJ ·  talk) 22:24, 8 December 2023 (UTC) reply
Yes. * Pppery * it has begun... 02:13, 9 December 2023 (UTC) reply
Sandbox updated. House Blaster talk 02:22, 9 December 2023 (UTC) reply
I don't see any activity yet at Template:Collapse top/testcases indicating these changes have been tested.  —  SMcCandlish ¢ 😼  18:44, 9 December 2023 (UTC) reply
Disabling for now; will return when I have a minute to bang my head against subst magic. House Blaster talk 15:19, 12 December 2023 (UTC) reply
This seems like a lot of work for little to no actual utility. We probably have 1000+ templates with a |foo=yes parameter in them that does not also parse a no value; it's understood that you just omit or blank the parameter if you don't want the feature in question to trigger. (Or in a few cases we have |bar=no syntax, to turn off a feature that's on by default, but again without an explicit yes being parsed). Handling both seems uncommonly done, and mostly for complex templates that both have wider usage and a larger number of parameters that people can't be expected to just quickly get what the default results of which are by a quick skim of the /doc page. Anyway, I don't object to adding this feature, but it seems rather unnecessary, and if you plan to go template-by-template doing this, you may meet resistance to the code bloat and "Template talk:" churn it involves.  —  SMcCandlish ¢ 😼  20:08, 14 December 2023 (UTC) reply

Want parameter to make the box as wide as the title, and left aligned

Please see: Wikipedia talk:Manual of Style/Accessibility#Template:Collapse top, and Template:Collapse bottom.

I would like a parameter that makes the collapsed box as wide as the title and left aligned.

There is already a parameter to left align the title text. I am not talking about that. I want the box itself aligned to the left side of the page.

And I want the title text to wrap in narrower screens. -- Timeshifter ( talk) 16:54, 10 February 2024 (UTC) reply


Videos

Youtube | Vimeo | Bing

Websites

Google | Yahoo | Bing

Encyclopedia

Google | Yahoo | Bing

Facebook