Add ApprovalInfo.permittedVotingRange and updated reviewers tooltip

Add new API object VotingRangeInfo to represent continuous voting range
from min to max values.

Add VotingRangeInfo as field to ApprovalInfo, the new
field represents the range of values the approver is permitted
to vote on the label.

Updated reviewers UI tooltip to indicate the reviewers
who have maximum vote permission on the label. For example
the tooltip will show "Votable: Code-Review (+2)" if the
reviewer is permitted to vote with maximum range value for
Code-Review label. If the reviewer isn't permitted to vote
with maximum range value, but still votable for Code-Review
label the "Votable: Code-Review" will be shown.

This change will allow authors to easily verify (by API and UI)
reviewers with +2 Code-Review permission assigned for the change.

Change-Id: I47e692b82691b87eefbc2143e10b99bcf49c1d29
This commit is contained in:
Oleg Aravin
2016-10-24 12:28:56 -07:00
committed by Edwin Kempin
parent d1091dfc81
commit bf313bbbba
8 changed files with 181 additions and 17 deletions

View File

@@ -305,10 +305,20 @@ public class ChangeInfo extends JavaScriptObject {
public final native boolean hasValue() /*-{ return this.hasOwnProperty('value'); }-*/;
public final native short value() /*-{ return this.value || 0; }-*/;
public final native VotingRangeInfo permittedVotingRange() /*-{ return this.permitted_voting_range; }-*/;
protected ApprovalInfo() {
}
}
public static class VotingRangeInfo extends AccountInfo {
public final native short min() /*-{ return this.min || 0; }-*/;
public final native short max() /*-{ return this.max || 0; }-*/;
protected VotingRangeInfo() {
}
}
public static class EditInfo extends JavaScriptObject {
public final native String name() /*-{ return this.name; }-*/;
public final native String setName(String n) /*-{ this.name = n; }-*/;