Bmansurov has uploaded a new change for review.

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

Change subject: Remove ReadMore from desktop beta
......................................................................

Remove ReadMore from desktop beta

The engagement is low.

Bug: T126826
Change-Id: I1d2477f04482478a25c150229803f38f29940555
---
M extension.json
M i18n/en.json
M i18n/qqq.json
D images/BetaFeatures/wb-readmore-beta-ltr.svg
D images/BetaFeatures/wb-readmore-beta-rtl.svg
M includes/FooterHooks.php
M includes/SidebarHooks.php
M resources/ext.relatedArticles.readMore.bootstrap/index.js
M resources/ext.relatedArticles.readMore/eventLogging.js
M resources/ext.relatedArticles.readMore/readMore.less
M tests/browser/environments.yml
M tests/browser/features/read_more.feature
D tests/browser/features/support/pages/special_preferences_page.rb
M tests/browser/features/support/step_definitions/common_steps.rb
14 files changed, 14 insertions(+), 253 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RelatedArticles 
refs/changes/49/270949/1

diff --git a/extension.json b/extension.json
index afe8d9b..b9d3b31 100644
--- a/extension.json
+++ b/extension.json
@@ -10,7 +10,6 @@
        "url": "https://www.mediawiki.org/wiki/Extension:RelatedArticles";,
        "descriptionmsg": "relatedarticles-desc",
        "license-name": "GPL-2.0",
-       "type": "betafeatures",
        "AutoloadClasses": {
                "RelatedArticles\\Hooks": "includes/Hooks.php",
                "RelatedArticles\\SidebarHooks": "includes/SidebarHooks.php",
@@ -43,10 +42,6 @@
                "SkinTemplateToolboxEnd": [
                        
"RelatedArticles\\SidebarHooks::onSkinTemplateToolboxEnd"
                ],
-
-               "GetBetaFeaturePreferences": [
-                       
"RelatedArticles\\FooterHooks::onGetBetaFeaturePreferences"
-               ],
                "MakeGlobalVariablesScript": [
                        
"RelatedArticles\\FooterHooks::onMakeGlobalVariablesScript"
                ],
@@ -78,8 +73,7 @@
                                "oojs"
                        ],
                        "targets": [
-                               "mobile",
-                               "desktop"
+                               "mobile"
                        ]
                },
                "ext.relatedArticles.readMore.bootstrap": {
@@ -93,8 +87,7 @@
                                "jquery.throttle-debounce"
                        ],
                        "targets": [
-                               "mobile",
-                               "desktop"
+                               "mobile"
                        ]
                }
        },
diff --git a/i18n/en.json b/i18n/en.json
index 35b1bab..8241dbc 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -4,7 +4,5 @@
        },
        "relatedarticles-title": "Related pages",
        "relatedarticles-desc": "Adds a link to related pages on the sidebar or 
in the footer, if the user enables the beta feature.",
-       "relatedarticles-read-more-heading": "Related Pages",
-       "relatedarticles-read-more-beta-feature-title": "Related pages",
-       "relatedarticles-read-more-beta-feature-description": "Suggests related 
pages at the bottom of a page."
+       "relatedarticles-read-more-heading": "Related Pages"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 5d65f67..9c37aeb 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -9,7 +9,5 @@
        },
        "relatedarticles-title": "Title shown on the sidebar",
        "relatedarticles-desc": "{{desc|name=Related 
Articles|url=https://www.mediawiki.org/wiki/Extension:RelatedArticles}}";,
-       "relatedarticles-read-more-heading": "The heading of section, added at 
the end of the page, that lists the related pages",
-       "relatedarticles-read-more-beta-feature-title": "Title of the related 
pages feature in 
Special:Preferences#mw-prefsection-betafeatures.\n{{Identical|Read more}}",
-       "relatedarticles-read-more-beta-feature-description": "Description of 
the related pages feature in Special:Preferences#mw-prefsection-betafeatures"
+       "relatedarticles-read-more-heading": "The heading of section, added at 
the end of the page, that lists the related pages"
 }
