Page MenuHomePhabricator

[REPO] Please remove use of BeforePageDisplayMobile hook
Open, HighPublic

Description

The BeforePageDisplayMobile will be deprecated in 1.43 (T350200).

A usage was detected in the Wikibase codebase here:
https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/31782c68e53239618eb59b2f4574fc93d1d6b87e/extension-repo.json#969
Please update it to use the BeforePageDisplay hook. Thanks in advance!

The preferred way to do this is to use the BeforePageDisplay hook as follows:

$isMobileView = ExtensionRegistry::getInstance()->isLoaded( 'MobileFrontend' ) &&
			$services->getService( 'MobileFrontend.Context' )->shouldDisplayMobileView();
if ( $isMobileView ) {
  ..
}

Event Timeline

This is the last remaining instance in production. I am aiming to hard deprecate this by end of June - could this be prioritized with that timeline in mind? Thanks in advance!

Prio Notes:

Impact AreaAffected
production / end usersno
monitoringno
development effortsyes
onboarding effortsno
additional stakeholdersyes
ItamarWMDE renamed this task from Please remove use of BeforePageDisplayMobile hook to [REPO] Please remove use of BeforePageDisplayMobile hook.Thu, May 30, 1:03 PM