r114328 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114327‎ | r114328 | r114329 >
Date:23:08, 20 March 2012
Author:rsterbin
Status:resolved
Tags:
Comment:
Followup to r114271 and r114064:
- Fixed up the disable flyover message to be less stupid (and now without
line breaks)
- Added prefixes to the tipsy css rules; however, this caused the whole
thing to shift ~200px upward -- passing to Yoni for help
- Made the regex in $.articleFeedbackv5.buildLink() global -- stil working
on solution to other issues
- Updated Link A to use the pipe-selector message rather than a literal
pipe character
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.css (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php
@@ -422,10 +422,9 @@
423423
424424 /* Front-end: feedback link close button */
425425 'articlefeedbackv5-disable-flyover-title' => 'Remove this tool?',
426 - 'articlefeedbackv5-disable-flyover-help-goto' => 'To remove $1, go to',
 426+ 'articlefeedbackv5-disable-flyover-help' => 'To remove $1, go to $2 and check $3',
427427 'articlefeedbackv5-disable-flyover-help-emphasis-text' => 'Article Feedback',
428428 'articlefeedbackv5-disable-flyover-help-location' => 'My preferences > Appearance',
429 - 'articlefeedbackv5-disable-flyover-help-direction' => 'and check',
430429 'articlefeedbackv5-disable-flyover-prefbutton' => 'Go to my preferences',
431430
432431 );
@@ -703,10 +702,12 @@
704703 * <code>$3</code> – URL directly to feedback location
705704 * <code>$4</code> – The help link.',
706705 'articlefeedbackv5-disable-flyover-title' => 'Title of the tooltip that pops up when you click the close button on a feedback trigger link, explaining how to remove the Article Feedback tool',
707 - 'articlefeedbackv5-disable-flyover-help-goto' => 'Help text for the tooltip that pops up when you click the close button on a feedback trigger link, explaining where to go to remove the Article Feedback tool. <code>$1</code>: Emphasized name of the tool (text is {{msg-mw|articlefeedbackv5-disable-flyover-help-emphasis-text}})',
708 - 'articlefeedbackv5-disable-flyover-help-emphasis-text' => 'The emphasis text for {{msg-mw|articlefeedbackv5-disable-flyover-help-goto}}',
709 - 'articlefeedbackv5-disable-flyover-help-location' => 'A short indication of where to go to change your Article Feedback preferences, immediately below {{msg-mw|articlefeedbackv5-disable-flyover-help-goto}}',
710 - 'articlefeedbackv5-disable-flyover-help-direction' => 'Help text for what to do once you get to the preferences panel (name of checkbox will be on the line below)',
 706+ 'articlefeedbackv5-disable-flyover-help' => 'Help text for the tooltip that pops up when you click the close button on a feedback trigger link, explaining how to remove the Article Feedback tool.
 707+* <code>$1</code>: Emphasized name of the tool ({{msg-mw|articlefeedbackv5-disable-flyover-help-emphasis-text}})
 708+* <code>$2</code>: The location of the preference panel ({{msg-mw|articlefeedbackv5-disable-flyover-help-location}})
 709+* <code>$3</code>: The label of the checkbox ( {{msg-mw|articlefeedbackv5-disable-preference}})',
 710+ 'articlefeedbackv5-disable-flyover-help-emphasis-text' => 'The emphasis text for {{msg-mw|articlefeedbackv5-disable-flyover-help}} (the name of the tool)',
 711+ 'articlefeedbackv5-disable-flyover-help-location' => 'A short indication of where to go to change your Article Feedback preferences, inside {{msg-mw|articlefeedbackv5-disable-flyover-help}}',
