r65590 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65589‎ | r65590 | r65591 >
Date:22:11, 27 April 2010
Author:tparscal
Status:ok
Tags:
Comment:
Added $wgVectorShowVariantName global configuration varaible which causes Vector to render the the variants drop-down menu with a label showing the current variant name. This is off by default, pending further research into it's user experience implications. Addresses bug #20193.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/skins/Vector.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -4203,6 +4203,13 @@
42044204 $wgVectorUseIconWatch = false;
42054205
42064206 /**
 4207+ * Show the name of the current variant as a label in the variants drop-down menu
 4208+ * true = Show the label
 4209+ * false = Do not show the label
 4210+ */
 4211+$wgVectorShowVariantName = false;
 4212+
 4213+/**
42074214 * Add extra stylesheets for Vector - This is only being used so that we can play around with different options while
42084215 * keeping our CSS code in the SVN and not having to change the main Vector styles. This will probably go away later on.
42094216 * null = add no extra styles
Index: trunk/phase3/RELEASE-NOTES
@@ -60,6 +60,10 @@
6161 on, allowing skins to use .htc files which are not cross-domain friendly.
6262 * ajaxwatch now uses the API and JQuery, and can be used to animate arbitrary
6363 watch links, not just to watch the page the link is on.
 64+* (bug 20193) Added $wgVectorShowVariantName global configuration varaible
 65+ which causes Vector to render the the variants drop-down menu with a label
 66+ showing the current variant name. This is off by default, pending further
 67+ research into it's user experience implications.
6468
6569 === Bug fixes in 1.17 ===
6670 * (bug 17560) Half-broken deletion moved image files to deletion archive
Index: trunk/phase3/skins/Vector.php
@@ -676,7 +676,7 @@
677677 * when UI is in RTL mode
678678 */
679679 private function renderNavigation( $elements ) {
680 - global $wgContLang, $wgVectorUseSimpleSearch, $wgStylePath;
 680+ global $wgContLang, $wgVectorUseSimpleSearch, $wgVectorShowVariantName, $wgStylePath;
681681
682682 // If only one element was given, wrap it in an array, allowing more
683683 // flexible arguments
@@ -707,6 +707,15 @@
708708 case 'VARIANTS':
709709 ?>
710710 <div id="p-variants" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
 711+ <?php if ( $wgVectorShowVariantName ): ?>
 712+ <h4>
 713+ <?php foreach ($this->data['variant_urls'] as $key => $link ): ?>
 714+ <?php if ( stripos( $link['attributes'], 'selected' ) !== false ): ?>
 715+ <?php echo htmlspecialchars( $link['text'] ) ?>
 716+ <?php endif; ?>
 717+ <?php endforeach; ?>
 718+ </h4>
 719+ <?php endif; ?>
711720 <h5><span><?php $this->msg('variants') ?></span><a href="#"></a></h5>
712721 <div class="menu">
713722 <?php if ( count( $this->data['variant_urls'] ) ): ?>

Follow-up revisions

RevisionCommit summaryAuthorDate
r65591Resource changes needed for $wgVectorShowVariantName (see r65590) to function...tparscal22:13, 27 April 2010
r65615Follow up r65590. Release notes typos.platonides12:28, 28 April 2010
r65765Followup to r65590: we don't need to explain the meanings of 'true' and 'fals...catrope21:26, 1 May 2010
r65959Merge Vector and UsabilityInitiative fixes from trunk: r64724, r65064, r65379...catrope19:03, 5 May 2010

Status & tagging log