r58173 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58172‎ | r58173 | r58174 >
Date:23:39, 26 October 2009
Author:adam
Status:deferred
Tags:
Comment:
WikiEditor Toolbar: removing overflow:hidden; from the toolbar sections and applying it only durring transitions
Modified paths:
  • /trunk/extensions/UsabilityInitiative/CollapsibleTabs/CollapsibleTabs.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/combined.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/combined.min.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/wikiEditor.toolbar.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.toolbar.css
@@ -11,7 +11,6 @@
1212 width: 100%;
1313 clear: both;
1414 height: 0;
15 - overflow: hidden;
1615 }
1716 body.rtl .wikiEditor-ui-toolbar .sections {
1817 float: right;
Index: trunk/extensions/UsabilityInitiative/css/combined.css
@@ -191,7 +191,6 @@
192192 width: 100%;
193193 clear: both;
194194 height: 0;
195 - overflow: hidden;
196195 }
197196 body.rtl .wikiEditor-ui-toolbar .sections {
198197 float: right;
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css
@@ -175,7 +175,6 @@
176176 width:100%;
177177 clear:both;
178178 height:0;
179 -overflow:hidden;
180179 }
181180 body.rtl .wikiEditor-ui-toolbar .sections{
182181 float:right;
Index: trunk/extensions/UsabilityInitiative/CollapsibleTabs/CollapsibleTabs.js
@@ -11,7 +11,6 @@
1212 var target = $moving.data('collapsibleTabsSettings').collapsedContainer;
1313 $moving.css("position", "relative").css( ( rtl ? 'left' : 'right'), 0 );
1414 $moving.animate({width: '1px'},"normal",function(){
15 - //$j(this).remove().prependTo(target).data('collapsibleTabsSettings', data).show();
1615 $j(this).hide();
1716 // add the placeholder
1817 $j('<span class="placeholder" style="display:none;"></span>').insertAfter(this);
Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -20,17 +20,17 @@
2121 'raw' => array(
2222 array( 'src' => 'css/suggestions.css', 'version' => 6 ),
2323 array( 'src' => 'css/wikiEditor.css', 'version' => 4 ),
24 - array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 6 ),
 24+ array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 7 ),
2525 array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 2 ),
2626 array( 'src' => 'css/wikiEditor.toc.css', 'version' => 6 ),
2727 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2' ),
2828 ),
2929 'combined' => array(
30 - array( 'src' => 'css/combined.css', 'version' => 11 ),
 30+ array( 'src' => 'css/combined.css', 'version' => 12 ),
3131 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2' ),
3232 ),
3333 'minified' => array(
34 - array( 'src' => 'css/combined.min.css', 'version' => 11 ),
 34+ array( 'src' => 'css/combined.min.css', 'version' => 12 ),
3535 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2' ),
3636 ),
3737 )
@@ -70,7 +70,7 @@
7171 array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 5 ),
7272 array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 16 ),
7373 array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 12 ),
74 - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 12 ),
 74+ array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 13 ),
7575 array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 6 ),
7676 array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 22 ),
7777 ),
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js
@@ -459,12 +459,13 @@
460460 $previousSections.css( 'position', 'absolute' );
461461 $previousSections.fadeOut( 'fast', function() { $(this).css( 'position', 'relative' ); } );
462462 $(this).parent().parent().find( 'a' ).removeClass( 'current' );
 463+ $sections.css('overflow', 'hidden');
