Page MenuHomePhabricator

mw.ui: button : Undressed in Wikisource main space
Closed, ResolvedPublicBUG REPORT

Description

  • Buttons (mw.ui: button) disappeared 2 weeks ago in wikisource.fr and were replaced by a plain link.
  • This happens only in the main space
  • A style sheet seems to be missing

Event Timeline

See also on Vicifons, the same issue with a copy of the template using buttons : there

Hi @Denis_Gagne52, thanks for taking the time to report this!
I assume this refers to the Langue sélectionnée : Français Bilingue Latin switch?

I can reproduce the problem when going to https://fr.wikisource.org/wiki/Histoire_naturelle_(trad._Littré)/II/Bilingue/2?safemode=1&debug=true&uselang=qqx but I am unsure which codebase is providing this functionality.

See also T346468: DEPRECATION: MediaWiki UI modules are to be replaced with Codex CSS components (gadgets)

Bonjour @Aklapper, If you're more comfortable in ws.en, you’ll observe the same issue with the "Template:Clickable button 2".

See the template that doesn't apply anymore in the Main space on WS:FR : https://fr.wikisource.org/wiki/Mod%C3%A8le:Bouton_cliquable
So another template is impacted.

It used to show this way in the main space too a few weeks ago (here is a User section) : https://fr.wikisource.org/wiki/Utilisateur:SyB~Anicium/Pline/IIbis
And now the 3 buttons "Langue sélectionnée : Français - Bilingue - Latin" appear as simple links with no CSS in the main space... : https://fr.wikisource.org/wiki/Histoire_naturelle_(trad._Littr%C3%A9)/II/Bilingue/II

The same template on Vicifons : https://la.wikisource.org/wiki/Naturalis_Histori%C3%A6_(trad._Littr%C3%A9)/II/1

Thanks in advance for your help. I understand it is linked to the deprecation of MW UI, but none of us is able to update the template Bouton cliquable in order to resolve this problem...

Jdlrobson subscribed.

Hey Anicium, the mediawiki.ui.button library has been deprecated for some time and we recently removed its usage from the article namespace in preparation for removing it everywhere (and for performance and security reasons). I recommend beginning to transition away from https://fr.wikisource.org/wiki/Mod%C3%A8le:Bouton_cliquable

In this case, I believe you are talking about:

Screenshot 2023-12-19 at 10.04.25 AM.png (43×282 px, 5 KB)

The use of buttons here seems inappropriate and I'd suggest using tabs here instead:
e.g.

Screenshot 2023-12-19 at 10.08.42 AM.png (371×742 px, 53 KB)

Could you please reach out to the maintainers of https://fr.wikisource.org/w/index.php?title=Mod%C3%A8le:NavigationBilingue template to update this template not to use mw-ui-button ? I'm happy to help out here if you need more support in transitioning away from buttons.

Hey Jdlrobson !
Yes, it's exactly the result I'd like to see for the NavigationBilingue Template ! These tabs are appropriate.
I just had found a "solution" using a button, and created this template, but the timing was really bad with its deprecation in the same month...

I'd really be thankful if you could have a look to the template, in order to update it without including these buttons. I don't know how to do so, without breaking the whole template and its parameters. I can try to explain the purpose. I created it for bilingual books edited by using the template iwtrans. Then, the NavigationBilingue template would have been an automatic way to indicate on which linguistic transclusion you are, and to give a possibility to navigate between the three versions (included in the same book : french, bilingual, and latin). So, with the buttons, you just had to put 3 parameters to adapt the menu, depending on the case ! Here for example :

{{NavigationBilingue|adresseFR=|adresseBI=II|bleuBI=bleu|adresseLA=s:la:Naturalis Historiæ (trad. Littré)/II}}

Here is my User page on WS:FR if you want to follow this transition ?

Feel free to make some experiences with the template NavigationBilingue : it's not working anywhere else than in this book ; I was just working on it before it broke due to the deprecation of the buttons !

