Cleanup the ApprovalTable formatting for adding a reviewer

I just didn't like the way this was presenting on screen.  The label
had a 10px left margin, shoving it over the input box by 10 pixels,
but the inpux box itself wasn't indented with any margin.  The whole
UI looked a bit getto to me when we had missing approvals and we had
the add reviewer option visible.

We now don't draw a label for the add reviewer box, but instead put
the action directly into the button.  It should be quite clear to a
user that entering a "Name or Email" and pressing "Add Reviewer" will
add another reviewer, specified by the name or email address, to this
change.

The 10px indent has also been removed, making everything line up with
the left edge of the approval table, which looks a lot more uniform.

Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-02-16 09:43:08 -08:00
parent a0bdc9a346
commit b0bf482fb5
2 changed files with 1 additions and 9 deletions

View File

@@ -70,14 +70,12 @@ public class ApprovalTable extends Composite {
addReviewer = new FlowPanel(); addReviewer = new FlowPanel();
addReviewer.setStyleName("gerrit-Change-AddReviewer"); addReviewer.setStyleName("gerrit-Change-AddReviewer");
addMemberBox = new AddMemberBox(); addMemberBox = new AddMemberBox();
addMemberBox.setAddButtonText(Util.C.approvalTableAddReviewer());
addMemberBox.addClickListener(new ClickListener() { addMemberBox.addClickListener(new ClickListener() {
public void onClick(final Widget sender) { public void onClick(final Widget sender) {
doAddReviewer(); doAddReviewer();
} }
}); });
final Label l = new Label(Util.C.approvalTableAddReviewer());
l.setStyleName("gerrit-Change-AddReviewerLabel");
addReviewer.add(l);
addReviewer.add(addMemberBox); addReviewer.add(addMemberBox);
addReviewer.setVisible(false); addReviewer.setVisible(false);

View File

@@ -615,18 +615,12 @@
margin-top: 5px; margin-top: 5px;
} }
.gerrit-Change-MissingApproval { .gerrit-Change-MissingApproval {
margin-left: 10px;
font-weight: bold; font-weight: bold;
white-space: nowrap; white-space: nowrap;
} }
.gerrit-Change-AddReviewer { .gerrit-Change-AddReviewer {
margin-top: 5px; margin-top: 5px;
}
.gerrit-Change-AddReviewerLabel {
margin-left: 10px;
font-weight: bold;
white-space: nowrap; white-space: nowrap;
} }