r41907 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41906‎ | r41907 | r41908 >
Date:00:04, 10 October 2008
Author:aaron
Status:old
Tags:
Comment:
* Use scroll for wide diffs
* Don't show comment header if nothing below it
* Move stuff to css
Modified paths:
  • /trunk/extensions/CodeReview/CodeReview.php (modified) (history)
  • /trunk/extensions/CodeReview/CodeRevisionView.php (modified) (history)
  • /trunk/extensions/CodeReview/codereview.css (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeReview.php
@@ -93,7 +93,7 @@
9494 $wgSubversionProxyTimeout = 30; // default 3 secs is too short :)
9595
9696
97 -$wgCodeReviewStyleVersion = 1;
 97+$wgCodeReviewStyleVersion = 2;
9898 // The name of a repo which represents the code running on this wiki, used to highlight active revisions
9999 $wgWikiSVN = 'MediaWiki';
100100
Index: trunk/extensions/CodeReview/codereview.css
@@ -2,6 +2,11 @@
33 vertical-align: top;
44 }
55
 6+.mw-codereview-paths {
 7+ max-height:600px;
 8+ overflow:auto;
 9+}
 10+
611 .mw-codereview-comment {
712 border: solid 1px #aaaab3;
813 padding: 0px;
@@ -47,6 +52,11 @@
4853 }
4954
5055 /* Diffs */
 56+.mw-codereview-diff {
 57+ max-width:100%;
 58+ overflow:auto;
 59+}
 60+
5161 .mw-codereview-diff ins {
5262 text-decoration: none;
5363 color: green;
Index: trunk/extensions/CodeReview/CodeRevisionView.php
@@ -37,7 +37,7 @@
3838 $paths .= $this->formatPathLine( $row->cp_path, $row->cp_action );
3939 }
4040 if( $paths ){
41 - $paths = "<ul style='max-height:600px; overflow:auto;'>\n$paths</ul>\n";
 41+ $paths = "<div class='mw-codereview-paths'><ul>\n$paths</ul></div>\n";
4242 }
4343 $fields = array(
4444 'code-rev-repo' => $repoLink,
@@ -68,8 +68,10 @@
6969 wfMsg('code-rev-purge-link'), 'action=purge' ) . ']</small></h2>' .
7070 "<div class='mw-codereview-diff'>" . $diffHtml . "</div>\n";
7171 }
72 - $html .= "<h2 id='code-comments'>". wfMsgHtml( 'code-comments' ) ."</h2>\n" .
73 - $this->formatComments();
 72+ $comments = $this->formatComments();
 73+ if( $comments ) {
 74+ $html .= "<h2 id='code-comments'>". wfMsgHtml( 'code-comments' ) ."</h2>\n" . $comments;
 75+ }
7476
7577 if( $this->mReplyTarget ) {
7678 global $wgJsMimeType;

Status & tagging log