jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/403550 )
Change subject: Hygiene: Remove MobileContext::getConfigVariable
..
Hygiene: Remove MobileContext::getConfigVariable
Going forward we will make use of the FeatureManager for these kinds
of checks.
Given the complexity of the shouldShowWikibaseDescriptions method
I've not (yet) removed it, but have wired it up to the feature
management system.
We should also register features that have been promoted to stable
as if they are ever demoted to beta they will not appear in
Special:MobileOptions
Change-Id: I6aa1c66ec131a8db75d6e6128d4e3af78f351af0
---
M i18n/en.json
M i18n/qqq.json
M includes/MobileContext.php
M includes/MobileFrontend.body.php
M includes/MobileFrontend.hooks.php
M includes/ServiceWiring.php
M tests/phpunit/MobileContextTest.php
M tests/phpunit/context/MobileContextWikibaseDescriptionsTest.php
A tests/phpunit/features/FeaturesManagerTest.php
9 files changed, 118 insertions(+), 152 deletions(-)
Approvals:
Pmiazga: Looks good to me, approved
jenkins-bot: Verified
diff --git a/i18n/en.json b/i18n/en.json
index 6f28ee9..ce5af11 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -299,5 +299,13 @@
"mobile-frontend-mobile-option-MFEnableWikidataDescriptions": "Title
descriptions",
"mobile-frontend-mobile-option-MFEnableWikidataDescriptions-description":
"Learn about the subject of the article with a short description below the
title",
"mobile-frontend-mobile-option-MFLazyLoadReferences-description": "Load
article references only when needed",
- "mobile-frontend-send-feedback": "Send feedback"
+ "mobile-frontend-send-feedback": "Send feedback",
+ "mobile-frontend-mobile-option-MFLazyLoadImages-description": "Load
article images only when needed.",
+ "mobile-frontend-mobile-option-MFLazyLoadImages": "Lazy load images",
+ "mobile-frontend-mobile-option-MFShowFirstParagraphBeforeInfobox":
"Lead paragraph",
+
"mobile-frontend-mobile-option-MFShowFirstParagraphBeforeInfobox-description":
"Text will always show above infoboxes, improving performance and readability.",
+ "mobile-frontend-mobile-option-MFExpandAllSectionsUserOption": "Expand
all sections by default",
+
"mobile-frontend-mobile-option-MFExpandAllSectionsUserOption-description":
"Disable section collapsing on mobile web.",
+ "mobile-frontend-mobile-option-MFEnableFontChanger": "Article font
size",
+ "mobile-frontend-mobile-option-MFEnableFontChanger-description":
"Control the font size of your reading experience."
}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 7042381..47addc6 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -300,5 +300,13 @@
"mobile-frontend-mobile-option-MFEnableWikidataDescriptions": "An
identifier for the wikidata descriptions subproject/feature",
"mobile-frontend-mobile-option-MFEnableWikidataDescriptions-description": "A
description of the wikidata description subproject/feature",
"mobile-frontend-mobile-option-MFLazyLoadReferences-description": "A
description of the lazy load references subproject/feature",
- "mobile-frontend-send-feedback": "Link label for sending feedback to
the mobile web beta"
+ "mobile-frontend-send-feedback": "Link label for sending feedback to
the mobile web beta",
+ "mobile-frontend-mobile-option-MFLazyLoadImages-description": "Lazy
load images feature description",
+ "mobile-frontend-mobile-option-MFLazyLoadImages": "Lazy load images
feature name",
+ "mobile-frontend-mobile-option-MFShowFirstParagraphBeforeInfobox":
"Lead paragraph feature name",
+
"mobile-frontend-mobile-option-MFShowFirstParagraphBeforeInfobox-description":
"Lead paragraph feature description",
+ "mobile-frontend-mobile-option-MFExpandAllSectionsUserOption": "Expand
all sections feature name",
+
"mobile-frontend-mobile-option-MFExpandAllSectionsUserOption-description":
"Expand sections feature description",
+ "mobile-frontend-mobile-option-MFEnableFontChanger": "Article font size
feature name",
+ "mobile-frontend-mobile-option-MFEnableFontChanger-description": "Font
size feature description"
}
diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index 1da8860..84a6b30 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -141,90 +141,6 @@
}
/**
-* Gets the value of a config variable whose value depends on whether
the
-* user is a member of the beta group.
-*
-* @warning If the value of the config variable doesn't behave this
way, then
-* `null` is returned.
-*
-* @example
-* ```
-* $wgFoo = [
-* 'beta' => 'bar',
-* 'base' => 'baz',
-* ];
-* $wgQux = 'quux';
-* $wgCorge = [
-