463464 if ( show ) {
464465 $section.fadeIn( 'fast' );
465 - $sections.animate( { 'height': $section.outerHeight() }, $section.outerHeight() * 2 );
 466+ $sections.animate( { 'height': $section.outerHeight() }, $section.outerHeight() * 2, function() { $(this).css('overflow', 'visible'); } );
466467 $(this).addClass( 'current' );
467468 } else {
468 - $sections.animate( { 'height': 0 }, $section.outerHeight() * 2 );
 469+ $sections.animate( { 'height': 0 }, $section.outerHeight() * 2, function() { $(this).css('overflow', 'visible'); } );
469470 }
470471 // Click tracking
471472 if($.trackAction != undefined){
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -2083,12 +2083,13 @@
20842084 $previousSections.css( 'position', 'absolute' );
20852085 $previousSections.fadeOut( 'fast', function() { $(this).css( 'position', 'relative' ); } );
20862086 $(this).parent().parent().find( 'a' ).removeClass( 'current' );
 2087+ $sections.css('overflow', 'hidden');
20872088 if ( show ) {
20882089 $section.fadeIn( 'fast' );
2089 - $sections.animate( { 'height': $section.outerHeight() }, $section.outerHeight() * 2 );
 2090+ $sections.animate( { 'height': $section.outerHeight() }, $section.outerHeight() * 2, function() { $(this).css('overflow', 'visible'); } );
20902091 $(this).addClass( 'current' );
20912092 } else {
2092 - $sections.animate( { 'height': 0 }, $section.outerHeight() * 2 );
 2093+ $sections.animate( { 'height': 0 }, $section.outerHeight() * 2, function() { $(this).css('overflow', 'visible'); } );
20932094 }
20942095 // Click tracking
20952096 if($.trackAction != undefined){
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -131,7 +131,7 @@
132132 return html;},buildRow:function(context,row){var html='<tr>';for(cell in row){html+='<td class="cell cell-'+cell+'" valign="top"><span>'+
133133 $.wikiEditor.autoMsg(row[cell],['html','text'])+'</span></td>';}
134134 html+='</tr>';return html;},buildCharacter:function(character,actions){if(typeof character=='string'){character={'label':character,'action':{'type':'encapsulate','options':{'pre':character}}};}else if(0 in character&&1 in character){character={'label':character[0],'action':{'type':'encapsulate','options':{'pre':character[1]}}};}
135 -if('action'in character&&'label'in character){actions[character.label]=character.action;return'<a rel="'+character.label+'" href="#">'+character.label+'</a>';}},buildTab:function(context,id,section){var selected=$.cookie('wikiEditor-'+context.instance+'-toolbar-section');return $('<span />').attr({'class':'tab tab-'+id,'rel':id}).append($('<a />').addClass(selected==id?'current':null).attr('href','#').text($.wikiEditor.autoMsg(section,'label')).data('context',context).bind('mousedown',function(){var $sections=$(this).data('context').$ui.find('.sections');var $section=$(this).data('context').$ui.find('.section-'+$(this).parent().attr('rel'));$(this).blur();var show=$section.css('display')=='none';$previousSections=$section.parent().find('.section:visible');$previousSections.css('position','absolute');$previousSections.fadeOut('fast',function(){$(this).css('position','relative');});$(this).parent().parent().find('a').removeClass('current');if(show){$section.fadeIn('fast');$sections.animate({'height':$section.outerHeight()},$section.outerHeight()*2);$(this).addClass('current');}else{$sections.animate({'height':0},$section.outerHeight()*2);}
 135+if('action'in character&&'label'in character){actions[character.label]=character.action;return'<a rel="'+character.label+'" href="#">'+character.label+'</a>';}},buildTab:function(context,id,section){var selected=$.cookie('wikiEditor-'+context.instance+'-toolbar-section');return $('<span />').attr({'class':'tab tab-'+id,'rel':id}).append($('<a />').addClass(selected==id?'current':null).attr('href','#').text($.wikiEditor.autoMsg(section,'label')).data('context',context).bind('mousedown',function(){var $sections=$(this).data('context').$ui.find('.sections');var $section=$(this).data('context').$ui.find('.section-'+$(this).parent().attr('rel'));$(this).blur();var show=$section.css('display')=='none';$previousSections=$section.parent().find('.section:visible');$previousSections.css('position','absolute');$previousSections.fadeOut('fast',function(){$(this).css('position','relative');});$(this).parent().parent().find('a').removeClass('current');$sections.css('overflow','hidden');if(show){$section.fadeIn('fast');$sections.animate({'height':$section.outerHeight()},$section.outerHeight()*2,function(){$(this).css('overflow','visible');});$(this).addClass('current');}else{$sections.animate({'height':0},$section.outerHeight()*2,function(){$(this).css('overflow','visible');});}
136136 if($.trackAction!=undefined){$.trackAction($section.attr('rel')+'.'+(show?'show':'hide'));}
137137 $.cookie('wikiEditor-'+$(this).data('context').instance+'-toolbar-section',show?$section.attr('rel'):null);return false;}));},buildSection:function(context,id,section){context.$textarea.trigger('wikiEditor-toolbar-buildSection-'+id,[section]);var selected=$.cookie('wikiEditor-'+context.instance+'-toolbar-section');var $section;switch(section.type){case'toolbar':var $section=$('<div />').attr({'class':'toolbar section section-'+id,'rel':id});if('groups'in section){for(group in section.groups){$section.append($.wikiEditor.modules.toolbar.fn.buildGroup(context,group,section.groups[group]));}}
138138 break;case'booklet':var $pages=$('<div />').addClass('pages');var $index=$('<div />').addClass('index');if('pages'in section){for(page in section.pages){$pages.append($.wikiEditor.modules.toolbar.fn.buildPage(context,page,section.pages[page]));$index.append($.wikiEditor.modules.toolbar.fn.buildBookmark(context,page,section.pages[page]));}}

Follow-up revisions

RevisionCommit summaryAuthorDate
r59204wmf-deployment: Merging usability changes from trunk...catrope18:53, 18 November 2009

Status & tagging log