#6529 'hidden' template and other default-to-collapsed cases do not work in updated mediawiki
Closed: Fixed 4 years ago by kevin. Opened 6 years ago by adamwill.

The Release Criteria pages use the 'hidden' wiki template extensively. There are supposed to be 'footnotes' to each criterion with more information, historical links, etc. In the old wiki, these displayed correctly - only their titles were shown by default, with a little "+" button that could be clicked to show their whole content. But in the updated wiki, the whole content of each 'hidden' template is shown by default, and there is no button to hide/expose the 'hidden' content. See:

There's a similar problem with some tables in the release validation pages. e.g. this table in the installation matrix:

specifies class="wikitable sortable collapsible collapsed" in the wikicode for the table, which should display it 'collapsed' (only the header row visible) by default, with an expander button to show the whole thing. This is how it looked in the old wiki. But it now just shows the whole table by default, with no button to expand/hide.

@puiterwijk says:

<puiterwijk> Well, now I fully destroyed staging wiki. But it is one of the Common files
<puiterwijk> adamw: please file an infra or theme ticket as I am unable to fix it, since it's in Common.css/Common.js probably.
<puiterwijk> And I have no idea what of that we can retain, what we need to update, and what can kill
<puiterwijk> http://fedoraproject.org/wiki/MediaWiki:Common.css and http://fedoraproject.org/wiki/MediaWiki:Common.js
<puiterwijk> And https://en.wikipedia.org/wiki/MediaWiki:Common.css and https://en.wikipedia.org/wiki/MediaWiki:Common.js together contain code/css for the collapsible stuff

Ping? This is still here and still a big problem for the release criteria page especially. @puiterwijk, who can we assign this to who might be able to do something about it?

If you replace class="collapsible collapsed" with class="mw-collapsible mw-collapsed", it seems to work.

aha, handy. now we just need to find all the damn places we used that, and change it :(

I fixed it in these pages:
https://fedoraproject.org/wiki/Category:QA_test_matrix_templates

This bug can be closed, I believe (can't do that myself).

Metadata Update from @kevin:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

6 years ago

I kind of disagree. I think the fact that the class names that worked before do not work now is still a bug, at least unless we script some sort of mass replace across the entire wiki. We don't even know how many other places these tags may be used in, but I can say for sure it's not fixed everywhere - all the existing test results pages aren't fixed, nor are the release criteria pages...

Metadata Update from @adamwill:
- Issue status updated to: Open (was: Closed)

6 years ago

Metadata Update from @kevin:
- Issue priority set to: Waiting on Asignee

6 years ago

I found several things like:

` The reason is that mw-collapsible is a MediaWiki core functionality and collapsible and other stuff is old style (English) Wikipedia specific code. As far as I can tell the switches all still work, but possibly not for you. Please accurately describe the examples that don't work for you, as well as the browser you use etc etc etc.. —TheDJ (talk • contribs) 21:24, 18 October 2016 (UTC)

So I think the old labels are just no longer used in favor of the new ones.

Did we get all those changed? can we close this now?

The hidden template was never fixed, the release criteria have been broken for years (all the bits that are supposed to be collapsed by default are not).

OK, well, I fixed it now! That turned out not to be so very hard. So the release criteria finally work properly again.

Cool. Shall we close this now? Did you just change the template? or?

yeah, I changed the template to use mw-collapsible.

There are still existing pages which have collapsible and are broken, as per https://pagure.io/fedora-infrastructure/issue/6529#comment-503524 . I dunno if we want to script some sort of mass replacement there...

well, I think I would rather not... the only way it might work is to do it in the db, and I would be afraid we would mess up something there.

Is it too bad that old results aren't collapsed?

it's not awful, it just irks me a bit. doing it in the db wouldn't be mandatory, i could certainly script it with mwclient, though the script would probably trigger some sort of banhammer at some point :D

I think we could excempt an account from the banhammer if you want to try it?

So, should we close this here? or you want to try and script it?

eh, just close it. i can still script it if i ever get around to it.

Metadata Update from @kevin:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata