Wikinews:Water cooler/technical

From Wikinews, the free news source you can write!
Jump to: navigation, search

Refresh

Archive, post


Migrating site-wide JS to default-on gadgets[edit]

There's a heck of a lot of JavaScript on English Wikinews, and a lot of it is convoluted, esoteric, and crammed into a few massive files (e.g. Mediawiki:Common.js); and Gadgets has had the functionality to have default-on, hidden, and right-restricted gadgets for a while now. I think we should consider migrating what we can into Special:Gadgets, to ensure that things are modular (and easier to find!), allow people to turn things off, and so forth. It works well for Commons, and we all know that English Wikinews' JavaScript needs some sort of improvement (ignoring ResourceLoader entirely)…. Thoughts? Microchip08 (talk) 20:39, 13 August 2014 (UTC)

I've been thinking lately we need to do something about common.js. I made one small addition to it to enable my interactive tools for all users, and I hope eventually that small hook there would obviate the need for the button code, making at least one slightly-less-small reduction in the code, and eventually I'd hope the interactive tools would replace ezpr and make-lead too; but looking at English Wikibooks' common.js has made me envious]]. The biggest challenge, I've been thinking, is that to clean up the existing code one has to figure it out. --Pi zero (talk) 22:12, 13 August 2014 (UTC)
Many of the things in our common.js are helpfully commented (as far as "this is where it begins" goes), so we should be able to move the sections across fairly simply. If we separate it all into gadgets, we'd could have (as an example) code, user documentation and technical documentation split into a well established structure that's easy to find. I expect that whatever Gadgets does behind the scenes will be more efficient than what we are doing today, anyhow. Microchip08 (talk) 22:44, 13 August 2014 (UTC)
Yes, this does seem desirable. Not only would it better organize things, it might also make essential elements of our infrastructure somewhat more resistant against uninformed tampering. --Pi zero (talk) 15:27, 21 September 2014 (UTC)

Grants to improve your project[edit]

Greetings! The Individual Engagement Grants program is accepting proposals for funding new experiments from September 1st to 30th. Your idea could improve Wikimedia projects with a new tool or gadget, a better process to support community-building on your wiki, research on an important issue, or something else we haven't thought of yet. Whether you need $200 or $30,000 USD, Individual Engagement Grants can cover your own project development time in addition to hiring others to help you.

Discussion versus Collaboration[edit]

I just had to fully-protect Discussion page. I was thinking it was really weird someone would create that, until I looked at the &action=edit URL in a 'Private Browsing' session. Instead of seeing the Talk page tab labelled Discussion, it's coming up as Collaboration.

I'm sure this will just be an extra message or three in the MediaWiki: namespace, which I'm going to try and track down. I think those should be changed to Discussion since, for main namespace at least, "Collaboration" is only appropriate whilst an article is within the active news cycle. --Brian McNeil / talk 11:08, 5 September 2014 (UTC)

Found messages:
  1. Mediawiki:talk, has localisation to Discussion.
  2. Nope, that's it. 30 minutes looking where this should be, and I can't find it.
Although, having MediaWiki:wikiLove.js as a system message breaks the listing when I try browsing Special:AllMessages; thus, I can't trust that I'm seeing all the messages. --Brian McNeil / talk 12:10, 5 September 2014 (UTC)

Change in renaming process[edit]

Part or all of this message may be in English. Please help translate if possible.

-- User:Keegan (WMF) (talk) 9 September 2014 16.22 (UTC)

Tech update[edit]

Some news from the Foundation:

  • On Monday, bureaucrats on English Wikinews will lose the ability to rename users, as the next step on the long, long road (since 2006!) to migrate to SUL accounts only. Renames will now only be done by "global renamers" on meta: you can request the ght at the usual location on meta: m:SRGP. There's more information in the section above.
  • On Tuesday, Wikinews will get bumped to a new MediaWiki version (1.24wmf21)
  • On Thursday there will be a new beta feature, HHVM, that you can opt in through your preferences: it is a higher performance version of the software MediaWiki runs on. There shouldn't be any problems with HHVM, but if there are it will automatically fall back to "normal" PHP. As such, opting in will at best "increase performance… by a lot", and worst-case should just be the same as your normal editing experience.

Microchip08 (talk) 09:31, 14 September 2014 (UTC)

Busy week! I'll opt in for HHVM as soon as I remember. How long are they estimating until HHVM is on by default? — Gopher65talk 20:17, 14 September 2014 (UTC)
I'll expect everything to break on Tuesday, then.
And I'll opt in for HHVM at earliest, so I can see which essential tooks it breaks and how to work around those problems. --Pi zero (talk) 20:49, 14 September 2014 (UTC)
They're not sure. You can take a look at the roadmap at mw:HHVM, but it's hard to estimate a completion time because they're not sure how many bugs they'll uncover at each stage. Microchip08 (talk) 09:36, 23 September 2014 (UTC)
HHVM is now available: you can opt in at the usual place. Microchip08 (talk) 09:34, 23 September 2014 (UTC)

Breaking JavaScript changes[edit]

Several deprecated methods in MediaWiki's JavaScript modules will be removed in a few weeks' time. Ensure your code no longer uses these methods and update it if needed, and check and fix any gadgets or scripts you or Wikinews rely upon. These methods will be removed in the MediaWiki 1.25 release (scheduled for deployment to WMF wikis October 4th onwards, will hit Wikinews the week after): as such anything relying on them will break. The methods that need replacement are:

  • mw.user.name() (deprecated since Mediawiki 1.20 (2012)) – use mw.user.getName() instead gerrit:111422
  • mw.user.anon() (deprecated since 1.20) – use mw.user.isAnon() instead gerrit:111422
  • the mediawiki.api methods' "ok" and "err" callback parameters (since 1.21 (2013)) – use the returned Promise interface instead gerrit:118733
  • the mediawiki.api.category async parameter (use Promise instead) gerrit:118733
  • the jquery.json module (use the standard JSON.stringify() instead) gerrit:40560

If you identify problems but are unsure how to fix them, please ask for help! Microchip08 (talk) 12:22, 21 September 2014 (UTC)

Well, a simple string search in MediaWiki: space didn't turn up any instances of these for me; if I wasn't looking for the wrong strings, the lack of matches is perhaps a good sign. --Pi zero (talk) 15:30, 21 September 2014 (UTC)