r110418 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110417‎ | r110418 | r110419 >
Date:19:22, 31 January 2012
Author:yonishostak
Status:resolved (Comments)
Tags:aft 
Comment:
AFTv5: resolve bug 34084 - BETA notice
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.css (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php
@@ -128,6 +128,7 @@
129129 'articlefeedbackv5-desc' => 'Article feedback',
130130 'articlefeedbackv5-comment-more' => 'More',
131131 'articlefeedbackv5-comment-less' => 'Less',
 132+ 'articlefeedbackv5-beta-notice' => 'Beta',
132133
133134 /* Feedback forms */
134135 /* Option 1 ("Did you find what you were looking for?") */
@@ -447,6 +448,7 @@
448449 * <code>$1</code> – URL of the confirmation link
449450 * <code>$2</code> – URL to type in the confirmation code manually.
450451 * <code>$3</code> – Confirmation code for the user to type in',
 452+ 'articlefeedbackv5-beta-notice' => 'The BETA state notice for article feedback v5',
451453 );
452454
453455 /** Afrikaans (Afrikaans)
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.css
@@ -9,6 +9,16 @@
1010 .float-clear:after {
1111 clear: both;
1212 }
 13+.articlefeedbackv5-beta-notice {
 14+ text-transform: uppercase;
 15+ color: #800;
 16+ font-size: 1.4em;
 17+ font-variant: bold;
 18+ display: block;
 19+ position: absolute;
 20+ top: 45px;
 21+ right: 0;
 22+}
1323 #articleFeedbackv5-header-wrap {
1424 margin: 0 0 10px;
1525 }
Index: trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php
@@ -158,6 +158,15 @@
159159 . Html::closeElement( 'div' )
160160 );
161161 }
 162+
 163+ // BETA notice
 164+ $out->addHTML(
 165+ Html::rawElement( 'span', array(
 166+ 'class' => 'articlefeedbackv5-beta-notice'
 167+ ), $this->msg( 'articlefeedbackv5-beta-notice' )->text() )
 168+ . Html::element( 'div', array( 'class' => 'float-clear' ) )
 169+ . Html::closeElement( 'div' )
 170+ );
162171
163172 $out->addHtml(
164173 Html::element(

Follow-up revisions

RevisionCommit summaryAuthorDate
r110420AFTv5: fix r110418yonishostak19:37, 31 January 2012

Comments

#Comment by Krinkle (talk | contribs)   19:24, 31 January 2012
+    font-variant: bold;

font-variant can only be "normal" or "small-caps". Did you mean "font-weight" ?

#Comment by Krinkle (talk | contribs)   19:27, 31 January 2012
+		
+		// BETA notice
+		$out->addHTML(
+		    Html::rawElement( 'span', array(
+			    'class' => 'articlefeedbackv5-beta-notice'
+		    ), $this->msg( 'articlefeedbackv5-beta-notice' )->text() )
+			. Html::element( 'div', array( 'class' => 'float-clear' ) )
+			. Html::closeElement( 'div' )
+		);
  • Html::rawElement, please don't output unescaped raw content. Either use Html::rawElement with $msg->escaped(), or Html::element with $msg->text(). the latter is preferred
  • Html::element() . Html::closeElement(), The closing is redundant here, this will output an additional closing tag likely affecting the page layout.

Status & tagging log