Last modified: 2014-10-13 23:12:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71550, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69550 - Move code in enwiki MediaWiki:Common.js and Gadgets to MediaWiki software
Move code in enwiki MediaWiki:Common.js and Gadgets to MediaWiki software
Status: NEW
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 27766 30352 70499
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-14 16:09 UTC by Jon
Modified: 2014-10-13 23:12 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jon 2014-08-14 16:09:55 UTC
There are various bits of JavaScript in Common.js to customise the enwiki experience. It is a shame there are not customisable in LocalSettings.php or bits of code in the JS experience.

Let's aim to start removing the need for this code in Common.js in enwiki (and then long term in other projects) and help update our software to meet the use cases/address the gaps that editors of that page have clearly identified.

[1] https://en.wikipedia.org/wiki/MediaWiki:Common.js
Comment 1 James Forrester 2014-08-14 16:40:06 UTC
Common.js ships blank in MediaWiki.

I imagine this is meant to be about Wikimedia. :-)
Comment 2 Helder 2014-08-14 16:55:02 UTC
Is this bug intended to be specific for enwiki?

In the last months/days we have migrated a few of the scripts which were loaded from common.js[1] to gadgets enabled by default:
* Geonotices:
https://en.wikipedia.org/wiki/WP:Village_pump_%28technical%29/Archive_129#Migrating_Geonotice_to_a_gadget
* Interwiki links to good/featured articles/lists:
https://en.wikipedia.org/wiki/MediaWiki_talk:Common.js#Global_gadget_for_LinkFA
(this will be superseded by Wikidata badges - bug 40810)
* RefTools:
https://en.wikipedia.org/wiki/MediaWiki_talk:Common.js#Move_initializeRefTools_to_a_default_gadget

But it is likely that similar improvements are still pending on other N wikis.

Moreover, we still have to migrate other parts, such as
* Extra edit buttons:
https://en.wikipedia.org/wiki/MediaWiki:Common.js/edit.js
* Addition of links to rendered PNG images in different resolutions:
https://en.wikipedia.org/wiki/MediaWiki:Common.js/file.js
* Dismiss-able buttons to watchlist messages:
https://en.wikipedia.org/wiki/MediaWiki:Common.js/watchlist.js
* Loader for [[Meta:WikiMiniAtlas]]: [1]
* Old collapsible tables/navframes in[1], to be synced with (and then loaded from)
https://www.mediawiki.org/wiki/MediaWiki:Gadget-collapsibleTables.js
(jquery.makeCollapsible from core still lacks functionality to be used instead of the local versions, and there are bug reports for them) 
* Rewriting of links to stay on secure server:
https://en.wikipedia.org/wiki/MediaWiki:Common.js/secure_new.js

And there are also thinks like:
* A workaround for bug 8912 in the bottom of MediaWiki:Common.js/edit.js
* Implementation[1] of redirects from /skin.js to the JS page associated to the skin the user is using. This could be added to MediaWiki.


[1] https://en.wikipedia.org/wiki/MediaWiki:Common.js
Comment 3 Jon 2014-08-14 17:20:16 UTC
Yes to be clear, I think we should be going through English Wikipedias Common.js and moving code here into the software. I then envision similar bugs for other language projects.

To me the need to use Common.js is highlighting issues in the core software that need to be fixed. We should be making the software more efficient. The redirect of User:Jdlrobson/skin.js to User:Jdlrobson/vector.js if I have Vector enabled is a great example. This should be /in/ the software! :)

Have updated bug title to be clearer. Sorry.
Comment 4 Alex Monk 2014-08-14 17:43:36 UTC
enwiki sounds like a good starting point (given that a ton of things just get copied directly from there), but that's not to say we shouldn't be improving JS used on other wikis.
Comment 5 Helder 2014-08-14 17:45:55 UTC
I moved the request for a skin.js/css redirect to bug 69555.
Comment 6 Jon 2014-08-14 17:53:12 UTC
Alex: completely agree! I have noticed a lot of cargo cult programming. Japanese Wikipedia for example will copy and paste stuff from English Wikipedia but then it doesn't get updated when English Wikipedia will change. In the long run I think these sort of tweaks to the software will make every project happier.
Comment 7 Helder 2014-08-14 19:02:07 UTC
What about setting $wgUseSiteJs = false on wikis where these scripts were migrated into default gadgets and recommending that as the way to customize the site?
Comment 8 Bartosz Dziewoński 2014-08-16 19:28:12 UTC
There is probably more interesting code (and likely higher-quality, too) in default-enabled gadgets.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links