Merge "Related Changes: Strike through abandoned changes"

This commit is contained in:
Edwin Kempin 2015-06-19 07:18:21 +00:00 committed by Gerrit Code Review
commit f5fa310691
4 changed files with 16 additions and 2 deletions

View File

@ -544,6 +544,11 @@ the commit was done on `branch-a`, but was then pushed to
`refs/for/branch-b`.
A black dot is also present if the change was abandoned.
** [[closed-ancestor-abandoned]]Strikethrough Subject:
+
When the commit is abandoned, its subject line will be striked
through.
+
image::images/user-review-ui-change-screen-related-changes-indicators.png[width=800, link="images/user-review-ui-change-screen-related-changes-indicators.png"]

View File

@ -59,6 +59,7 @@ public class RelatedChanges extends TabPanel {
String pointer();
String row();
String subject();
String strikedSubject();
String submittable();
String tabPanel();
}

View File

@ -20,6 +20,7 @@ import com.google.gerrit.client.changes.ChangeInfo.CommitInfo;
import com.google.gerrit.client.changes.Util;
import com.google.gerrit.client.config.GitwebInfo;
import com.google.gerrit.common.PageLinks;
import com.google.gerrit.reviewdb.client.Change;
import com.google.gerrit.reviewdb.client.PatchSet;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.JsArray;
@ -280,7 +281,11 @@ class RelatedChangesTab implements IsWidget {
sb.append(POINTER_HTML);
sb.closeSpan();
if (info.status() == Change.Status.ABANDONED) {
sb.openSpan().setStyleName(RelatedChanges.R.css().strikedSubject());
} else {
sb.openSpan().setStyleName(RelatedChanges.R.css().subject());
}
String url = url();
if (url != null) {
sb.openAnchor().setAttribute("href", url);

View File

@ -38,13 +38,16 @@
visibility: hidden;
}
.subject {
.subject, .strikedSubject {
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 355px;
}
.strikedSubject {
text-decoration: line-through;
}
.tabPanel .gwt-TabBarItem,
.tabPanel .gwt-TabBarItem-selected,