diff --git a/images/BetaFeatures/wb-readmore-beta-ltr.svg 
b/images/BetaFeatures/wb-readmore-beta-ltr.svg
deleted file mode 100644
index 00b2a41..0000000
--- a/images/BetaFeatures/wb-readmore-beta-ltr.svg
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg width="264px" height="162px" viewBox="0 0 264 162" version="1.1" 
xmlns="http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns";>
-    <!-- Generator: Sketch 3.4 (15575) - http://www.bohemiancoding.com/sketch 
-->
-    <title>wb-otherprojects-beta-ltr</title>
-    <desc>Created with Sketch.</desc>
-    <defs></defs>
-    <g id="Page-1" stroke="none" stroke-width="1" fill="none" 
fill-rule="evenodd" sketch:type="MSPage">
-        <g id="Group" sketch:type="MSLayerGroup">
-            <g id="Shape" sketch:type="MSShapeGroup">
-                <path d="M24.833,151.362 L13.366,161.357 L0.5,151.749 L0.5,0.5 
L263.5,0.5 L263.5,152.249 L254.5,158.954 L254.5,42.5 L215.5,42.5 L215.5,155.1 
L211.107,151.369 L203.5,156.699 L203.5,42.5 L48.5,42.5 L48.5,153.349 
L38.749,161.38 L24.833,151.362 L24.833,151.362 Z" fill="#FFFFFF"></path>
-                <path d="M263,1 L263,151.998 L255,157.958 L255,43 L255,42 
L254,42 L216,42 L215,42 L215,43 L215,154.019 L211.726,151.24 L211.137,150.741 
L210.504,151.181 L204,155.738 L204,43 L204,42 L203,42 L49,42 L48,42 L48,43 
L48,153.099 L38.743,160.76 L25.448,151.191 L24.804,150.726 L24.206,151.247 
L13.342,160.717 L1,151.499 L1,1 L263,1 L263,1 L263,1 Z M264,0 L0,0 L0,152 
L13.391,162 L24.864,152 L38.755,162 L49,153.6 L49,43 L203,43 L203,157.66 
L211.078,152 L216,156.18 L216,43 L254,43 L254,159.95 L264,152.5 L264,0 L264,0 
L264,0 L264,0 L264,0 Z" fill="#E5E5E5"></path>
-            </g>
-            <path d="M203,157.66 L203,43 L49,43 L49,153.6 L51.145,152 
L63.7,162 L77.509,152 L91.738,162 L104.71,152 L117.683,162 L131.494,152 
L143.63,162 L157.021,152 L171.25,162 L184.222,152 L197.196,162 L203,157.66 
L203,157.66 L203,157.66 L203,157.66 L203,157.66 Z" id="Shape" fill="#E5E5E5" 
sketch:type="MSShapeGroup"></path>
-            <path d="M11,36 C11,28.268 17.268,22 25,22 C32.732,22 39,28.268 
39,36 C39,43.732 32.732,50 25,50 C17.268,50 11,43.732 11,36 C11,36 11,43.732 
11,36 L11,36 L11,36 L11,36 Z" id="Shape" fill="#E5E5E5" 
sketch:type="MSShapeGroup"></path>
-            <path d="M254,159.95 L254,43 L216,43 L216,156.18 L223.551,162 
L237.362,152 L251.253,162 L254,159.95 L254,159.95 L254,159.95 L254,159.95 
L254,159.95 Z" id="Shape" fill="#E5E5E5" sketch:type="MSShapeGroup"></path>
-            <path d="M38,132 L38,72 L13,72 L13,132 L38,132 L38,132 L38,132 
L38,132 L38,132 Z" id="Shape" fill="#E5E5E5" sketch:type="MSShapeGroup"></path>
-            <path d="M233,5 L259,5 L259,11 L233,11 L233,5 L233,5 L233,5 L233,5 
L233,5 Z" id="Shape" fill="#E5E5E5" sketch:type="MSShapeGroup"></path>
-            <path d="M142,6 L142,10 L50,10 L50,6 L142,6 L142,6 L142,6 Z M143,5 
L49,5 L49,11 L143,11 L143,5 L143,5 L143,5 L143,5 L143,5 Z" id="Shape" 
fill="#E5E5E5" sketch:type="MSShapeGroup"></path>
-            <rect id="Rectangle-path" fill="#E5E5E5" 
sketch:type="MSShapeGroup" x="9" y="5" width="32" height="6"></rect>
-            <path d="M2,15 L262,15" id="Shape" stroke="#E5E5E5" fill="#E5E5E5" 
sketch:type="MSShapeGroup"></path>
-            <rect id="Rectangle-path" fill="#E5E5E5" 
sketch:type="MSShapeGroup" x="52" y="7" width="2" height="2"></rect>
-            <path d="M38,59 L38,54 L13,54 L13,59 L38,59 L38,59 L38,59 L38,59 
L38,59 Z" id="Shape" fill="#E5E5E5" sketch:type="MSShapeGroup"></path>
-            <path d="M228.51,5 L228.51,11 L216,11 L216,5 L228.51,5 L228.51,5 
Z" id="Shape" fill="#D8D8D8" sketch:type="MSShapeGroup"></path>
-            <path d="M212.51,5 L212.51,11 L200,11 L200,5 L212.51,5 L212.51,5 
Z" id="Shape" fill="#D8D8D8" sketch:type="MSShapeGroup"></path>
-            <path d="M196.51,5 L196.51,11 L184,11 L184,5 L196.51,5 L196.51,5 
Z" id="Shape" fill="#D8D8D8" sketch:type="MSShapeGroup"></path>
-        </g>
-        <g id="read-more-cards" sketch:type="MSLayerGroup" 
transform="translate(55.000000, 127.000000)">
-            <g id="card" sketch:type="MSShapeGroup">
-                <rect id="Rectangle-7" fill="#347BFF" x="0" y="0" width="43" 
height="13"></rect>
-                <rect id="Rectangle-4" fill="#72A3FF" x="2" y="2" width="8" 
height="9"></rect>
-                <rect id="Rectangle-5" fill="#72A4FF" x="12" y="2" width="27" 
height="3"></rect>
-                <rect id="Rectangle-5-Copy" fill="#72A4FF" x="12" y="7" 
width="14" height="3"></rect>
-            </g>
-            <g id="card-copy" transform="translate(48.000000, 0.000000)" 
sketch:type="MSShapeGroup">
-                <rect id="Rectangle-7" fill="#347BFF" x="0" y="0" width="43" 
height="13"></rect>
-                <rect id="Rectangle-4" fill="#72A3FF" x="2" y="2" width="8" 
height="9"></rect>
-                <rect id="Rectangle-5" fill="#72A4FF" x="12" y="2" width="27" 
height="3"></rect>
-                <rect id="Rectangle-5-Copy" fill="#72A4FF" x="12" y="7" 
width="14" height="3"></rect>
-            </g>
-            <g id="card-copy-2" transform="translate(97.000000, 0.000000)" 
sketch:type="MSShapeGroup">
-                <rect id="Rectangle-7" fill="#347BFF" x="0" y="0" width="43" 
height="13"></rect>
-                <rect id="Rectangle-4" fill="#72A3FF" x="2" y="2" width="8" 
height="9"></rect>
-                <rect id="Rectangle-5" fill="#72A4FF" x="11" y="2" width="28" 
height="3"></rect>
-                <rect id="Rectangle-5-Copy" fill="#72A4FF" x="11" y="7" 
width="14" height="3"></rect>
-            </g>
-        </g>
-        <rect id="title" fill="#D8D8D8" sketch:type="MSShapeGroup" x="56" 
y="52" width="45" height="7"></rect>
-        <g id="para" sketch:type="MSLayerGroup" 
transform="translate(56.000000, 64.000000)" fill="#D8D8D8">
-            <rect id="Rectangle-15-Copy" sketch:type="MSShapeGroup" x="0" 
y="0" width="140" height="3"></rect>
-            <rect id="Rectangle-15-Copy-2" sketch:type="MSShapeGroup" x="0" 
y="7" width="140" height="3"></rect>
-            <rect id="Rectangle-15-Copy-3" sketch:type="MSShapeGroup" x="0" 
y="14" width="140" height="3"></rect>
-            <rect id="Rectangle-15-Copy-4" sketch:type="MSShapeGroup" x="0" 
y="21" width="66" height="3"></rect>
-        </g>
-        <g id="para" sketch:type="MSLayerGroup" 
transform="translate(56.000000, 93.000000)" fill="#D8D8D8">
-            <rect id="Rectangle-15-Copy" sketch:type="MSShapeGroup" x="0" 
y="0" width="140" height="3"></rect>
-            <rect id="Rectangle-15-Copy-2" sketch:type="MSShapeGroup" x="0" 
y="7" width="140" height="3"></rect>
-            <rect id="Rectangle-15-Copy-3" sketch:type="MSShapeGroup" x="0" 
y="14" width="140" height="3"></rect>
-            <rect id="Rectangle-15-Copy-4" sketch:type="MSShapeGroup" x="0" 
y="21" width="36" height="3"></rect>
-        </g>
-    </g>
-</svg>
\ No newline at end of file
diff --git a/images/BetaFeatures/wb-readmore-beta-rtl.svg 
b/images/BetaFeatures/wb-readmore-beta-rtl.svg
deleted file mode 100644
index d61cdf0..0000000
--- a/images/BetaFeatures/wb-readmore-beta-rtl.svg
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg width="264px" height="162px" viewBox="0 0 264 162" version="1.1" 
xmlns="http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns";>
-    <!-- Generator: Sketch 3.4 (15575) - http://www.bohemiancoding.com/sketch 
-->
-    <title>wb-otherprojects-beta-ltr</title>
-    <desc>Created with Sketch.</desc>
-    <defs></defs>
-    <g id="Page-1" stroke="none" stroke-width="1" fill="none" 
fill-rule="evenodd" sketch:type="MSPage">
-        <g id="Group" sketch:type="MSLayerGroup" 
transform="translate(132.000000, 81.000000) scale(-1, 1) translate(-132.000000, 
-81.000000) ">
-            <g id="Shape" sketch:type="MSShapeGroup">
-                <path d="M24.833,151.362 L13.366,161.357 L0.5,151.749 L0.5,0.5 
L263.5,0.5 L263.5,152.249 L254.5,158.954 L254.5,42.5 L215.5,42.5 L215.5,155.1 
L211.107,151.369 L203.5,156.699 L203.5,42.5 L48.5,42.5 L48.5,153.349 
L38.749,161.38 L24.833,151.362 L24.833,151.362 Z" fill="#FFFFFF"></path>
-                <path d="M263,1 L263,151.998 L255,157.958 L255,43 L255,42 
L254,42 L216,42 L215,42 L215,43 L215,154.019 L211.726,151.24 L211.137,150.741 
L210.504,151.181 L204,155.738 L204,43 L204,42 L203,42 L49,42 L48,42 L48,43 
L48,153.099 L38.743,160.76 L25.448,151.191 L24.804,150.726 L24.206,151.247 
L13.342,160.717 L1,151.499 L1,1 L263,1 L263,1 L263,1 Z M264,0 L0,0 L0,152 
L13.391,162 L24.864,152 L38.755,162 L49,153.6 L49,43 L203,43 L203,157.66 
L211.078,152 L216,156.18 L216,43 L254,43 L254,159.95 L264,152.5 L264,0 L264,0 
L264,0 L264,0 L264,0 Z" fill="#E5E5E5"></path>
-            </g>
-            <path d="M203,157.66 L203,43 L49,43 L49,153.6 L51.145,152 
L63.7,162 L77.509,152 L91.738,162 L104.71,152 L117.683,162 L131.494,152 
L143.63,162 L157.021,152 L171.25,162 L184.222,152 L197.196,162 L203,157.66 
L203,157.66 L203,157.66 L203,157.66 L203,157.66 Z" id="Shape" fill="#E5E5E5" 
sketch:type="MSShapeGroup"></path>
-            <path d="M11,36 C11,28.268 17.268,22 25,22 C32.732,22 39,28.268 
39,36 C39,43.732 32.732,50 25,50 C17.268,50 11,43.732 11,36 C11,36 11,43.732 
11,36 L11,36 L11,36 L11,36 Z" id="Shape" fill="#E5E5E5" 
sketch:type="MSShapeGroup"></path>
-            <path d="M254,159.95 L254,43 L216,43 L216,156.18 L223.551,162 
L237.362,152 L251.253,162 L254,159.95 L254,159.95 L254,159.95 L254,159.95 
L254,159.95 Z" id="Shape" fill="#E5E5E5" sketch:type="MSShapeGroup"></path>
-            <path d="M38,132 L38,72 L13,72 L13,132 L38,132 L38,132 L38,132 
L38,132 L38,132 Z" id="Shape" fill="#E5E5E5" sketch:type="MSShapeGroup"></path>
-            <path d="M233,5 L259,5 L259,11 L233,11 L233,5 L233,5 L233,5 L233,5 
L233,5 Z" id="Shape" fill="#E5E5E5" sketch:type="MSShapeGroup"></path>
-            <path d="M142,6 L142,10 L50,10 L50,6 L142,6 L142,6 L142,6 Z M143,5 
L49,5 L49,11 L143,11 L143,5 L143,5 L143,5 L143,5 L143,5 Z" id="Shape" 
fill="#E5E5E5" sketch:type="MSShapeGroup"></path>
-            <rect id="Rectangle-path" fill="#E5E5E5" 
sketch:type="MSShapeGroup" x="9" y="5" width="32" height="6"></rect>
-            <path d="M2,15 L262,15" id="Shape" stroke="#E5E5E5" fill="#E5E5E5" 
sketch:type="MSShapeGroup"></path>
-            <rect id="Rectangle-path" fill="#E5E5E5" 
sketch:type="MSShapeGroup" x="52" y="7" width="2" height="2"></rect>
-            <path d="M38,59 L38,54 L13,54 L13,59 L38,59 L38,59 L38,59 L38,59 
L38,59 Z" id="Shape" fill="#E5E5E5" sketch:type="MSShapeGroup"></path>
-            <path d="M228.51,5 L228.51,11 L216,11 L216,5 L228.51,5 L228.51,5 
Z" id="Shape" fill="#D8D8D8" sketch:type="MSShapeGroup"></path>
-            <path d="M212.51,5 L212.51,11 L200,11 L200,5 L212.51,5 L212.51,5 
Z" id="Shape" fill="#D8D8D8" sketch:type="MSShapeGroup"></path>
-            <path d="M196.51,5 L196.51,11 L184,11 L184,5 L196.51,5 L196.51,5 
Z" id="Shape" fill="#D8D8D8" sketch:type="MSShapeGroup"></path>
-        </g>
-        <g id="Group" sketch:type="MSLayerGroup" 
transform="translate(138.500000, 96.000000) scale(-1, 1) translate(-138.500000, 
-96.000000) translate(68.000000, 52.000000)">
-            <g id="read-more-cards" transform="translate(0.000000, 75.000000)" 
sketch:type="MSShapeGroup">
-                <g id="card">
-                    <rect id="Rectangle-7" fill="#347BFF" x="0" y="0" 
width="43" height="13"></rect>
-                    <rect id="Rectangle-4" fill="#72A3FF" x="2" y="2" 
width="8" height="9"></rect>
-                    <rect id="Rectangle-5" fill="#72A4FF" x="12" y="2" 
width="27" height="3"></rect>
-                    <rect id="Rectangle-5-Copy" fill="#72A4FF" x="12" y="7" 
width="14" height="3"></rect>
-                </g>
-                <g id="card-copy" transform="translate(48.000000, 0.000000)">
-                    <rect id="Rectangle-7" fill="#347BFF" x="0" y="0" 
width="43" height="13"></rect>
-                    <rect id="Rectangle-4" fill="#72A3FF" x="2" y="2" 
width="8" height="9"></rect>
-                    <rect id="Rectangle-5" fill="#72A4FF" x="12" y="2" 
width="27" height="3"></rect>
-                    <rect id="Rectangle-5-Copy" fill="#72A4FF" x="12" y="7" 
width="14" height="3"></rect>
-                </g>
-                <g id="card-copy-2" transform="translate(97.000000, 0.000000)">
-                    <rect id="Rectangle-7" fill="#347BFF" x="0" y="0" 
width="43" height="13"></rect>
-                    <rect id="Rectangle-4" fill="#72A3FF" x="2" y="2" 
width="8" height="9"></rect>
-                    <rect id="Rectangle-5" fill="#72A4FF" x="11" y="2" 
width="28" height="3"></rect>
-                    <rect id="Rectangle-5-Copy" fill="#72A4FF" x="11" y="7" 
width="14" height="3"></rect>
-                </g>
-            </g>
-            <rect id="title" fill="#D8D8D8" sketch:type="MSShapeGroup" x="1" 
y="0" width="45" height="7"></rect>
-            <g id="para" transform="translate(1.000000, 12.000000)" 
fill="#D8D8D8" sketch:type="MSShapeGroup">
-                <rect id="Rectangle-15-Copy" x="0" y="0" width="140" 
height="3"></rect>
-                <rect id="Rectangle-15-Copy-2" x="0" y="7" width="140" 
height="3"></rect>
-                <rect id="Rectangle-15-Copy-3" x="0" y="14" width="140" 
height="3"></rect>
-                <rect id="Rectangle-15-Copy-4" x="0" y="21" width="66" 
height="3"></rect>
-            </g>
-            <g id="para" transform="translate(1.000000, 41.000000)" 
fill="#D8D8D8" sketch:type="MSShapeGroup">
-                <rect id="Rectangle-15-Copy" x="0" y="0" width="140" 
height="3"></rect>
-                <rect id="Rectangle-15-Copy-2" x="0" y="7" width="140" 
height="3"></rect>
-                <rect id="Rectangle-15-Copy-3" x="0" y="14" width="140" 
height="3"></rect>
-                <rect id="Rectangle-15-Copy-4" x="0" y="21" width="36" 
height="3"></rect>
-            </g>
-        </g>
-    </g>
-</svg>
\ No newline at end of file
diff --git a/includes/FooterHooks.php b/includes/FooterHooks.php
index e0d7650..ab425e6 100644
--- a/includes/FooterHooks.php
+++ b/includes/FooterHooks.php
@@ -2,12 +2,10 @@
 
 namespace RelatedArticles;
 
