{{{headinghtml}}}

diff --git a/resources/skins.minerva.base.styles/footer.less b/resources/skins.minerva.base.styles/footer.less index 51563b0..13cb80d 100644 --- a/resources/skins.minerva.base.styles/footer.less +++ b/resources/skins.minerva.base.styles/footer.less @@ -1,11 +1,15 @@ @import 'minerva.variables'; @import 'minerva.mixins'; -footer { +// style that applies only to minerva footer +.minerva-footer { border-top: solid 1px @footerBorderColor; overflow: auto; padding-bottom: 6px; +} +// styles that apply to nested footer components +footer { // links should be separated by same color .hlist { li:after { From 152465abd37a66a983707917c128eacab42d96c3 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Tue, 30 Jan 2018 21:58:47 +0100 Subject: [PATCH 14/18] Localisation updates from https://translatewiki.net. Change-Id: Ia33416537abd6ef2f4adadeb7861c9c48c6f5dec --- i18n/csb.json | 1 + 1 file changed, 1 insertion(+) diff --git a/i18n/csb.json b/i18n/csb.json index b127425..d84bcb1 100644 --- a/i18n/csb.json +++ b/i18n/csb.json @@ -13,6 +13,7 @@ "mobile-frontend-home-button": "Przédnô", "mobile-frontend-language-article-heading": "Przeczëtôj w jinszim jãzëkù", "mobile-frontend-language-change": "Zmieni jãzëk", + "mobile-frontend-languages-not-available": "Na starna nie je dostãpnô w jinëch jãzëkach.", "mobile-frontend-main-menu-button-tooltip": "Òtemkni przédné menu", "mobile-frontend-main-menu-contributions": "Mój wkłôd", "mobile-frontend-main-menu-login": "Wlogùjë mie", From 4f6e9e69e19946abfd93b5730604bd86a2453e53 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Wed, 24 Jan 2018 10:52:20 -0800 Subject: [PATCH 15/18] Preferences tabs should be horizontally scrollable Change-Id: I6766b4ef5a99c66ebb54079b07739315294c86a7 --- .../mediawiki.special.preferences.styles/styles.less | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/skinStyles/mediawiki.special.preferences.styles/styles.less b/skinStyles/mediawiki.special.preferences.styles/styles.less index 7e5599b..0883264 100644 --- a/skinStyles/mediawiki.special.preferences.styles/styles.less +++ b/skinStyles/mediawiki.special.preferences.styles/styles.less @@ -2,7 +2,12 @@ // FIXME: All this code can be removed when T117781/T171238 is resolved. #preftoc { - text-align: center; + text-align: left; + // Horizontal scrolling + overflow-x: auto; + overflow-y: hidden; + white-space: nowrap; + padding: 0; li { display: inline-block; @@ -39,6 +44,11 @@ } } +// redudant on mobile - tab labels provide context +.mainLegend { + display: none; +} + .mw-htmlform-submit-buttons, .mw-input { select, From 20f69d0b4900a299f69d835e7bd82fe2fe0eeee1 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Mon, 29 Jan 2018 12:52:31 -0800 Subject: [PATCH 16/18] Do not add non-existent skins.minerva.special.preferences.scripts This module does not exist. Don't pretend it does and add it. Bug: T185934 Change-Id: Iefef261fdac2c513e5ee278e94574026601f76f9 --- includes/Minerva.hooks.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/includes/Minerva.hooks.php b/includes/Minerva.hooks.php index c65d939..3996820 100644 --- a/includes/Minerva.hooks.php +++ b/includes/Minerva.hooks.php @@ -86,8 +86,6 @@ class MinervaHooks { $skin = $out->getSkin(); $request = $special->getRequest(); - // Ensure desktop version of Special:Preferences page gets mobile targeted modules - // FIXME: Upstream to core (?) if ( $skin instanceof SkinMinerva ) { switch ( $name ) { case 'MobileMenu': @@ -99,9 +97,6 @@ class MinervaHooks { 'skins.minerva.mainMenu' ] ); break; - case 'Preferences': - $out->addModules( 'skins.minerva.special.preferences.scripts' ); - break; case 'Userlogin': case 'CreateAccount': // FIXME: Note mobile.ajax.styles should not be necessary here. From 6b801b8c5cb82bdb53b539ba5e198ab300b887aa Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Wed, 31 Jan 2018 15:49:43 -0800 Subject: [PATCH 17/18] Console recruit message has been moved to MobileFrontend Change-Id: I48eb8ac7471f7e17ed10ac326230cf2ffed467d1 Depends-On: I3ee0c34139ec658566e8d324a3c8c28a80e930fd --- i18n/en.json | 1 - i18n/qqq.json | 1 - resources/skins.minerva.scripts/preInit.js | 7 ------- skin.json | 1 - 4 files changed, 10 deletions(-) diff --git a/i18n/en.json b/i18n/en.json index f35556d..5a7a2ba 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -4,7 +4,6 @@ }, "minerva-last-modified-date": "Last edited on $1, at $2", "minerva-talk-add-topic": "Add discussion", - "mobile-frontend-console-recruit": "\\o/ Hey! This is open source software and we need volunteers to help us build this thing, make it better and fix any bugs that you might be seeing in this JavaScript console!\n\nYou can find our backlog @ https://phabricator.wikimedia.org/project/profile/67/", "mobile-frontend-cookies-required": "Cookies are required to switch view modes. Please enable them and try again.", "mobile-frontend-editor-blocked-info-loggedin": "Your account is blocked from editing. The block was made by {{GENDER:$2|$2}} for the following reason: $1", "mobile-frontend-editor-cta": "Help improve this page!", diff --git a/i18n/qqq.json b/i18n/qqq.json index 20d35ec..80736b6 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -13,7 +13,6 @@ }, "minerva-last-modified-date": "Text that displays the date the page was last modified. Parameters:\n* $1 - date\n* $2 - time\n{{Related|Mobile-frontend-last-modified}}", "minerva-talk-add-topic": "Label for button which shows at bottom of talk pages in mobile view prompting addition of topic", - "mobile-frontend-console-recruit": "Message that is displayed in the JavaScript console aimed at developers in an attempt to recruit volunteers. The \\o/ emoticon is a man with his arms in the air with the purpose of drawing attention to the message. If this doesn't translate into the destination language feel free to omit it or use something more applicable.", "mobile-frontend-cookies-required": "Error message shown when user attempts to switch site modes and cookies are not enabled.", "mobile-frontend-editor-blocked-info-loggedin": "Toast message for logged in users that appears (before the user see the editor) when a user tries to edit a page, but is blocked from editing with reason and blocked by information.\n\nParameters:\n* $1 - blocked by information (Username of the user who crated this block)\n* $2 - Reason for this block, if any", "mobile-frontend-editor-cta": "Caption for call to action when an anonymous user clicks on edit icon. (Note the mobile site currently doesn't allow anonymous editing.)\n{{Identical|Help improve this page}}", diff --git a/resources/skins.minerva.scripts/preInit.js b/resources/skins.minerva.scripts/preInit.js index b7f83c6..56a503c 100644 --- a/resources/skins.minerva.scripts/preInit.js +++ b/resources/skins.minerva.scripts/preInit.js @@ -54,12 +54,5 @@ ) ); } }( mw.config.get( 'wgRedirectedFrom' ) ) ); - - // Recruit volunteers through the console (note console.log may not be a function so check via apply) - /* eslint-disable no-console */ - if ( window.console && window.console.log && window.console.log.apply && - mw.config.get( 'wgMFEnableJSConsoleRecruitment' ) ) { - console.log( mw.msg( 'mobile-frontend-console-recruit' ) ); - } /* eslint-enable no-console */ }( mw.mobileFrontend ) ); diff --git a/skin.json b/skin.json index 3dd6ae7..1e4de5e 100644 --- a/skin.json +++ b/skin.json @@ -269,7 +269,6 @@ "mobile-frontend-meta-data-issues-header-talk", "mobile-frontend-languages-not-available", "mobile-frontend-cookies-required", - "mobile-frontend-console-recruit", "minerva-download", "mobile-frontend-redirected-from" ], From 326ec90cd5ea53938c151c06c0f7126200630f2d Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Thu, 1 Feb 2018 10:59:18 -0800 Subject: [PATCH 18/18] Disable download button on Chrome like browsers Add Dolphin, Opera and Maxthon to whitelist Bug: T182059 Change-Id: I39bf9d016aba189016b2ce5b42a2e95b58cb33ce --- .../skins.minerva.scripts/DownloadIcon.js | 8 +++-- resources/skins.minerva.scripts/init.js | 2 +- .../test_DownloadIcon.js | 34 +++++++++++++++---- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/resources/skins.minerva.scripts/DownloadIcon.js b/resources/skins.minerva.scripts/DownloadIcon.js index cd9f350..3f234a7 100644 --- a/resources/skins.minerva.scripts/DownloadIcon.js +++ b/resources/skins.minerva.scripts/DownloadIcon.js @@ -34,11 +34,13 @@ * * @param {Skin} skin * @param {Number[]} [supportedNamespaces] + * @param {Window} [windowObj] window object * @constructor */ - function DownloadIcon( skin, supportedNamespaces ) { + function DownloadIcon( skin, supportedNamespaces, windowObj ) { var options = {}; this.skin = skin; + this.window = windowObj || {}; this.supportedNamespaces = supportedNamespaces || [ 0 ]; options.tagName = 'li'; options.glyphPrefix = 'minerva'; @@ -66,7 +68,9 @@ return false; } - if ( browser.isIos() || chromeVersion === false ) { + if ( browser.isIos() || chromeVersion === false || + this.window.chrome === undefined + ) { // we support only chrome/chromium on desktop/android return false; } diff --git a/resources/skins.minerva.scripts/init.js b/resources/skins.minerva.scripts/init.js index ea1ac1a..4b8c0c1 100644 --- a/resources/skins.minerva.scripts/init.js +++ b/resources/skins.minerva.scripts/init.js @@ -228,7 +228,7 @@ * @ignore */ function appendDownloadButton() { - var downloadIcon = new DownloadIcon( skin, config.get( 'wgMinervaDownloadNamespaces' ) ); + var downloadIcon = new DownloadIcon( skin, config.get( 'wgMinervaDownloadNamespaces' ), window ); if ( downloadIcon.isAvailable( navigator.userAgent ) ) { // Because the page actions are floated to the right, their order in the diff --git a/tests/qunit/skins.minerva.scripts/test_DownloadIcon.js b/tests/qunit/skins.minerva.scripts/test_DownloadIcon.js index 37c1050..4d00a6b 100644 --- a/tests/qunit/skins.minerva.scripts/test_DownloadIcon.js +++ b/tests/qunit/skins.minerva.scripts/test_DownloadIcon.js @@ -3,6 +3,8 @@ VALID_SUPPORTED_NAMESPACES = [ 0 ], Skin = M.require( 'mobile.startup/Skin' ), Deferred = $.Deferred, + windowChrome = { chrome: true }, + windowNotChrome = {}, DownloadIcon = M.require( 'skins.minerva.scripts/DownloadIcon' ), browser = M.require( 'mobile.startup/Browser' ).getSingleton(), Page = M.require( 'mobile.startup/Page' ); @@ -82,12 +84,12 @@ } ); QUnit.test( 'isAvailable() handles properly correct namespace', function ( assert ) { - var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES ); + var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES, windowChrome ); assert.ok( icon.isAvailable( VALID_UA ) ); } ); QUnit.test( 'isAvailable() handles properly not supported namespace', function ( assert ) { - var icon = new DownloadIcon( this.skin, [ 9999 ] ); + var icon = new DownloadIcon( this.skin, [ 9999 ], windowChrome ); assert.notOk( icon.isAvailable( VALID_UA ) ); } ); @@ -98,19 +100,39 @@ title: 'Test', isMainPage: true } ); - icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES ); + icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES, windowChrome ); assert.notOk( icon.isAvailable( VALID_UA ) ); } ); QUnit.test( 'isAvailable() returns false for iOS', function ( assert ) { var icon; this.sandbox.stub( browser, 'isIos' ).returns( true ); - icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES ); + icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES, windowChrome ); assert.notOk( icon.isAvailable( VALID_UA ) ); } ); + QUnit.test( 'isAvailable() uses window.chrome to filter certain chrome-like browsers', function ( assert ) { + var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES, windowNotChrome ); + // Dolphin + assert.notOk( icon.isAvailable( ' Mozilla/5.0 (Linux; Android 7.0; SM-G950U1 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36' ) ); + // Opera + assert.notOk( icon.isAvailable( 'Mozilla/5.0 (Linux; Android 7.0; SM-G950U1 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.116 Mobile Safari/537.36 OPR/44.1.2246.123029' ) ); + // Maxthon + assert.notOk( icon.isAvailable( 'Mozilla/5.0 (Linux; Android 7.0; SM-G950U1 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.111 Mobile Safari/537.36 MxBrowser/4.5.10.1300' ) ); + } ); + QUnit.test( 'isAvailable() handles properly non-chrome browsers', function ( assert ) { - var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES ); + var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES, windowChrome ); + // IPhone 6 Safari + assert.notOk( icon.isAvailable( 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_0_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13A405 Safari/601.1' ) ); + // Nokia Lumia 930 Windows Phone 8.1 + assert.notOk( icon.isAvailable( 'Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; Microsoft; Virtual) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537' ) ); + // Firefox @ Ubuntu + assert.notOk( icon.isAvailable( 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0' ) ); + } ); + + QUnit.test( 'isAvailable() handles properly non-chrome browsers', function ( assert ) { + var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES, windowNotChrome ); // IPhone 6 Safari assert.notOk( icon.isAvailable( 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_0_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13A405 Safari/601.1' ) ); // Nokia Lumia 930 Windows Phone 8.1 @@ -130,7 +152,7 @@ } ); QUnit.test( 'isAvailable() handles properly supported browsers', function ( assert ) { - var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES ); + var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES, windowChrome ); // Samsung Galaxy S7, Android 6, Chrome 44 assert.ok( icon.isAvailable( 'Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG SM-G930F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36' ) ); // Samsung Galaxy A5, Android 7, Samsung Browser 5.2