Add reviewer/verifier name out beside check/plus/minus
* The purpose of this change is to be able to look at the various change lists and see who reviewed, verified without clicking in. There are various reasons this is nice, you can easily see who's doing reviews, who isn't lately just by looking quickly, as well as if anyone did a review for themselves (we're a small to mid team and people have access and sometimes do this)... this compared to the title label which you need to hover to see. * A user perference has been added to allow the user to toggle this setting on/off, it defaults to off to keep existing layout Change-Id: Iae347521b7645082a1d65759198d0347502ab55d
This commit is contained in:
@@ -166,6 +166,7 @@ public interface GerritCss extends CssResource {
|
||||
String sectionHeader();
|
||||
String sideBySideScreenLinkTable();
|
||||
String sideBySideScreenSideBySideTable();
|
||||
String singleLine();
|
||||
String skipLine();
|
||||
String smallHeading();
|
||||
String sourceFilePath();
|
||||
|
||||
@@ -31,6 +31,7 @@ public interface AccountConstants extends Constants {
|
||||
String useFlashClipboard();
|
||||
String copySelfOnEmails();
|
||||
String displayPatchSetsInReverseOrder();
|
||||
String displayPersonNameInReviewCategory();
|
||||
String buttonSaveChanges();
|
||||
|
||||
String tabAccountSummary();
|
||||
|
||||
@@ -8,6 +8,7 @@ showSiteHeader = Show Site Header
|
||||
useFlashClipboard = Use Flash Clipboard Widget
|
||||
copySelfOnEmails = CC Me On Comments I Write
|
||||
displayPatchSetsInReverseOrder = Display Patch Sets In Reverse Order
|
||||
displayPersonNameInReviewCategory = Display Person Name In Review Category
|
||||
defaultContextFieldLabel = Default Context:
|
||||
maximumPageSizeFieldLabel = Maximum Page Size:
|
||||
dateFormatLabel = Date/Time Format:
|
||||
|
||||
@@ -42,6 +42,7 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
private CheckBox useFlashClipboard;
|
||||
private CheckBox copySelfOnEmails;
|
||||
private CheckBox displayPatchSetsInReverseOrder;
|
||||
private CheckBox displayPersonNameInReviewCategory;
|
||||
private ListBox maximumPageSize;
|
||||
private ListBox dateFormat;
|
||||
private ListBox timeFormat;
|
||||
@@ -76,6 +77,9 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
displayPatchSetsInReverseOrder = new CheckBox(Util.C.displayPatchSetsInReverseOrder());
|
||||
displayPatchSetsInReverseOrder.addClickHandler(onClickSave);
|
||||
|
||||
displayPersonNameInReviewCategory = new CheckBox(Util.C.displayPersonNameInReviewCategory());
|
||||
displayPersonNameInReviewCategory.addClickHandler(onClickSave);
|
||||
|
||||
maximumPageSize = new ListBox();
|
||||
for (final short v : PAGESIZE_CHOICES) {
|
||||
maximumPageSize.addItem(Util.M.rowsPerPage(v), String.valueOf(v));
|
||||
@@ -117,7 +121,7 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
dateTimePanel.add(dateFormat);
|
||||
dateTimePanel.add(timeFormat);
|
||||
}
|
||||
final Grid formGrid = new Grid(6, 2);
|
||||
final Grid formGrid = new Grid(7, 2);
|
||||
|
||||
int row = 0;
|
||||
formGrid.setText(row, labelIdx, "");
|
||||
@@ -136,6 +140,10 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
formGrid.setWidget(row, fieldIdx, displayPatchSetsInReverseOrder);
|
||||
row++;
|
||||
|
||||
formGrid.setText(row, labelIdx, "");
|
||||
formGrid.setWidget(row, fieldIdx, displayPersonNameInReviewCategory);
|
||||
row++;
|
||||
|
||||
formGrid.setText(row, labelIdx, Util.C.maximumPageSizeFieldLabel());
|
||||
formGrid.setWidget(row, fieldIdx, maximumPageSize);
|
||||
row++;
|
||||
@@ -172,6 +180,7 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
useFlashClipboard.setEnabled(on);
|
||||
copySelfOnEmails.setEnabled(on);
|
||||
displayPatchSetsInReverseOrder.setEnabled(on);
|
||||
displayPersonNameInReviewCategory.setEnabled(on);
|
||||
maximumPageSize.setEnabled(on);
|
||||
dateFormat.setEnabled(on);
|
||||
timeFormat.setEnabled(on);
|
||||
@@ -182,6 +191,7 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
useFlashClipboard.setValue(p.isUseFlashClipboard());
|
||||
copySelfOnEmails.setValue(p.isCopySelfOnEmails());
|
||||
displayPatchSetsInReverseOrder.setValue(p.isDisplayPatchSetsInReverseOrder());
|
||||
displayPersonNameInReviewCategory.setValue(p.isDisplayPersonNameInReviewCategory());
|
||||
setListBox(maximumPageSize, DEFAULT_PAGESIZE, p.getMaximumPageSize());
|
||||
setListBox(dateFormat, AccountGeneralPreferences.DateFormat.STD, //
|
||||
p.getDateFormat());
|
||||
@@ -242,6 +252,7 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
p.setUseFlashClipboard(useFlashClipboard.getValue());
|
||||
p.setCopySelfOnEmails(copySelfOnEmails.getValue());
|
||||
p.setDisplayPatchSetsInReverseOrder(displayPatchSetsInReverseOrder.getValue());
|
||||
p.setDisplayPersonNameInReviewCategory(displayPersonNameInReviewCategory.getValue());
|
||||
p.setMaximumPageSize(getListBox(maximumPageSize, DEFAULT_PAGESIZE));
|
||||
p.setDateFormat(getListBox(dateFormat,
|
||||
AccountGeneralPreferences.DateFormat.STD,
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.google.gerrit.common.data.ApprovalType;
|
||||
import com.google.gerrit.common.data.ChangeInfo;
|
||||
import com.google.gerrit.common.data.ToggleStarRequest;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.AccountGeneralPreferences;
|
||||
import com.google.gerrit.reviewdb.ApprovalCategory;
|
||||
import com.google.gerrit.reviewdb.ApprovalCategoryValue;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
@@ -46,7 +47,10 @@ import com.google.gwt.event.dom.client.KeyCodes;
|
||||
import com.google.gwt.event.dom.client.KeyPressEvent;
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.google.gwt.user.client.ui.InlineLabel;
|
||||
import com.google.gwt.user.client.ui.UIObject;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
|
||||
@@ -309,11 +313,22 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
|
||||
int col = BASE_COLUMNS;
|
||||
boolean haveReview = false;
|
||||
|
||||
boolean displayPersonNameInReviewCategory = false;
|
||||
|
||||
if (Gerrit.isSignedIn()) {
|
||||
AccountGeneralPreferences prefs = Gerrit.getUserAccount().getGeneralPreferences();
|
||||
|
||||
if (prefs.isDisplayPersonNameInReviewCategory()) {
|
||||
displayPersonNameInReviewCategory = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (final ApprovalType type : approvalTypes) {
|
||||
final PatchSetApproval ca = approvals.get(type.getCategory().getId());
|
||||
|
||||
fmt.removeStyleName(row, col, Gerrit.RESOURCES.css().negscore());
|
||||
fmt.removeStyleName(row, col, Gerrit.RESOURCES.css().posscore());
|
||||
fmt.addStyleName(row, col, Gerrit.RESOURCES.css().singleLine());
|
||||
|
||||
if (ca == null || ca.getValue() == 0) {
|
||||
table.clearCell(row, col);
|
||||
@@ -321,14 +336,38 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
|
||||
} else {
|
||||
haveReview = true;
|
||||
|
||||
final ApprovalCategoryValue acv = type.getValue(ca);
|
||||
final AccountInfo ai = aic.get(ca.getAccountId());
|
||||
|
||||
if (type.isMaxNegative(ca)) {
|
||||
table.setWidget(row, col, new Image(Gerrit.RESOURCES.redNot()));
|
||||
|
||||
if (displayPersonNameInReviewCategory) {
|
||||
FlowPanel fp = new FlowPanel();
|
||||
fp.add(new Image(Gerrit.RESOURCES.redNot()));
|
||||
fp.add(new InlineLabel(FormatUtil.name(ai)));
|
||||
table.setWidget(row, col, fp);
|
||||
} else {
|
||||
table.setWidget(row, col, new Image(Gerrit.RESOURCES.redNot()));
|
||||
}
|
||||
|
||||
} else if (type.isMaxPositive(ca)) {
|
||||
table.setWidget(row, col, new Image(Gerrit.RESOURCES.greenCheck()));
|
||||
|
||||
if (displayPersonNameInReviewCategory) {
|
||||
FlowPanel fp = new FlowPanel();
|
||||
fp.add(new Image(Gerrit.RESOURCES.greenCheck()));
|
||||
fp.add(new InlineLabel(FormatUtil.name(ai)));
|
||||
table.setWidget(row, col, fp);
|
||||
} else {
|
||||
table.setWidget(row, col, new Image(Gerrit.RESOURCES.greenCheck()));
|
||||
}
|
||||
|
||||
} else {
|
||||
String vstr = String.valueOf(ca.getValue());
|
||||
|
||||
if (displayPersonNameInReviewCategory) {
|
||||
vstr = vstr + " " + FormatUtil.name(ai);
|
||||
}
|
||||
|
||||
if (ca.getValue() > 0) {
|
||||
vstr = "+" + vstr;
|
||||
fmt.addStyleName(row, col, Gerrit.RESOURCES.css().posscore());
|
||||
@@ -338,9 +377,6 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
|
||||
table.setText(row, col, vstr);
|
||||
}
|
||||
|
||||
final ApprovalCategoryValue acv = type.getValue(ca);
|
||||
final AccountInfo ai = aic.get(ca.getAccountId());
|
||||
|
||||
// Some web browsers ignore the embedded newline; some like it;
|
||||
// so we include a space before the newline to accommodate both.
|
||||
//
|
||||
|
||||
@@ -464,7 +464,7 @@
|
||||
background: backgroundColor;
|
||||
}
|
||||
|
||||
.changeTable .activeRow,
|
||||
.changeTable .activeRow,
|
||||
.accountDashboard.changeTable .activeRow,
|
||||
.accountDashboard.changeTable .activeRow a {
|
||||
background: selectionColor;
|
||||
@@ -507,7 +507,9 @@
|
||||
.changeTable .dataCell.posscore {
|
||||
color: #08a400;
|
||||
}
|
||||
|
||||
.changeTable .dataCell.singleLine {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.changeTable .iconHeader {
|
||||
border-top: 1px solid backgroundColor;
|
||||
border-bottom: 1px solid backgroundColor;
|
||||
|
||||
Reference in New Issue
Block a user