Per https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/430951/, next steps are:
- Ensure mw:RL/MGU includes an adequate migration guide for mw.util.jsMessage. In particular it needs to explain that it isn't a simple rename of an existing method. There are two things to look out for. First, the method is in a different module now, which means consuming code must depend on "mediawiki.notify". Second, "implicit raw HTML" was deprecated. Depending on the value of the message parameter, the caller may need to add one function call:
- If passing a jQuery object or Element object, nothing needs to change.
- If passing a string value that is intended to be plain text, nothing needs to change.
- If passing a string intended to be raw HTML, the caller must explicitly call $.parseHTML() first.
- Add a short message to Tech-News with a link to the RL/MGU guide.
- Then, go ahead and merge https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/430951/.
I'll self-assign this task now for the first bullet point.
@Johan Here's the copy I got:
Feel free to modify/improve as you see fit. In particular, I'm unsure whether we need the help-link for accessing the console (because it's not localised, and not something we linked before). But, I thought maybe it's good to add on occasion, even without localisation initially. (And a translator could always change the link to a local page, if they have one.)
Yep, that's right. The change is expected to land in the "master" branch during next week (any time after the weeks's branch cut point on Tuesday), to roll out as part of the next branch to be cut after that (e.g. Week 49 / 1.33-wmf.5).
@Johan: A quick grep states that [mw|mediawiki].util.jsMessage is used in 99 gadgets (see P7840) on WMF sites. Some might be popular (Twinkle).
Has it been considered to give an explicit heads-up on corresponding Village Pumps explicitly mentioning names of affected gadgets on that very wiki (with link to migration guide, plus mention that further user scripts might also be affected, plus maybe mention that it's not a bad idea to follow Tech News if this message was news to them)? Or is that technically too difficult, considered too spammy, not enough resources, ...?
(Ideally, folks should care about deprecation warnings and read Tech News. In practice, I'm not looking forward to the help calls from potentially frustrated members of numerous communities who did not care/read, when once upon a time random gadgets were copied over, with lack of tech maintenance knowledge nowadays.)
@Aklapper Interesting to see Twinkle in the search results. The statistics for the deprecated method indicate it is rarely used (https://grafana.wikimedia.org/dashboard/db/mw-js-deprecate), which makes it surprising to see a match for Twinkle (a popular gadget).
I believe in the course of user interaction, this would never be reached (which explains how it can be that jsMessage has, globally at WMF, less than 10 hits in Grafana per 24 hour period; compared to ~ 3,000 for importScriptURI and ~ 35,000 for wg-globals).
OK, if the number of hits in Grafana is less than 10 per 24 hours globally I won't make a big announcement everywhere, but I've still written on a number of talk pages relating to affected gadgets on different wikis and on technical Village Pumps of affected wikis that have those.