Page MenuHomePhabricator

Remove unused `mediawiki.uri` ResourceLoader dependency from Special:Notifications
Closed, ResolvedPublic

Description

Echo's extension.json still lists mediawiki.uri as a dependency for ext.echo.special. However, as far as I can tell, the last actual usage of that was removed in 2016 by Adjust mobile view for the new settings cog menu.

We should drop that now obsolete dependency, especially in light of that entire module being deprecated (see parent).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1113116 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/Echo@master] refactor: Remove unused RL dependency on mediawiki.uri

https://gerrit.wikimedia.org/r/1113116

Urbanecm_WMF triaged this task as Low priority.
Urbanecm_WMF added a project: User-notice.
Urbanecm_WMF subscribed.

To User-notice folks: This task potentially affects gadgets that run on Special:Notifications (eg. http://test.wikipedia.org/wiki/Special:Notifications). If such gadgets make use of mw.Uri, they will need to ensure they explicitly depend on the mediawiki.uri ResourceLoader module. In addition to that, mw.Uri is deprecated in favour of native browser features in general (see the parent task). I'm not 100% sure this is worth including in user notice, but it will happen in the wmf.15 train.

I'm not 100% sure this is worth including in user notice, but it will happen in the wmf.15 train.

Thanks for the context and hesitation note. It's definitely better to suggest things that are declined than the opposite!

I wonder if it would be possible for us to spend a couple of minutes with some narrow onwiki searches, to find out if there are any gadgets/userscripts that are relevant? If we can do that, and find there are not any obvious uses, that will help save many hours of collective reading (and translating). E.g. I naively tried searches for mw.Uri at Enwiki MediaWiki: (15 results) / User: (144) and at Dewiki MediaWiki (0) / User: (15) -- Perhaps it is reasonable to ask a dev to skim those results and then decide if it's worth announcing?

Change #1113116 merged by jenkins-bot:

[mediawiki/extensions/Echo@master] refactor: Remove unused RL dependency on mediawiki.uri

https://gerrit.wikimedia.org/r/1113116

As @Izno said; there's a lot of usages, and it's hard to tell whether some of those belong to something that runs in notifications. However, given mw.Uri is deprecated as is, and considering it's still used at quite a few places, maybe it might make sense to phrase it as a deprecation reminder? What do you think, @Quiddity?

Sure, let's include a brief note. Please could you draft some proposed wording? I imagine it would start with something like:

Developers who maintain tools that run on the Special:Notifications page should …

But I'm uncertain how to describe what they need to check for, what to replace it with if found, or where to find related documentation if needed. (or whichever other bits are important). Thanks!

@Quiddity: Sorry, this task slipped through for me. A proposed wording could be:

Developers of tools that run on-wiki should note that mw.Uri is deprecated. Tools requiring mw.Uri must explicitly declare mediawiki.Uri as a ResourceLoader dependency, and should migrate to the browser native URL API soon.

@Urbanecm_WMF What do you think about the above as a general deprecation reminder?

Note that as of today, this module is actually still available. If I recall correctly from a different conversation, that is because WikimediaEvents is still loading it on basically every page.