I can look at this today. What is the best process for suggesting edits? Should I create a new template or use a sandbox ?

Thanks a lot for looking at this little project ! I hope it will be an improvement of bilingual editions on WS:FR o/
You can do as you want, but I think you could edit the template and see what's going on the pages where I've included it ? I made 3 types of transclusion :

Don't be afraid by the latin text which does not appear on the bilingual section, inside a column on the right (using iwtrans) : it doesn't work with the mobile skin (another problem for another week...). But with Vector it's ok.

Confirming that, as mentioned above in https://phabricator.wikimedia.org/T353488#9411827, pages that use https://meta.wikimedia.org/wiki/Template:Clickable_button_2 are impacted by this issue. For example, the following pages on different wikis now display plain links instead of buttons:

Hey Anicium, the mediawiki.ui.button library has been deprecated for some time and we recently removed its usage from the article namespace in preparation for removing it everywhere (and for performance and security reasons).

The super confusing part of this for content maintainers is that it was only removed from main namespace apparently and not all namespaces. https://meta.wikimedia.org/wiki/Template:Clickable_button_2/doc shows the styled buttons because the css is still present in that namespace. I assume that bringing the css back is not a response to expect; I think the next best thing would be removing the default styles from all namespaces so template editors and content maintainers can see in their development and testing areas what the templates are going to look like in normal use.

The super confusing part of this for content maintainers is that it was only removed from main namespace apparently and not all namespaces.

For more context: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/974681
Although we've been communicating deprecation, and this has been deprecated for some time, we still don't have a great way to respond to deprecations on wikis. If you have any ideas on how we could handle this side of things better I'd love to hear about them in the stable policy talk page.

think the next best thing would be removing the default styles from all namespaces so template editors and content maintainers can see in their development and testing areas what the templates are going to look like in normal use.

I've been favoring a gradual deprecation to limit impact. The impact here was intentionally low (see https://phabricator.wikimedia.org/T182050#9413647 for napkin maths)

But, I am on working on the fix for Wikisource and will take care of the Template:Clickable_button_2 template on MediaWiki today after I've done that. Thanks for the ping.

Jdlrobson claimed this task.

In the originally reported Wikisource bug, we replaced the template with a more simplistic Tabs component inspired design in https://fr.wikisource.org/w/index.php?title=Mod%C3%A8le%3ANavigationBilingue&diff=13851257&oldid=13828226

For MediaWiki.org I made a new template based on the deprecated MediaWiki UI. It inlines the styles and removes a lot of rules that don't apply:
https://www.mediawiki.org/w/index.php?title=Template%3AClickable_button_2&diff=6274441&oldid=6125511

Longer term these styles will be misaligned with the WMF style guide which currently is intentional amongst concerns raised in T346469. Feel free to comment there, if you have anything to add to that conversation.

Hi @Jdlrobson, thanks again for your help on this task ! I quote myself to ask you a last helping hand on this : the template NavigatioBilinguis should work the same as you did on the french wikisource. I tried, but... couldn't reach the same result, so it's still using the deprecated buttons (here is an example).
I hope you started well the new year, I'm sorry to ask you again !

Thanks a lot for looking at this little project ! I hope it will be an improvement of bilingual editions on WS:FR o/
You can do as you want, but I think you could edit the template and see what's going on the pages where I've included it ? I made 3 types of transclusion :

Don't be afraid by the latin text which does not appear on the bilingual section, inside a column on the right (using iwtrans) : it doesn't work with the mobile skin (another problem for another week...). But with Vector it's ok.

Ok, I think I got it ! I had created this stylesheet but didn't update the template, I suppose.

Thank you so much @Jdlrobson, again, I will underline your help when announcing this new template for Wikisource. You are part of the great journey of the ancient texts from the Antiquity (Plinius), copied in the monasteries, then edited on paper, then on Wikisource :D Have a nice day !