jenkins-bot has submitted this change and it was merged. Change subject: Delete the ext.vector.sectionEditLinks module ......................................................................
Delete the ext.vector.sectionEditLinks module It's currently not working. Similar funtionality was implemented in MediaWiki core per bug 41729. Change-Id: Ib7efec6db7dc9147c0b7b6cdab9558160c6aec0c --- M Vector.hooks.php M Vector.php D modules/ext.vector.sectionEditLinks.css D modules/ext.vector.sectionEditLinks.js D modules/images/edit-faded.png D modules/images/edit.png 6 files changed, 0 insertions(+), 116 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/Vector.hooks.php b/Vector.hooks.php index 415763f..798b04b 100644 --- a/Vector.hooks.php +++ b/Vector.hooks.php @@ -28,17 +28,6 @@ ), 'modules' => array( 'ext.vector.collapsibleNav' ), ), - 'sectioneditlinks' => array( - 'modules' => array( 'ext.vector.sectionEditLinks' ), - 'configurations' => array( - 'wgVectorSectionEditLinksBucketTest', - 'wgVectorSectionEditLinksLotteryOdds', - 'wgVectorSectionEditLinksExperiment', - ), - 'requirements' => array( - 'vector-noexperiments' => false, - ), - ), 'experiments' => array( 'preferences' => array( 'vector-noexperiments' => array( diff --git a/Vector.php b/Vector.php index 715640b..9e9f63c 100644 --- a/Vector.php +++ b/Vector.php @@ -18,8 +18,6 @@ // Each module may be configured individually to be globally on/off or user preference based $wgVectorFeatures = array( 'collapsiblenav' => array( 'global' => true, 'user' => true ), - // The follwing are experimental and likely unstable - use at your own risk - 'sectioneditlinks' => array( 'global' => false, 'user' => false ), ); // The Vector skin has a basic version of simple search, which is a prerequisite for the enhanced one @@ -29,16 +27,6 @@ $wgCollapsibleNavBucketTest = false; // Force the new version $wgCollapsibleNavForceNewVersion = false; - -// Enable bucket testing for new version of section edit links -$wgVectorSectionEditLinksBucketTest = false; -// Percentage of users who's use of section edit links will be tracked - half of which will see the -// new section edit links - default 5% -$wgVectorSectionEditLinksLotteryOdds = 5; -// Version number of the current experiment - Buckets from previous experiments will be overwritten -// with new values when this is incremented, so as to allow accurate re-distribution. When changing -// the lottery odds, this needs to change too, or you will have inaccurate data. -$wgVectorSectionEditLinksExperiment = 0; /* Setup */ @@ -73,13 +61,6 @@ 'jquery.client', 'jquery.cookie', 'jquery.tabIndex', - ), - ), - 'ext.vector.sectionEditLinks' => $vectorResourceTemplate + array( - 'scripts' => 'ext.vector.sectionEditLinks.js', - 'styles' => 'ext.vector.sectionEditLinks.css', - 'dependencies' => array( - 'jquery.cookie', ), ), ); diff --git a/modules/ext.vector.sectionEditLinks.css b/modules/ext.vector.sectionEditLinks.css deleted file mode 100644 index 07df70a..0000000 --- a/modules/ext.vector.sectionEditLinks.css +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Section edit links - */ - -span.vector-editLink { - float: none; - display: inline-block; -} - -span.vector-editLink a { - padding-left: 18px; - /* @embed */ - background: url(images/edit-faded.png) left top no-repeat; -} - -span.vector-editLink a:hover { - /* @embed */ - background-image: url(images/edit.png); -} diff --git a/modules/ext.vector.sectionEditLinks.js b/modules/ext.vector.sectionEditLinks.js deleted file mode 100644 index f68b2ef..0000000 --- a/modules/ext.vector.sectionEditLinks.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Section Edit Links for Vector - */ -( function ( $, mw ) { - -var currentExperiment, experiment, odds, - eventBase = 'ext.vector.sectionEditLinks-bucket:', - cookieBase = 'ext.vector.sectionEditLinks-', - bucket = null; - -if ( mw.config.get( 'wgVectorSectionEditLinksBucketTest', false ) ) { - // If the version in the client's cookie doesn't match wgVectorSectionEditLinksExperiment, then - // we need to disregard the bucket they may already be in to ensure accurate redistribution - currentExperiment = $.cookie( cookieBase + 'experiment' ); - experiment = Number( mw.config.get( 'wgVectorSectionEditLinksExperiment', 0 ) ); - if ( currentExperiment === null || Number( currentExperiment ) !== experiment ) { - $.cookie( cookieBase + 'experiment', experiment ); - } else { - bucket = $.cookie( cookieBase + 'bucket' ); - } - if ( bucket === null ) { - // Percentage chance of being tracked - odds = Math.min( 100, Math.max( 0, - Number( mw.config.get( 'wgVectorSectionEditLinksLotteryOdds', 0 ) ) - ) ); - // 0 = not tracked, 1 = tracked with old version, 2 = tracked with new version - bucket = ( Math.random() * 100 ) < odds ? Number( Math.random() < 0.5 ) + 1 : 0; - $.cookie( cookieBase + 'bucket', bucket, { 'path': '/', 'expires': 30 } ); - // If we are going to track this person from now on, let's also track which bucket we put - // them into and when - if ( bucket > 0 && 'trackAction' in $ ) { - $.trackAction( eventBase + bucket + '@' + experiment ); - } - } -} - -if ( bucket <= 0 ) { - return; -} - -$(document).ready( function () { - if ( bucket === '2' || bucket === 2 ) { - // Move the link over to be next to the heading text and style it with an icon - $( 'span.mw-headline' ).each( function () { - $(this) - .after( - $( '<span class="editsection vector-editLink"></span>' ) - .append( - $(this) - .prev( 'span.editsection' ) - .find( 'a' ) - .each( function () { - var text = $(this).text(); - $(this).text( - text.substr( 0, 1 ).toUpperCase() + text.substr( 1 ) - ); - } ) - .detach() - ) - ) - .prev( 'span.editsection' ) - .remove(); - } ); - } -} ); - -} )( jQuery, mediaWiki ); diff --git a/modules/images/edit-faded.png b/modules/images/edit-faded.png deleted file mode 100644 index 1e2e5d8..0000000 --- a/modules/images/edit-faded.png +++ /dev/null Binary files differ diff --git a/modules/images/edit.png b/modules/images/edit.png deleted file mode 100644 index fe28125..0000000 --- a/modules/images/edit.png +++ /dev/null Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/84196 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib7efec6db7dc9147c0b7b6cdab9558160c6aec0c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Vector Gerrit-Branch: master Gerrit-Owner: Bartosz DziewoĆski <matma....@gmail.com> Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits