Page MenuHomePhabricator

Audit template(styles), gadgets, and user scripts for new media structure
Closed, ResolvedPublic

Description

These need to be adjusted to the new structure, hopefully in a forwards and backwards compatible way.

Some places to go looking include,

See the notes at https://www.mediawiki.org/wiki/Parsing/Media_structure#Migrating_Gadgets_and_User_Scripts


Notifications were made with,
https://guc.toolforge.org/?by=date&user=Arlolra

Edits, where necessary, were made with,
https://guc.toolforge.org/?by=date&user=ABreault+%28WMF%29


From T314318#8216188, the gadget "Direct imagelinks to Commons" was identified as needing the following update,
https://www.mediawiki.org/w/index.php?title=Snippets%2FDirect_imagelinks_to_Commons&type=revision&diff=5451422&oldid=3976429

The list of wikis that have it enabled is: P896, and user scripts: P34191

  • Talk page notifications sent

From T297447#8243317, the gadget "WikiMiniAtlas" was identified as needing the following update,
https://meta.wikimedia.org/w/index.php?title=MediaWiki%3AWikiminiatlas.js&type=revision&diff=23833370&oldid=22661610

The list of wikis that have it enabled is: P38164

  • Talk page notifications sent

These all load the gadget from meta.


From T297447#8330857, the gadget "WikimediaUI Dark Mode" was identified as needing the following update,
https://en.wikipedia.org/w/index.php?title=MediaWiki%3AGadget-dark-mode.css&type=revision&diff=1119248845&oldid=1101625928

The list of wikis that have it enabled is: P38165

  • Talk page notifications sent

From T287963#8234537, the template styles for Template:Banner on enwikivoyage was identified as needing an update,
https://en.wikivoyage.org/w/index.php?title=Template%3ABanner%2Fstyles.css&type=revision&diff=4523569&oldid=3732050

The list of wikis that may require a similar fix: P42518

  • Talk page notifications sent

From T297447#8846355, the gadget "NewImageThumb" was identified as needing the following update,
https://en.wikipedia.org/wiki/Special:ComparePages?page1=MediaWiki%3AGadget-NewImageThumb.css&rev1=1017248689&page2=User%3AArlolra%2Fsandbox%2FGadget-NewImageThumb.css&rev2=1156645340&action=&unhide=

The list of wikis that have it enabled is: P48496

  • Talk page notifications sent

The gadget "Blackskin" was identified as needing the following update,
https://en.wikipedia.org/wiki/Special:ComparePages?page1=MediaWiki%3AGadget-Blackskin.css&rev1=1099887124&page2=User%3AArlolra%2Fsandbox%2FMediaWiki%3AGadget-Blackskin.css&rev2=1158090047&action=&unhide=

The list of wikis that have it enabled is: P48703

  • Talk page notifications sent

The gadget "NoSmallFonts" was identified as needing the following update,
https://en.wikipedia.org/wiki/Special:ComparePages?page1=MediaWiki%3AGadget-NoSmallFonts.css&rev1=1084159523&page2=User%3AArlolra%2Fsandbox%2FMediaWiki%3AGadget-NoSmallFonts.css&rev2=1158900138&action=&unhide=

The list of wikis that have it enabled is: P48957

  • Talk page notifications sent

The gadget "responsiveContent" was identified as needing the following updates,
https://en.wikipedia.org/wiki/Special:ComparePages?page1=MediaWiki%3AGadget-responsiveContentBase.css&rev1=1104943208&page2=User%3AArlolra%2Fsandbox%2FGadget-responsiveContentBase.css&rev2=1163452302&action=&unhide=
https://en.wikipedia.org/wiki/Special:ComparePages?page1=MediaWiki%3AGadget-responsiveContentBaseTimeless.css&rev1=1104954229&page2=User%3AArlolra%2Fsandbox%2FMediaWiki%3AGadget-responsiveContentBaseTimeless.css&rev2=1163571594&action=&unhide=

The list of wikis that have it enabled is: P49514

  • Talk page notifications sent

Event Timeline

Arlolra triaged this task as Medium priority.Dec 9 2021, 11:52 PM
Arlolra moved this task from Needs Triage to Media Structure on the Parsoid board.

Templates can also produce legacy DOM, expecting the skin to style it (e.g. hu:Sablon:Széles kép), and/or consume the DOM using TemplateStyles. These also need to be checked, and I think they could be in the scope of this ticket.

Arlolra renamed this task from Audit gadgets and user scripts for new media structure to Audit template(styles), gadgets, and user scripts for new media structure.Sep 16 2022, 6:35 PM

These also need to be checked, and I think they could be in the scope of this ticket.

Yes, thank you, I've updated the task title to reflect that. Here's an example T287963#8234537 from one of the early adopter wikis T314318 where we've been preparing templatestyles for the change.

Templates can also produce legacy DOM, expecting the skin to style it expecting the skin to style it (e.g. hu:Sablon:Széles kép)

This particular example should be unaffected since, for the moment, we aren't removing the old styling rules. But, yes, getting all the on wiki content that mimics the parser output ported to the new styling rules will be a longer term goal.

Work on Gadget-Direct-link-to-Commons.js was started in T314318#8216188 and the change to the snippet needs porting to all the affected wikis P896
https://www.mediawiki.org/w/index.php?title=Snippets%2FDirect_imagelinks_to_Commons&type=revision&diff=5451422&oldid=3976429

Gadget-WikiMiniAtlas.js needs inspection, https://meta.wikimedia.org/w/index.php?title=MediaWiki:Wikiminiatlas.js

// remove icons from title coordinates
$('#coordinates,#coordinates-title,#tpl_Coordinaten').find('a.image').detach();

This particular example should be unaffected since, for the moment, we aren't removing the old styling rules. But, yes, getting all the on wiki content that mimics the parser output ported to the new styling rules will be a longer term goal.

https://en.wikipedia.org/wiki/Template:Multiple_image looks like another one

This particular example should be unaffected since, for the moment, we aren't removing the old styling rules. But, yes, getting all the on wiki content that mimics the parser output ported to the new styling rules will be a longer term goal.

https://en.wikipedia.org/wiki/Template:Multiple_image looks like another one

Probably the easiest way to identify them is to use either global search (or just local search) looking for any/all of the relevant HTML classes associated with the old structure.

Similar to T297447#8248831, https://vi.wikipedia.org/wiki/MediaWiki:Gadget-OpenStreetMap.js has $("#coordinates img").off("click").remove(); but that's probably fine as is

Some more to look into,

arlolra@mwmaint1002:~$ mwgrep "thumbimage" --max-results 200

...

enwiki              MediaWiki:Gadget-ImageAnnotator.js
enwiki              MediaWiki:Gadget-NewImageThumb.css
enwiki              MediaWiki:Gadget-responsiveContentBase.css
enwiki              MediaWiki:Gadget-responsiveContentBaseTimeless.css

enwiki MediaWiki:Gadget-ImageAnnotator.js

This one seems fine but belongs in T318433

Arlolra updated the task description. (Show Details)