From 6718bc435133454a2fd78eaf4405d20d6dd77a32 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Thu, 16 Aug 2018 11:43:28 -0700 Subject: [PATCH] Drop issues on editor T196150 disabled the fallback editor when JavaScript is available. As a result the code for page issues on the editor screen is redundant. This simplifies our code. The css rules relating to editor issues are retained, given they simplify the editor screen for mobile devices. Bug: T196150 Change-Id: I76d586414cdd8de533bb891b87d1e0b7efc20a68 --- resources/skins.minerva.scripts/cleanuptemplates.js | 11 +++-------- skin.json | 1 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/resources/skins.minerva.scripts/cleanuptemplates.js b/resources/skins.minerva.scripts/cleanuptemplates.js index ed671be..906fea7 100644 --- a/resources/skins.minerva.scripts/cleanuptemplates.js +++ b/resources/skins.minerva.scripts/cleanuptemplates.js @@ -5,7 +5,6 @@ KEYWORD_ALL_SECTIONS = 'all', config = mw.config, user = mw.user, - ACTION_EDIT = config.get( 'wgAction' ) === 'edit', NS_MAIN = 0, NS_TALK = 1, NS_CATEGORY = 14, @@ -229,20 +228,16 @@ */ function initPageIssues( overlayManager, page ) { var label, - headingText = ACTION_EDIT ? mw.msg( 'edithelp' ) : getNamespaceHeadingText( CURRENT_NS ), + headingText = getNamespaceHeadingText( CURRENT_NS ), $lead = page.getLeadSectionElement(), - issueOverlayShowAll = CURRENT_NS === NS_CATEGORY || CURRENT_NS === NS_TALK || ACTION_EDIT || !$lead, + issueOverlayShowAll = CURRENT_NS === NS_CATEGORY || CURRENT_NS === NS_TALK || !$lead, inline = newTreatmentEnabled && CURRENT_NS === 0, $container = $( '#bodyContent' ); // set A-B test class. $( 'html' ).addClass( newTreatmentEnabled ? 'issues-group-B' : 'issues-group-A' ); - if ( ACTION_EDIT ) { - // Editor uses different parent element - $container = $( '#mw-content-text' ); - createBanner( $container, mw.msg( 'edithelp' ), KEYWORD_ALL_SECTIONS, inline, overlayManager ); - } else if ( CURRENT_NS === NS_TALK || CURRENT_NS === NS_CATEGORY ) { + if ( CURRENT_NS === NS_TALK || CURRENT_NS === NS_CATEGORY ) { // e.g. Template:English variant category; Template:WikiProject createBanner( $container, mw.msg( 'mobile-frontend-meta-data-issues-header-talk' ), KEYWORD_ALL_SECTIONS, inline, overlayManager ); diff --git a/skin.json b/skin.json index e06e5d6..4d10eff 100644 --- a/skin.json +++ b/skin.json @@ -403,7 +403,6 @@ ], "messages": [ "skin-minerva-issue-learn-more", - "edithelp", "mobile-frontend-language-change", "mobile-frontend-meta-data-issues", "minerva-meta-data-issues-section-header",