-use BetaFeatures;
 use OutputPage;
 use ResourceLoader;
 use Skin;
 use ConfigFactory;
-use User;
 
 class FooterHooks {
 
@@ -43,7 +41,6 @@
         *   <li><code>$wgRelatedArticlesShowInFooter</code> is truthy</li>
         *   <li>On mobile, the output is being rendered with
         *     <code>SkinMinervaBeta<code></li>
-        *   <li>On desktop, the beta feature has been enabled</li>
         *   <li>The page is in mainspace</li>
         * </ol>
         *
@@ -60,17 +57,10 @@
                if (
                        $showReadMore &&
                        $title->inNamespace( NS_MAIN ) &&
-                       !$title->isMainPage()
+                       !$title->isMainPage() &&
+                       get_class( $skin ) === 'SkinMinervaBeta'
                ) {
-                       if (
-                               get_class( $skin ) === 'SkinMinervaBeta' ||
-                               (
-                                       class_exists( 'BetaFeatures' ) &&
-                                       BetaFeatures::isFeatureEnabled( 
$out->getUser(), 'read-more' )
-                               )
-                       ) {
-                               $out->addModules( array( 
'ext.relatedArticles.readMore.bootstrap' ) );
-                       }
+                       $out->addModules( array( 
'ext.relatedArticles.readMore.bootstrap' ) );
                }
 
                return true;
@@ -146,7 +136,6 @@
                                        "relatedarticles-read-more-heading"
                                ),
                                "targets" => array(
-                                       "desktop",
                                        "mobile"
                                ),
                                "localBasePath" => __DIR__ . "/..",
