Page MenuHomePhabricator

Make more Wikibase ResourceLoader modules available on mobile as well
Open, Needs TriagePublic

Description

Wikibase has many ResourceLoader modules that (as of 2023-01-06) don’t specify any targets, and thus are only available on desktop, not on mobile. However, it’s not always clear whether these modules are intentionally desktop-only, or whether they should also be enabled on mobile but were just missed so far. (Even if a module should be available on mobile, it’s of course possible that it requires some further code changes before it can actually work, of course.)

Per T326405, we don’t want to enable all the modules on mobile automatically, so we’re adding explicit 'targets' => [ 'desktop' ] to all modules that don’t specify targets yet (because the default targets are due to change soon); the purpose of this task is to then go through these modules and see how many of them we can change to 'targets' => [ 'desktop', 'mobile' ].

Event Timeline

One random candidate that I found: wikibase.special.languageLabelDescriptionAliases, which is responsible for updating the placeholders on Special:NewItem and Special:NewProperty when you select a different language, works perfectly well on mobile, as far as I can tell (I tried it on my local wiki).

SpecialConstraintReportPage is another module (again for a special page, this time in WikibaseQualityConstraints) that we probably want to enable on mobile.

There is some maybe useful code review about modules that might be worth enabling on mobile: Drop RL targets from client (except bridge) (I81ef6b3f)

This covers distinct functionality on both repo and client code, so I'll add both here explicitly.

Jdlrobson claimed this task.

All modules should be available on desktop and mobile now that the targets system. You can verify this by calling mw.loader.getState of any module - it should return registered.

e.g. on mobile:

> mw.loader.getState('wikibase.special.languageLabelDescriptionAliases')
> 'registered'
Lucas_Werkmeister_WMDE removed Jdlrobson as the assignee of this task.

That’s not the point of this task. The point of this task is to determine how much functionality we want to load on mobile, not which modules we want to register there.