Show in change table and user dashboard if change is not mergeable
For reviewers it's an important information if a change is mergeable since eventually it doesn't make sense to review a change that cannot be merged. This is why this information should be immediately visible in the change table and in the user dashboard. As a contributor I want to see on one look which of my open changes I have to rebase since they are not mergeable anymore. It helps me a lot to see this information in my user dashboard. Change-Id: I881452ca0f1905b7d4f0c026f98a42ac4d5f58bd Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -171,6 +171,7 @@ public interface GerritCss extends CssResource {
|
||||
String negscore();
|
||||
String noLineLineNumber();
|
||||
String noborder();
|
||||
String notMergeable();
|
||||
String notVotable();
|
||||
String outdated();
|
||||
String parentsTable();
|
||||
|
||||
@@ -48,6 +48,7 @@ public interface ChangeConstants extends Constants {
|
||||
String changeTableColumnBranch();
|
||||
String changeTableColumnLastUpdate();
|
||||
String changeTableNone();
|
||||
String changeTableNotMergeable();
|
||||
|
||||
String changeItemHelp();
|
||||
String changeTableStar();
|
||||
|
||||
@@ -28,6 +28,7 @@ changeTableColumnProject = Project
|
||||
changeTableColumnBranch = Branch
|
||||
changeTableColumnLastUpdate = Updated
|
||||
changeTableNone = (None)
|
||||
changeTableNotMergeable = Merge Conflict
|
||||
|
||||
changeItemHelp = change
|
||||
changeTableStar = Star (or unstar) change
|
||||
|
||||
@@ -206,6 +206,9 @@ public class ChangeTable2 extends NavigationTable<ChangeInfo> {
|
||||
Change.Status status = c.status();
|
||||
if (status != Change.Status.NEW) {
|
||||
table.setText(row, C_STATUS, Util.toLongString(status));
|
||||
} else if (Gerrit.getConfig().testChangeMerge() && !c.mergeable()) {
|
||||
table.setText(row, C_STATUS, Util.C.changeTableNotMergeable());
|
||||
table.getCellFormatter().addStyleName(row, C_STATUS, Gerrit.RESOURCES.css().notMergeable());
|
||||
}
|
||||
|
||||
if (c.owner() != null) {
|
||||
|
||||
@@ -543,6 +543,11 @@ a:hover {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.changeTable .notMergeable {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.accountDashboard.changeTable tr {
|
||||
color: #444444;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user