Template talk:Collapsible list/Archive 2
![]() | 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 |
Should not hide by default
Per MOS:DONTHIDE this should not be in a collapsed state by default. Other collapsible content templates have been fixed (unless I'm missing one somewhere) to resolve this failure to comply with the guidelines. Auto-collapsing content is both an accessibility problem (screenreader users cannot expand it) and a mobile problem (various mobile devices/browsers will not show such elements or allow them to be expanded again). There are two approaches to fixing this (then updating the /doc to compensate):
- Invert the default behavior.
- Install a namespace switch to invert the default behavior in mainspace, but leave it auto-collapsing otherwise.
Option 2 might theoretically be preferable if a) this template is frequently used outside of mainspace, and b) only for content where accessibility and mobile use are not an issue. I'm very skeptical this will actually be applicable, so absent a strong showing that is it, option should be implemented. — SMcCandlish ☏ ¢ 😼 12:03, 29 July 2018 (UTC)
Link to show the list overlaps title
In article Elizabeth II, template {{Collapsible list}} is used inside the infobox. Unfortunately, the link to show the collapsed list overlaps with the text "Queen of the United Kingdom and the other Commonwealth realms". I've added a new test case to demonstrate the issue. —andrybak (talk) 08:29, 6 September 2020 (UTC)
- Fixed? Sandbox looked good before I pushed the sandbox stuff live. --Izno (talk) 20:12, 23 February 2021 (UTC)
Liststyle centers text and does not make it smaller
Please see these test cases. When I try to add |liststyle=font-size:85%;
to a bulleted list, the text is not made small, and it is centered instead of placed at the left. I expect that the problem is either in my parameter value or in the logic applied when a custom liststyle is chosen. Who can tell me what is going on here? – Jonesey95 (talk) 17:24, 19 June 2020 (UTC)
- I've just sorted these both but I suspect it will have affected one or two pages in the wild. --Izno (talk) 20:18, 23 February 2021 (UTC)
Hide title of list when list is uncollapsed?
On WikiProject Video games, we use collapsible lists in infoboxes where many release dates are listed and use the initial date as title of the list. However, when the list is expanded the initial date is shown once as the title and once in the platform-specific section within the list, making the first one redundant.
Given this, is it possible to hide the title when the list is uncollapsed or could that feature be implemented? Lordtobi (✉) 07:24, 6 June 2018 (UTC)
- @Lordtobi: link please.. —TheDJ (talk • contribs) 10:55, 6 June 2018 (UTC)
- Grand Theft Auto V, for example. Lordtobi (✉) 11:29, 6 June 2018 (UTC)
- @TheDJ: Hi, any update on this? Lordtobi (✉) 13:42, 8 October 2018 (UTC)
- Grand Theft Auto V, for example. Lordtobi (✉) 11:29, 6 June 2018 (UTC)
- This doesn't seem like behavior we should support in the core module. This usage is niche, at best. --Izno (talk) 20:20, 23 February 2021 (UTC)
Template-protected edit request on 2 March 2020
![]() | This edit request to Template:Collapsible list has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Not sure what needs to be changed in an X to Y fashion since I have no knowledge editing templates this complex, but here's the issue: When I implemented {{Collapsible list}} on Tesla, Inc. as can be seen on this diff the title overflowed under the "show" link, so I had to insert <br/>
in the title of the collapsible list in this diff. (In this edit I also made it an hlist but that's unrelated to my request.) This is not the most ideal compromise as some readers view Wikipedia in different fonts, sizes and with certain accessibility modes active that may make this compromise ineffective. Please may you assist me in rectifying this by in some way making the area behind the "show" button unable to have title text be printed behind it. comrade waddie96 (talk) 17:15, 2 March 2020 (UTC)
- TheDJ tried to fix this problem (list name overlaps the show/hide link) a while ago (see section above), but it didn't work. Someone else might have a brilliant idea to fix this long-standing problem. – Jonesey95 (talk) 18:18, 2 March 2020 (UTC)
- I switched to mw-collapsible in the sandbox. The testcases look right for me. @TheDJ: What was the problem last time? (Please note that the sandbox already contains a change in connection with Template talk:Collapsible list/Archive 1#titlestyle again, and I followed its example for framestyle as well. If that’s too risky, we can get back to the old version only overriding styles when there’s no framestyle parameter.) —Tacsipacsi (talk) 01:36, 3 March 2020 (UTC)
- Jonesey95,Idon't remember exactly, but I suspect it was align:center'ed content being pushed off center by the width of the toggle. —TheDJ (talk • contribs) 10:37, 5 March 2020 (UTC)
- We have to give up one of them: either the text is precisely centered, and consequently it overlaps with the collapse toggle, or it doesn’t overlap, but consequently goes to the left that much. I support readability over precise alignment. —Tacsipacsi (talk) 22:41, 10 March 2020 (UTC)
- Not relevant to any change to this template, however just pointing out MOS:DONTHIDE is against hiding content in an infobox (or anywhere). --Gonnym (talk) 11:01, 9 March 2020 (UTC)
- I second this. Whatever is to be hidden, it is contrary to the intention of the WP:INFOBOX. iow: irrelevant. -DePiep (talk) 20:59, 13 March 2020 (UTC)
Not done for now: I'm getting a "not entirely sure what should be changed" vibe. Please feel free to set back to unanswered if/when you're sure of what to change and have a consensus to change it. Izno (talk) 20:56, 14 March 2020 (UTC)
- I think it’s pretty obvious what should be changed (this), the only real question is whether it should be changed at all. I say yes, but I think we should have a clear opinion (at least an “I don’t mind”) from TheDJ as well. —Tacsipacsi (talk) 00:38, 15 March 2020 (UTC)
It's a bit of a hack, but may like this ? —TheDJ (talk • contribs) 13:42, 15 March 2020 (UTC)
- @TheDJ: Yeah, most probably something hackish is needed. Your solution, however, is problematic in narrow cases—if the whole collapsible box is, say, 15em wide, more than the half of the whole width is the margin. I suggest rather using a same-sized floating box on the left size (and precisely setting the width of the right-hand collapse button using TemplateStyles). This way the 4+4em “margin” only applies to the first line; if the title doesn’t fit in one line, further lines are 100% wide (or whatever has been set in the style parameters). We should also pay attention to set these only when JavaScript is available (
html.client-js
), as the toggle button isn’t present otherwise. —Tacsipacsi (talk) 00:02, 16 March 2020 (UTC)
Oh hey, here I am trying to remove navframe and I stumbled on this discussion :^). Did we ever sort out what we were going to do or have a reasonable belief that the change is a good/neutral change? --Izno (talk) 19:25, 30 June 2020 (UTC)
- @Izno: I don’t think anything happened since my March 16 comment. I still think that this hack would work, but haven’t tried it. (As far as I remember, {{navbox}} uses something like this if either the navbar or the collapse button is hidden, by the way.) —Tacsipacsi (talk) 14:21, 1 July 2020 (UTC)
- Here I am again, this time to look at the actual problem. Initial glance appears to me that it will more or less work, though I agree it's kind of hacky. Good enough for me I think.
- Yes, navb(ar|ox) does similar. --Izno (talk) 06:49, 19 February 2021 (UTC)
- This replacement is live now. Please let me know if there are issues. --Izno (talk) 20:08, 23 February 2021 (UTC)
@Izno: I'm pretty sure this change messed up collapsible lists inside of collapsible lists- see Wikipedia:WikiProject_Video_games/New_article_announcements/Archivesbox; the outer template has its "show" button with float:right, but the inner ones now get float:none, making them confusingly show up on the line above the rest of the title. The template use here is minor, but if nested collapsible lists is a supported concept it's a valid bug. Only now noticing this since I interact with that template once a month. --PresN 15:11, 8 March 2021 (UTC)
- @PresN: Yes, that's caused by this change. I do not know why the Javascript is opinionated about what happens inside a list item. I honestly don't know if nested collapsible lists are or should be supported. We can probably make some local TemplateStyles to fix it if we want. --Izno (talk) 17:41, 8 March 2021 (UTC)
- Did some reading, found that it's been that way since 2010 and in fact deliberately inconsistently with how divs work:
/* list-items go as wide as their parent element, don't float them inside list items */
. --Izno (talk) 20:09, 8 March 2021 (UTC)- Filed a phab task for it, I don't know if anyone will action it. phab:T276861. --Izno (talk) 20:45, 8 March 2021 (UTC)
- Thanks, Izno! Fingers crossed for a solution.
PresN, I think we could work something up with a navbox and collapsible lists if worst came to worst. It might be ugly, but probably better than what we have now... -Thibbs (talk) 23:11, 9 March 2021 (UTC)- Well, the solution is basically known and I've implemented a solution local to that template. Still not sure whether to implement here. --Izno (talk) 23:52, 9 March 2021 (UTC)
- Thanks Izno; yeah, that template is an ugly maintenance template in a little-seen set of project pages, and could be replaced pretty easily with a non-collapsible box of links if anyone really wanted to. The issue is more if there's a valid use case for nested collapsible lists in article space that this bug is breaking, which I'm not sure there really should be since collapsible templates in the first place get the side-eye for accessibility/mobile reasons. --PresN 23:07, 10 March 2021 (UTC)
- Well, the solution is basically known and I've implemented a solution local to that template. Still not sure whether to implement here. --Izno (talk) 23:52, 9 March 2021 (UTC)
- Thanks, Izno! Fingers crossed for a solution.
- Filed a phab task for it, I don't know if anyone will action it. phab:T276861. --Izno (talk) 20:45, 8 March 2021 (UTC)
Styles not working?
![](http://upload.wikimedia.org/wikipedia/en/thumb/f/fb/Yes_check.svg/20px-Yes_check.svg.png)
{{Collapsible list|framestyle=background-color:#f8f9fa;|titlestyle=color:green;|title=Title|1=First item|2=Second item}}
- First item
- Second item
What am I missing here? – Uanfala (talk) 20:21, 1 April 2021 (UTC)
- Uanfala, fixed your code for you. Frietjes (talk) 22:39, 1 April 2021 (UTC)
- Ah, thanks, Frietjes. Silly it didn't occur to me that the quotation marks wouldn't be required. – Uanfala (talk) 22:43, 1 April 2021 (UTC)
Page update
Update the page as of new features in collapse by wikipedia in 2019.A.S. Universal (talk) 04:40, 31 July 2021 (UTC)
Nowrap option
Perhaps, template needs a nowrap option. In wide tables expanded collapsible list looks messy, as wrapped by every word. So there needs to be an option not to wrap an entry, so each entry will be own line. Elk Salmon (talk) 15:27, 14 January 2022 (UTC)
- Nevermind,
liststyle = white-space: nowrap;
does it well Elk Salmon (talk) 15:43, 14 January 2022 (UTC)
Show/hide colour?
I'm wondering if anyone knows a way to change the colour of the show/hide button? Aris Odi ❯❯❯ talk 01:26, 5 February 2022 (UTC)
Mobile bugs
As stated here already, mobile view is buggy. On my devices, I just can't expand any list using "collapsible lists". Comrade Mmirg (talk) 18:39, 26 September 2022 (UTC)
"[show]" appearing before the title rather than after it
Can anyone spot the error at the infobox for pound sterling? In this sequence
United Kingdom
- 9 British territories
-
British Antarctic Territory
-
Falkland Islands (alongside Falkland Islands pound)
-
Gibraltar (alongside Gibraltar pound)
-
Saint Helena, Ascension and Tristan da Cunha (Tristan da Cunha; alongside Saint Helena pound in Saint Helena and Ascension)
-
South Georgia and the South Sandwich Islands (alongside Falkland Islands pound)
-
British Indian Ocean Territory (de jure, US dollar used de facto)[1]
-
Guernsey (local issue: Guernsey pound)
Isle of Man (local issue: Manx pound)
Jersey (local issue: Jersey pound)
the "[show]" for the 9 territories is appearing before the title rather than after it. I have tried adding framestyle=border:none; padding:0;
with no effect. (Interesting though that the error reproduces here... I thought it would be an infobox artefact.) --𝕁𝕄𝔽 (talk) 18:52, 26 September 2022 (UTC)
References
- ^ "British Indian Ocean Territory Currency". Wwp.greenwichmeantime.com. 2 August 2013. Archived from the original on 22 July 2016. Retrieved 28 July 2014.
𝕁𝕄𝔽 (talk) 18:52, 26 September 2022 (UTC)
- This looks like a bad use of collapsible lists, especially since the title of the collapsed list says "9 British territories" but 6 lines are collapsed and 3 are shown. I would redesign this list instead of trying to fix this weird reader-unfriendly usage. – Jonesey95 (talk) 21:21, 26 September 2022 (UTC)
- A note: When I reload the page, it briefly flashes the [show] link to the right of "9 British territories" before redrawing it above the title. That's a little odd. I tried making the title much shorter, thinking that maybe there was not enough room in the infobox, but as you demonstrated above, that does not appear to matter. – Jonesey95 (talk) 21:26, 26 September 2022 (UTC)
- I suspect that the six plus three behaviour was deliberate, because they are different categories. IMO the list is clutter but clearly some people regard it as of value as it has been there a long time.
I hope that the change you made was just temporary because it looks seriously WP:undue. If we can't resolve it in the next couple of days, I will comment it out as it is fully described in the body.For a guess, I suspect that someone tried to go halfway by making it collapsible but the cure seems worse than the disease and it is even worse now. --𝕁𝕄𝔽 (talk) 23:40, 26 September 2022 (UTC)- Whoops, I may have jumped to a wrong conclusion. I see from MOS:hide that such lists are expanded on mobile, so it is probably nothing to do with what you did or didn't do, so I have withdrawn. I will look at again tomorrow. As you say, it is seriously unfriendly so my strong inclination right now is to be bold and remove it. --𝕁𝕄𝔽 (talk) 23:51, 26 September 2022 (UTC)
- My edit fixed some stray italic formatting and made the collapsed list match the list's title. I'm fine with the list existing only in the body (perhaps leaving the title in some form in the infobox), but it looks like that article's (very busy!) talk page is the right place to have that discussion. – Jonesey95 (talk) 00:11, 27 September 2022 (UTC)
- I have now done exactly that.
- My edit fixed some stray italic formatting and made the collapsed list match the list's title. I'm fine with the list existing only in the body (perhaps leaving the title in some form in the infobox), but it looks like that article's (very busy!) talk page is the right place to have that discussion. – Jonesey95 (talk) 00:11, 27 September 2022 (UTC)
- Whoops, I may have jumped to a wrong conclusion. I see from MOS:hide that such lists are expanded on mobile, so it is probably nothing to do with what you did or didn't do, so I have withdrawn. I will look at again tomorrow. As you say, it is seriously unfriendly so my strong inclination right now is to be bold and remove it. --𝕁𝕄𝔽 (talk) 23:51, 26 September 2022 (UTC)
- I suspect that the six plus three behaviour was deliberate, because they are different categories. IMO the list is clutter but clearly some people regard it as of value as it has been there a long time.
Phabricator
has a related ticket: https://phabricator.wikimedia.org/T111565 fgnievinski (talk) 05:17, 13 January 2023 (UTC)