r52954 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52953‎ | r52954 | r52955 >
Date:00:58, 9 July 2009
Author:catrope
Status:deferred
Tags:
Comment:
OptIn: Committing WIP
Modified paths:
  • /trunk/extensions/UsabilityInitiative/OptIn/OptIn.css (added) (history)
  • /trunk/extensions/UsabilityInitiative/OptIn/OptIn.i18n.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/OptIn/OptIn.css
Property changes on: trunk/extensions/UsabilityInitiative/OptIn/OptIn.css
___________________________________________________________________
Name: svn:eol-style
11 + native
Index: trunk/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php
@@ -52,9 +52,58 @@
5353 $wgOut->addWikiMsg( 'optin-intro' );
5454 $wgOut->addHTML( Xml::hidden( 'opt', $opt ) );
5555 // Uses the optin-submit-in or optin-submit-out message
56 - $wgOut->addHTML( Xml::submitButton( wfMsg( "optin-submit-$opt" ) ) );
 56+ if ( $opt == 'in' )
 57+ $this->showOptInButtons();
 58+ else
 59+ $wgOut->addHTML( Xml::submitButton( wfMsg( "optin-submit-out" ) ) );
5760 $wgOut->addHTML( Xml::closeElement( 'form' ) );
 61+ $wgOut->addWikiMsg( 'optin-improvements' );
5862 }
 63+
 64+ function showOptInButtons() {
 65+ global $wgOut, $wgOptInStyleVersion;
 66+ UsabilityInitiativeHooks::initialize();
 67+ UsabilityInitiativeHooks::addStyle( 'OptIn/OptIn.css',
 68+ $wgOptInStyleVersion );
 69+ $wgOut->addHTML(
 70+ Xml::tags( 'div', array( 'class' => 'optin-accept' ),
 71+ Xml::tags( 'div', array(),
 72+ Xml::tags( 'div', array(),
 73+ Xml::tags( 'div', array(),
 74+ Xml::tags( 'div', array(),
 75+ Xml::tags( 'a', array(), // TODO: target
 76+ Xml::element( 'span',
 77+ array( 'class' => 'optin-button-shorttext' ),
 78+ wfMsg( 'optin-accept-short' )
 79+ ) .
 80+ Xml::element( 'br' ) .
 81+ Xml::element( 'span',
 82+ array( 'class' => 'optin-button-longtext' ),
 83+ wfMsg( 'optin-accept-long' )
 84+ )
 85+ )
 86+ ) ) ) )
 87+ ) . "  " .
 88+ Xml::tags( 'div', array( 'class' => 'optin-deny' ),
 89+ Xml::tags( 'div', array(),
 90+ Xml::tags( 'div', array(),
 91+ Xml::tags( 'div', array(),
 92+ Xml::tags( 'div', array(),
 93+ Xml::tags( 'a', array(), // TODO: target
 94+ Xml::element( 'span',
 95+ array( 'class' => 'optin-button-shorttext' ),
 96+ wfMsg( 'optin-deny-short' )
 97+ ) .
 98+ Xml::element( 'br' ) .
 99+ Xml::element( 'span',
 100+ array( 'class' => 'optin-button-longtext' ),
 101+ wfMsg( 'optin-deny-long' )
 102+ )
 103+ )
 104+ ) ) ) )
 105+ )
 106+ );
 107+ }
59108
60109 function isOptedIn( $user ) {
61110 global $wgOptInPrefs;
@@ -84,6 +133,7 @@
85134
86135 function showSurvey() {
87136 global $wgOptInSurvey, $wgOut, $wgOptInStyleVersion;
 137+ UsabilityInitiativeHooks::initialize();
88138 UsabilityInitiativeHooks::addScript( 'OptIn/OptIn.js',
89139 $wgOptInStyleVersion );
90140
Index: trunk/extensions/UsabilityInitiative/OptIn/OptIn.i18n.php
@@ -14,14 +14,17 @@
1515 $messages['en'] = array(
1616 'optin' => 'Usability Initiative opt in',
1717 'optin-desc' => 'Allow users to opt in to the Usability Initiative\'s usability enhancements',
18 - 'optin-title' => 'Usability Initiative enhancements',
 18+ 'optin-title' => 'Opt-in for Improved Usability',
1919 'optin-needlogin' => 'You need to [$1 log in] to opt in to the Usability Initiative\'s usability enhancements.',
20 - 'optin-intro' => 'The Wikipedia Usability Initiative has developed a new skin and a new edit toolbar intended to enhance the usability of Wikipedia. These enhancements have not been enabled for all users yet, but you can opt in to them by clicking "{{int:optin-submit-in}}" below.',
 20+ 'optin-intro' => 'The Wikipedia Usability Initiative has been working hard to improve the usability of Wikipedia. To try some of the new enhancements, click below.',
2121 'optin-success-in' => 'You have successfully opted in to the Usability Initiative\'s usability enhancements.
2222 You can opt back out at any time by clicking "{{int:optin-submit-out}}" below.',
2323 'optin-success-out' => 'You have successfully opted out of the Usability Initiative\'s usability enhancements.
2424 You can opt back in at any time by clicking {{int:optin-submit-in}} below.',
25 - 'optin-submit-in' => 'Opt in',
 25+ 'optin-accept-short' => 'Let\'s do it!',
 26+ 'optin-accept-long' => 'opt-in to beta',
 27+ 'optin-deny-short' => 'No thanks',
 28+ 'optin-deny-long' => 'return to previous page',
2629 'optin-submit-out' => 'Opt out',
2730 'optin-survey-intro' => "Thank you for trying the Usability Initiative's usability enhancements.
2831 You can opt out by clicking \"{{int:optin-submit-out}}\" at the bottom of this page.
@@ -56,6 +59,7 @@
5760 'optin-survey-answer-os-other' => 'Other:',
5861 'optin-survey-question-res' => 'What is the resolution of your screen?',
5962 'optin-survey-question-feedback' => 'Please let us know your feedback:',
 63+ 'optin-improvements' => "== What's been improved? ==\n[[File:UsabilityNavigation.png|right]]\n;Enhanced navigation\nClear indication of the state of \"read\" and \"edit\" whether you are on an article or a discussion page. The search box is moved from the left navigation bar to the top right corner for easier access and quicker searching.\n<div style=\"clear:both;\"></div>\n\n[[File:UsabilityToolbar.png|right]]\n;Edit toolbar improvements\nAn expandable edit toolbar hides infrequently used tool icons. Power users can expand the toolbar to access specialized icons. Help references (cheat sheet) are built into the toolbar. Toolbar icons were redesigned by using Tango and Gnome icons.\n<div style=\"clear:both;\"></div>\n\n[[File:UsabilitySearch.png|right]]\n;Improved search interface\nAs the search result page is often the entry point to an article, titles of results are laid out to increase visibility and infrequently needed information is reduced.\n<div style=\"clear:both;\"></div>\n\n;General aesthetic improvements\nMinimal aesthetic improvements have been applied for visual enhancements and redundant information has been removed.",
6064 );
6165
6266 /** Message documentation (Message documentation)

Follow-up revisions

RevisionCommit summaryAuthorDate
r52969Message updates to r52954siebrand05:47, 9 July 2009

Status & tagging log