summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/MozReview/template/en/default/moz_review/table.html.tmpl2
-rw-r--r--extensions/MozReview/web/js/mozreview.js34
-rw-r--r--extensions/MozReview/web/style/mozreview.css5
3 files changed, 28 insertions, 13 deletions
diff --git a/extensions/MozReview/template/en/default/moz_review/table.html.tmpl b/extensions/MozReview/template/en/default/moz_review/table.html.tmpl
index 7f5c3a89d..84b7add47 100644
--- a/extensions/MozReview/template/en/default/moz_review/table.html.tmpl
+++ b/extensions/MozReview/template/en/default/moz_review/table.html.tmpl
@@ -11,7 +11,7 @@
<tr>
<th>Submitter</th>
<th>Diff</th>
- <th>Reviews</th>
+ <th>Changes</th>
<th>Open Issues</th>
<th>Last Updated</th>
</tr>
diff --git a/extensions/MozReview/web/js/mozreview.js b/extensions/MozReview/web/js/mozreview.js
index 22ef4c5f1..6fe51f53b 100644
--- a/extensions/MozReview/web/js/mozreview.js
+++ b/extensions/MozReview/web/js/mozreview.js
@@ -27,32 +27,46 @@ MozReview.getReviewRequest = function() {
return rrUrl(rrId) + 'diff/#index_header';
}
+ function humanizedInt(i) {
+ if (i > 1000) {
+ return (i / 1000).toFixed(1) + 'k';
+ } else {
+ return '' + i;
+ }
+ }
+
function rrCommitRow(rr, firstCommit) {
var trCommit = tr.clone();
var tdSubmitter = td.clone();
- var tdRev = td.clone();
var tdSummary = td.clone();
var diffLink = link.clone();
- var reviewLink = link.clone();
+ var diffStat = '';
if (firstCommit) {
tdSubmitter.text(rr.submitter);
}
+ tdSummary.addClass('mozreview-summary');
diffLink.attr('href', rrDiffUrl(rr.id));
- diffLink.text(rr.commit.substr(0, 12));
- diffLink.addClass('mozreview-diff-link');
- tdRev.append(diffLink);
+ diffLink.text(rr.summary);
+ tdSummary.append(diffLink);
- tdSummary.addClass('mozreview-summary');
- reviewLink.attr('href', rrUrl(rr.id));
- reviewLink.text(rr.summary);
- tdSummary.append(reviewLink);
+ if (rr.diff.insert > 0) {
+ diffStat = '+' + humanizedInt(rr.diff.insert);
+ }
+
+ if (rr.diff.delete > 0) {
+ if (diffStat.length > 0) {
+ diffStat += ' / ';
+ }
+ diffStat += '-' + humanizedInt(rr.diff.delete);
+ }
trCommit.append(
tdSubmitter,
- tdRev,
tdSummary,
+ td.clone().text(diffStat)
+ .addClass('mozreview-diffstat'),
td.clone().text(rr.issue_open_count)
.addClass('mozreview-open-issues'),
td.clone().text(timeAgo(new Date(rr.last_updated)))
diff --git a/extensions/MozReview/web/style/mozreview.css b/extensions/MozReview/web/style/mozreview.css
index 4a288d927..a2263fc11 100644
--- a/extensions/MozReview/web/style/mozreview.css
+++ b/extensions/MozReview/web/style/mozreview.css
@@ -50,8 +50,9 @@
text-align: center;
}
-.mozreview-diff-link {
- font-family: monospace;
+.mozreview-requests .mozreview-diffstat {
+ text-align: center;
+ white-space: nowrap;
}
/* bug-modal specific */