@@ -156,39 +145,4 @@
 
                return true;
        }
-
-       /**
-        * GetBetaFeaturePreferences hook handler
-        * The beta feature is for showing ReadMore, not for showing related
-        * articles in the sidebar.
-        * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/GetBetaFeaturePreferences
-        *
-        * @param User $user
-        * @param array $preferences
-        *
-        * @return bool
-        */
-       public static function onGetBetaFeaturePreferences( User $user, array 
&$preferences ) {
-               $config = ConfigFactory::getDefaultInstance()->makeConfig( 
'RelatedArticles' );
-               $showReadMore = $config->get( 'RelatedArticlesShowInFooter' );
-
-               if ( $showReadMore ) {
-                       $wgExtensionAssetsPath = $config->get( 
'ExtensionAssetsPath' );
-
-                       $preferences['read-more'] = array(
-                               'label-message' => 
'relatedarticles-read-more-beta-feature-title',
-                               'desc-message' => 
'relatedarticles-read-more-beta-feature-description',
-                               'screenshot' => array(
-                                       'ltr' => 
"$wgExtensionAssetsPath/RelatedArticles/images/BetaFeatures/wb-readmore-beta-ltr.svg",
-                                       'rtl' => 
"$wgExtensionAssetsPath/RelatedArticles/images/BetaFeatures/wb-readmore-beta-rtl.svg",
-                               ),
-                               'info-link' => 
'https://www.mediawiki.org/wiki/Reading/Web/Projects/Read_more',
-                               'discussion-link' => 
'https://www.mediawiki.org/wiki/Talk:Reading/Web/Projects/Read_more',
-                       );
-
-               }
-
-               return true;
-       }
-
 }
