r67299 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67298‎ | r67299 | r67300 >
Date:21:35, 3 June 2010
Author:tparscal
Status:reverted (Comments)
Tags:
Comment:
Revert r67281: This goes against an intentional design decision. To discuss that decision further and submit proposals to change this design please contact Howie Fung <hfung@wikimedia.org> or visit http://usability.wikimedia.org
Modified paths:
  • /trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleNav/CollapsibleNav.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleNav/CollapsibleNav.js
@@ -38,7 +38,7 @@
3939 $j( '#panel > div.portal:not(:first)' )
4040 .each( function( i ) {
4141 var state = $j.cookie( 'vector-nav-' + $j(this).attr( 'id' ) );
42 - if ( state == 'true' || ( state == null && (i < 1 || ( $j(this).attr( 'id' ) == 'p-lang' ) ) ) ) {
 42+ if ( state == 'true' || ( state == null && i < 1 ) ) {
4343 $j(this)
4444 .addClass( 'expanded' )
4545 .find( 'div.body' )
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php
@@ -12,7 +12,7 @@
1313
1414 static $scripts = array(
1515 'raw' => array(
16 - array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 15 ),
 16+ array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 14 ),
1717 array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 8 ),
1818 array( 'src' => 'Modules/ExpandableSearch/ExpandableSearch.js', 'version' => 2 ),
1919 array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 8 ),
@@ -20,10 +20,10 @@
2121 array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 15 ),
2222 ),
2323 'combined' => array(
24 - array( 'src' => 'Vector.combined.js', 'version' => 37 ),
 24+ array( 'src' => 'Vector.combined.js', 'version' => 36 ),
2525 ),
2626 'minified' => array(
27 - array( 'src' => 'Vector.combined.min.js', 'version' => 37 ),
 27+ array( 'src' => 'Vector.combined.min.js', 'version' => 36 ),
2828 ),
2929 );
3030 static $modules = array(
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js
@@ -38,7 +38,7 @@
3939 $j( '#panel > div.portal:not(:first)' )
4040 .each( function( i ) {
4141 var state = $j.cookie( 'vector-nav-' + $j(this).attr( 'id' ) );
42 - if ( state == 'true' || ( state == null && (i < 1 || ( $j(this).attr( 'id' ) == 'p-lang' ) ) ) ) {
 42+ if ( state == 'true' || ( state == null && i < 1 ) ) {
4343 $j(this)
4444 .addClass( 'expanded' )
4545 .find( 'div.body' )
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js
@@ -1,7 +1,7 @@
22
33 $j(document).ready(function(){if(!wgVectorEnabledModules.collapsiblenav){return true;}
44 var mod={'browsers':{'ltr':{'opera':[['>=',9.6]],'blackberry':false,'ipod':false,'iphone':false},'rtl':{'opera':[['>=',9.6]],'blackberry':false,'ipod':false,'iphone':false}}};if(!$j.wikiEditor.isSupported(mod)){return true;}
5 -$j('#panel').addClass('collapsible-nav');$j('#panel > div.portal:first').addClass('expanded').find('div.body').show();$j('#panel > div.portal:not(:first)').each(function(i){var state=$j.cookie('vector-nav-'+$j(this).attr('id'));if(state=='true'||(state==null&&(i<1||($j(this).attr('id')=='p-lang')))){$j(this).addClass('expanded').find('div.body').show();}else{$j(this).addClass('collapsed');}
 5+$j('#panel').addClass('collapsible-nav');$j('#panel > div.portal:first').addClass('expanded').find('div.body').show();$j('#panel > div.portal:not(:first)').each(function(i){var state=$j.cookie('vector-nav-'+$j(this).attr('id'));if(state=='true'||(state==null&&i<1)){$j(this).addClass('expanded').find('div.body').show();}else{$j(this).addClass('collapsed');}
66 if(state!=null){$j.cookie('vector-nav-'+$j(this).attr('id'),state,{expires:30});}});function toggle($element){$j.cookie('vector-nav-'+$element.parent().attr('id'),$element.parent().is('.collapsed'),{expires:30});$element.parent().toggleClass('expanded').toggleClass('collapsed').find('div.body').slideToggle('fast');}
77 var $headings=$j('#panel > div.portal > h5');var maxTI=0;$j('[tabindex]').each(function(){var ti=parseInt($j(this).attr('tabindex'));if(ti>maxTI)
88 maxTI=ti;});var tabIndex=maxTI+1;$j('#searchInput').attr('tabindex',tabIndex++);$headings.each(function(){$j(this).attr('tabindex',tabIndex++);});$headings.keydown(function(event){if(event.which==13||event.which==32){toggle($j(this));}}).mousedown(function(){toggle($j(this));$j(this).blur();return false;});});$j(document).ready(function(){if(!wgVectorEnabledModules.collapsibletabs){return true;}

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r67281Do not collapse interwikis by default....platonides16:22, 3 June 2010

Comments

#Comment by 😂 (talk | contribs)   04:59, 4 June 2010

Disagree with this revert. Expanded-by-default is a much better choice, regardless of what the click tracking says. As an "intentional design decision" it is a poor one.

#Comment by Trevor Parscal (WMF) (talk | contribs)   16:59, 4 June 2010

Please talk about this here: http://usability.wikimedia.org/wiki/Opinion_Language_Links - bottom line, we need to have these conversations before the commit for code that affects the user experience like this does. However, our team also needs to get much better at communicating what has been decided and why as well as what has just been happened upon and is welcome to be changed.

#Comment by Skizzerz (talk | contribs)   01:09, 7 June 2010

tentatively marking as 'fixme' until discussion of the merits of having it expanded or collapsed by default have reached enough of a consensus to do something about it, at which point it should be changed to the appropriate resolution.

#Comment by Catrope (talk | contribs)   22:02, 7 June 2010

This was essentially reverted by r67559.

Status & tagging log