Kaldari has uploaded a new change for review.

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

Change subject: Disable WikiGrok on tablets for now
......................................................................

Disable WikiGrok on tablets for now

WikiGrok has layout issues with long infoboxes.

Also add clear:both to WikiGrok dialog to make sure no other elements
overlap it.

Change-Id: Ia46dea05b3a53da4aa923af1711015d584f29460
---
M javascripts/modules/wikigrok/wikigrok.js
M less/modules/wikigrok/WikiGrokDialog.less
2 files changed, 12 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/77/160877/1

diff --git a/javascripts/modules/wikigrok/wikigrok.js 
b/javascripts/modules/wikigrok/wikigrok.js
index d03de6f..95f4b71 100644
--- a/javascripts/modules/wikigrok/wikigrok.js
+++ b/javascripts/modules/wikigrok/wikigrok.js
@@ -15,15 +15,22 @@
        // Only run in alpha mode
        M.assertMode( [ 'alpha' ] );
 
-       // Only load if WikiGrok is enabled, Wikibase is active, we're not on 
the Main Page,
-       // we're in 'view' mode, we're in Main namespace, the browser supports 
localStorage,
-       // and the user has not opted out of WikiGrok previously.
-       if ( mw.config.get( 'wgMFEnableWikiGrok' ) &&
+       if (
+               // WikiGrok is enabled
+               mw.config.get( 'wgMFEnableWikiGrok' ) &&
+               // User is logged in
                !mw.user.isAnon() &&
+               // We're not on the Main Page
                !mw.config.get( 'wgIsMainPage' ) &&
+               // We're not on a tablet
+               !M.isWideScreen() &&
+               // We're in 'view' mode
                mw.config.get( 'wgAction' ) === 'view' &&
+               // Wikibase is active and this page has an item ID
                wikidataID &&
+               // We're in Main namespace,
                mw.config.get( 'wgNamespaceNumber' ) === 0 &&
+               // The user has not opted out of WikiGrok previously
                M.supportsLocalStorage &&
                !localStorage.getItem( 'mfHideWikiGrok' )
        ) {
diff --git a/less/modules/wikigrok/WikiGrokDialog.less 
b/less/modules/wikigrok/WikiGrokDialog.less
index b04df47..237232e 100644
--- a/less/modules/wikigrok/WikiGrokDialog.less
+++ b/less/modules/wikigrok/WikiGrokDialog.less
@@ -2,6 +2,7 @@
 @import "minerva.variables";
 
 .wikigrok {
+       clear: both;
        margin-top: 1em;
        text-align: center;
        padding: 1em @contentMargin;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia46dea05b3a53da4aa923af1711015d584f29460
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Kaldari <rkald...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to