diff --git a/includes/SidebarHooks.php b/includes/SidebarHooks.php
index 5bdd938..965ac39 100644
--- a/includes/SidebarHooks.php
+++ b/includes/SidebarHooks.php
@@ -16,8 +16,7 @@
         * Handler for the <code>SkinBuildSidebar</code> hook.
         *
         * Retrieves the list of related pages
-        * and adds its HTML representation to the sidebar if the ReadMore 
feature
-        * is disabled and the beta feature is enabled by the user.
+        * and adds its HTML representation to the sidebar.
         *
         * @param Skin $skin
         * @param array $bar
@@ -57,8 +56,7 @@
         * Handler for the <code>SkinTemplateToolboxEnd</code> hook.
         *
         * Retrieves the list of related pages from the template and
-        * <code>echo</code>s its HTML representation to the sidebar if the
-        * ReadMore feature is disabled and the beta feature is enabled by the 
user.
+        * <code>echo</code>s its HTML representation to the sidebar.
         *
         * @param SkinTemplate $skinTpl
         * @return boolean Always <code>true</code>
@@ -145,9 +143,7 @@
        }
 
        /**
-        * Check whether there are related articles that can be displayed, or
-        * the ReadMore feature is disabled. The beta feature is used only
-        * for enabling ReadMore, so do not take it into account.
+        * Check whether there are related articles that can be displayed.
         *
         * @param mixed $relatedPages
         * @param User $user
diff --git a/resources/ext.relatedArticles.readMore.bootstrap/index.js 
b/resources/ext.relatedArticles.readMore.bootstrap/index.js
index 5ef471b..39bdcdd 100644
--- a/resources/ext.relatedArticles.readMore.bootstrap/index.js
+++ b/resources/ext.relatedArticles.readMore.bootstrap/index.js
@@ -65,8 +65,8 @@
                // T120735
                config.wgAction === 'view' &&
                !isDiffPage() &&
-               // any skin except minerva stable
-               ( config.skin !== 'minerva' || config.wgMFMode === 'beta' )
+               // minerva beta only
+               config.wgMFMode === 'beta'
        ) {
                // try related articles load on scroll
                $window.on( 'scroll', debouncedLoad );
diff --git a/resources/ext.relatedArticles.readMore/eventLogging.js 
b/resources/ext.relatedArticles.readMore/eventLogging.js
index 33a4c8e..4312fdd 100644
--- a/resources/ext.relatedArticles.readMore/eventLogging.js
+++ b/resources/ext.relatedArticles.readMore/eventLogging.js
@@ -45,7 +45,8 @@
                        mw.config.get( 'wgRelatedArticlesLoggingSamplingRate', 
0 ),
                        {
                                pageId: mw.config.get( 'wgArticleId' ),
-                               skin: ( skin === 'minerva' ) ? skin + '-' +  
mw.config.get( 'wgMFMode' ) : skin,
+                               // The skin is always minerva
+                               skin: skin + '-' +  mw.config.get( 'wgMFMode' ),
                                // We cannot depend on the uniqueness of 
mw.user.generateRandomSessionId(),
                                // thus append the timestamp. See mw.user 
documentation for more info.
                                userSessionToken: 
mw.user.generateRandomSessionId() +
diff --git a/resources/ext.relatedArticles.readMore/readMore.less 
b/resources/ext.relatedArticles.readMore/readMore.less
index d07d0f6..ad28e27 100644
--- a/resources/ext.relatedArticles.readMore/readMore.less
+++ b/resources/ext.relatedArticles.readMore/readMore.less
@@ -1,12 +1,5 @@
 @import "mediawiki.ui/variables";
 
-// Hide RelatedArticles when VE is activated 
(https://phabricator.wikimedia.org/T120443)
-.ve-activated {
-       .ra-read-more {
-               display: none;
-       }
-}
-
 .ra-read-more {
        margin-top: 35px;
        margin-bottom: 70px;
@@ -26,13 +19,3 @@
        }
 }
 
-body.skin-vector {
-       .ra-read-more {
-               margin: 0 0 0 10em;
-               padding: 1em;
-
-               .ext-cards-card-list {
-                       margin-left: 0;
-               }
-       }
-}
diff --git a/tests/browser/environments.yml b/tests/browser/environments.yml
index 12e5722..1ea7887 100644
--- a/tests/browser/environments.yml
+++ b/tests/browser/environments.yml
@@ -27,11 +27,6 @@
   mediawiki_url: http://127.0.0.1/wiki/
   user_factory: true
 
-beta_desktop:
-  mediawiki_url: http://en.wikipedia.beta.wmflabs.org/wiki/
-  mediawiki_user: Selenium_user
-  # mediawiki_password: SET THIS IN THE ENVIRONMENT!
-
 beta_mobile:
   mediawiki_url: http://en.m.wikipedia.beta.wmflabs.org/wiki/
   mediawiki_user: Selenium_user
diff --git a/tests/browser/features/read_more.feature 
b/tests/browser/features/read_more.feature
index 71cb74d..21cc3c5 100644
--- a/tests/browser/features/read_more.feature
+++ b/tests/browser/features/read_more.feature
@@ -18,17 +18,3 @@
       And page has fully loaded with ReadMore code
     Then I must see ReadMore
       And ReadMore must have three cards
-
-  @en.m.wikipedia.beta.wmflabs.org
-  Scenario: ReadMore is not present when disabled as a BetaFeature
-    Given I am on the "Related Articles 1" page
-      And page has fully loaded without ReadMore code
-    Then I must not see ReadMore
-
-  @en.wikipedia.beta.wmflabs.org @extension-betafeatures
-  Scenario: ReadMore is present when enabled as a BetaFeature
-    Given I am logged in
-      And ReadMore is enabled as a beta feature
-      And I am on the "Related Articles 1" page
-      And page has fully loaded with ReadMore code
-    Then I must see ReadMore
diff --git a/tests/browser/features/support/pages/special_preferences_page.rb 
b/tests/browser/features/support/pages/special_preferences_page.rb
deleted file mode 100644
index 36b441d..0000000
--- a/tests/browser/features/support/pages/special_preferences_page.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-class SpecialPreferencesPage
-  include PageObject
-  page_url 'Special:Preferences'
-
-  a(:beta_features_tab, css: '#preftab-betafeatures')
-  text_field(:read_more_checkbox, css: '#mw-input-wpread-more')
-  button(:submit_button, css: '#prefcontrol')
-
-  def enable_read_more
-    beta_features_tab_element.when_present.click
-    return unless read_more_checkbox_element.attribute('checked').nil?
-    read_more_checkbox_element.click
-    submit_button_element.when_present.click
-  end
-end
diff --git a/tests/browser/features/support/step_definitions/common_steps.rb 
b/tests/browser/features/support/step_definitions/common_steps.rb
index c05be93..2914b46 100644
--- a/tests/browser/features/support/step_definitions/common_steps.rb
+++ b/tests/browser/features/support/step_definitions/common_steps.rb
@@ -62,10 +62,6 @@
   end
 end
 
-Then(/^ReadMore is enabled as a beta feature$/) do
-  visit(SpecialPreferencesPage).enable_read_more
-end
-
 Then(/^I must see ReadMore$/) do
   expect(on(ArticlePage).read_more_element.when_present).to be_visible
 end

-- 
To view, visit https://gerrit.wikimedia.org/r/270949
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d2477f04482478a25c150229803f38f29940555
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RelatedArticles
Gerrit-Branch: master
Gerrit-Owner: Bmansurov <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to