From f549aa70c11e78336bc3cf9a15fa46fba1e8bb58 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Wed, 21 Jan 2015 20:39:28 +0100 Subject: [PATCH] InlineEdit: Rename 'Edit' button in comment box to 'Fix' Naming the button to switch to the edit screen 'Edit' was a bad choice since for draft comments there was already an 'Edit' button to edit the draft comment. Having two 'Edit' buttons with different actions was confusing. In addition the 'Fix' button is moved to the end of the line to keep the focus on the 'Reply' button, since the main purpose of the diff screen is reviewing changes and commenting on them. Change-Id: I09b928a46d5f4cfeb2dc715fe13fadb755801050 --- .../gerrit/client/diff/PublishedBox.java | 24 +++++++++---------- .../gerrit/client/diff/PublishedBox.ui.xml | 10 ++++---- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/PublishedBox.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/PublishedBox.java index 7d71564053..5e796835a0 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/PublishedBox.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/PublishedBox.java @@ -59,9 +59,9 @@ class PublishedBox extends CommentBox { @UiField Element date; @UiField Element message; @UiField Element buttons; - @UiField Button edit; @UiField Button reply; @UiField Button done; + @UiField Button fix; @UiField(provided = true) AvatarImage avatar; @@ -156,17 +156,6 @@ class PublishedBox extends CommentBox { } } - @UiHandler("edit") - void onEdit(ClickEvent e) { - e.stopPropagation(); - String t = Dispatcher.toEditScreen(psId, comment.path(), comment.line()); - if (!Gerrit.isSignedIn()) { - Gerrit.doSignIn(t); - } else { - Gerrit.display(t); - } - } - @UiHandler("reply") void onReply(ClickEvent e) { e.stopPropagation(); @@ -197,6 +186,17 @@ class PublishedBox extends CommentBox { } } + @UiHandler("fix") + void onFix(ClickEvent e) { + e.stopPropagation(); + String t = Dispatcher.toEditScreen(psId, comment.path(), comment.line()); + if (!Gerrit.isSignedIn()) { + Gerrit.doSignIn(t); + } else { + Gerrit.display(t); + } + } + private static String authorName(CommentInfo info) { if (info.author() != null) { if (info.author().name() != null) { diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/PublishedBox.ui.xml b/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/PublishedBox.ui.xml index b3a3d2ed6b..4495102bfc 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/PublishedBox.ui.xml +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/PublishedBox.ui.xml @@ -56,11 +56,6 @@ limitations under the License.