From 5e13bdf9d8b25f9b108b45c7134ae6dd11bd3b9b Mon Sep 17 00:00:00 2001 From: Moriel Schottlender Date: Tue, 1 Aug 2017 14:04:04 -0700 Subject: [PATCH] RCFilters: Unsticky the 'limit' preference temporarily Bug: T172156 Bug: T171514 Change-Id: I0bed6de70655a4a8a90ceb2f900ffbe98e643d33 --- .../mw.rcfilters.Controller.js | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js index 4051edaabf..9d2c3318ac 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js @@ -105,7 +105,11 @@ validate: $.isNumeric, sortFunc: function ( a, b ) { return Number( a.name ) - Number( b.name ); }, 'default': String( limitDefault ), - isSticky: true, + // Temporarily making this not sticky until we resolve the problem + // with the misleading preference. Note that if this is to be permanent + // we should remove all sticky behavior methods completely + // See T172156 + // isSticky: true, filters: [ 50, 100, 250, 500 ].map( function ( num ) { return controller._createFilterDataFromNumber( num, num ); } ) @@ -124,7 +128,8 @@ Number( i ); }, 'default': mw.user.options.get( 'rcdays', '30' ), - isSticky: true, + // Temporarily making this not sticky while limit is not sticky, see above + // isSticky: true, filters: [ // Hours (1, 2, 6, 12) 0.04166, 0.0833, 0.25, 0.5, @@ -810,9 +815,13 @@ /** * Update the limit default value * - * @param {number} newValue New value + * param {number} newValue New value */ - mw.rcfilters.Controller.prototype.updateLimitDefault = function ( newValue ) { + mw.rcfilters.Controller.prototype.updateLimitDefault = function ( /* newValue */ ) { + // HACK: Temporarily remove this from being sticky + // See T172156 + + /* if ( !$.isNumeric( newValue ) ) { return; } @@ -825,14 +834,20 @@ // Update the preference for this session mw.user.options.set( 'rcfilters-rclimit', newValue ); } + */ + return; }; /** * Update the days default value * - * @param {number} newValue New value + * param {number} newValue New value */ - mw.rcfilters.Controller.prototype.updateDaysDefault = function ( newValue ) { + mw.rcfilters.Controller.prototype.updateDaysDefault = function ( /* newValue */ ) { + // HACK: Temporarily remove this from being sticky + // See T172156 + + /* if ( !$.isNumeric( newValue ) ) { return; } @@ -845,6 +860,8 @@ // Update the preference for this session mw.user.options.set( 'rcdays', newValue ); } + */ + return; }; /** -- 2.20.1