711712 'articlefeedbackv5-disable-flyover-prefbutton' => 'The text of the big glossy button used to send the user to their preferences in the tooltip that pops up when you click the close button on a feedback trigger link, explaining how to remove the Article Feedback tool',
712713 );
713714
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.css
@@ -1138,7 +1138,8 @@
11391139 }
11401140
11411141 /* Disable flyover */
1142 -.tipsy-inner {
 1142+.articleFeedbackv5-disable-flyover-tip-A .tipsy-inner,
 1143+.articleFeedbackv5-disable-flyover-tip-E .tipsy-inner {
11431144 padding: 0;
11441145 border-color: #888;
11451146 max-width: 40em;
@@ -1148,16 +1149,19 @@
11491150 margin-bottom: 5px;
11501151 font-size: 0.9em;
11511152 }
1152 -.tipsy-arrow {
 1153+.articleFeedbackv5-disable-flyover-tip-A .tipsy-arrow,
 1154+.articleFeedbackv5-disable-flyover-tip-E .tipsy-arrow {
11531155 /* @embed */
11541156 background-image: url(images/tipsy-flyover.png);
11551157 width: 23px;
11561158 height: 11px;
11571159 }
1158 -.tipsy-nw .tipsy-arrow {
 1160+.articleFeedbackv5-disable-flyover-tip-A.tipsy-nw .tipsy-arrow,
 1161+.articleFeedbackv5-disable-flyover-tip-E.tipsy-nw .tipsy-arrow {
11591162 margin-top: -6px;
11601163 }
1161 -.tipsy-se .tipsy-arrow {
 1164+.articleFeedbackv5-disable-flyover-tip-A.tipsy-se .tipsy-arrow,
 1165+.articleFeedbackv5-disable-flyover-tip-E.tipsy-se .tipsy-arrow {
11621166 margin-top: -11px;
11631167 }
11641168 .articleFeedbackv5-disable-flyover {
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js
@@ -245,12 +245,7 @@
246246 <a id="articleFeedbackv5-noteflyover-close" class="articleFeedbackv5-form-flyover-closebutton" href="#"></a>\
247247 </div>\
248248 <div class="articleFeedbackv5-form-flyover">\
249 - <div class="articleFeedbackv5-disable-flyover-help" >\
250 - <p class="articleFeedbackv5-disable-flyover-help-goto"></p>\
251 - <p>&quot;<html:msg key="disable-flyover-help-location" />&quot;</p>\
252 - <p><html:msg key="disable-flyover-help-direction" /></p>\
253 - <p>&quot;<html:msg key="disable-preference" />&quot;</p>\
254 - </div>\
 249+ <div class="articleFeedbackv5-disable-flyover-help" ></div>\
255250 <div class="articleFeedbackv5-flyover-footer">\
256251 <a class="articleFeedbackv5-disable-flyover-button" target="_blank"><html:msg key="disable-flyover-prefbutton" /></a>\
257252 </div>\
@@ -2274,10 +2269,10 @@
22752270 // and it needs to show up if the site subhead (e.g., "From Wikipedia, the free
22762271 // encyclopedia") is not visible for any reason.
22772272 if ( $( '#siteSub' ).filter( ':visible' ).length ) {
2278 - $link.prepend( ' &nbsp; | &nbsp; ' );
 2273+ $link.prepend( ' &nbsp; ' + mw.msg('pipe-separator') + ' &nbsp; ' );
22792274 $( '#siteSub' ).append( $link );
22802275 } else if ( $( 'h1.pagetitle + p.subtitle' ).filter( ':visible' ).length ) {
2281 - $link.prepend( ' &nbsp; | &nbsp; ' );
 2276+ $link.prepend( ' &nbsp; ' + mw.msg('pipe-separator') + ' &nbsp; ' );
22822277 $( 'h1.pagetitle + p.subtitle' ).append( $link );
22832278 } else if ( $( '#mw_contentholder .mw-topboxes' ).length ) {
22842279 $( '#mw_contentholder .mw-topboxes' ).after( $link );
@@ -2921,12 +2916,16 @@
29222917 var full = mw.html.escape( mw.msg( fulltext ) );
29232918 for ( var i = 1; i < arguments.length; i++ ) {
29242919 var sub = arguments[i];
2925 - var re = new RegExp("\\$" + i);
2926 - full = full.replace( re, mw.html.element(
 2920+ var re = new RegExp("\\$" + i, 'g');
 2921+ if ( sub.tag == 'quotes' ) {
 2922+ full = full.replace( re, '&quot;' + mw.msg( sub.text ) + '&quot' );
 2923+ } else {
 2924+ full = full.replace( re, mw.html.element(
29272925 'tag' in sub ? sub.tag : 'a',
29282926 $.articleFeedbackv5.attribs( sub ),
29292927 mw.msg( sub.text )
29302928 ).toString() );
 2929+ }
29312930 }
29322931 return full;
29332932 };
@@ -3549,11 +3548,17 @@
35503549 $flyover.find( '.articleFeedbackv5-disable-flyover' )
35513550 .addClass( 'articleFeedbackv5-disable-flyover-' + linkId );
35523551
3553 - $flyover.find( '.articleFeedbackv5-disable-flyover-help-goto' )
 3552+ $flyover.find( '.articleFeedbackv5-disable-flyover-help' )
35543553 .html( $.articleFeedbackv5.buildLink(
3555 - 'articlefeedbackv5-disable-flyover-help-goto', {
 3554+ 'articlefeedbackv5-disable-flyover-help', {
35563555 tag: 'strong',
35573556 text: 'articlefeedbackv5-disable-flyover-help-emphasis-text'
 3557+ }, {
 3558+ tag: 'quotes',
 3559+ text: 'articlefeedbackv5-disable-flyover-help-location',
 3560+ }, {
 3561+ tag: 'quotes',
 3562+ text: 'articlefeedbackv5-disable-preference',
35583563 } ) );
35593564
35603565 var prefLink = mw.config.get( 'wgScript' ) + '?' +
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php
@@ -147,12 +147,13 @@
148148 'articlefeedbackv5-transparency-terms-linktext',
149149 'parentheses',
150150 'articlefeedbackv5-disable-flyover-title',
151 - 'articlefeedbackv5-disable-flyover-help-goto',
 151+ 'articlefeedbackv5-disable-flyover-help',
152152 'articlefeedbackv5-disable-flyover-help-emphasis-text',
153153 'articlefeedbackv5-disable-flyover-help-location',
154154 'articlefeedbackv5-disable-flyover-help-direction',
155155 'articlefeedbackv5-disable-flyover-prefbutton',
156156 'articlefeedbackv5-disable-preference',
 157+ 'pipe-separator',
157158 ),
158159 'dependencies' => array(
159160 'jquery.appear',

Follow-up revisions

RevisionCommit summaryAuthorDate
r114333Followup to r114328; tipsy apparently dislikes tooltips without a heightrsterbin00:00, 21 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r114064Brought trigger links into the plugin itself; styled flyover panel:...rsterbin20:44, 17 March 2012
r114271Added a pipe separator, as requested in bug #34406rsterbin14:21, 20 March 2012

Status & tagging log