Related Changes: Strike through abandoned changes

This makes it easy to distinguish between merged and abandoned changes.

Change-Id: I3ecc5c4cb2bf86ef9e8aae7ef0af87e54e154fec
This commit is contained in:
Stefan Beller 2015-06-18 15:52:24 -07:00
parent 7e23cd08d3
commit 03d67908ae
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,