Submit: Eliminate confusing error message

People complained the error message "Clicking the button would fail for
other changes" is not helpful, which is true, because the error message
describes the problem in a generic way and doesn't give any hints on how
to solve the problem.

Once we introduced the submitWholeTopic feature we thought about it as
"clicking submit" in rapid succession for different changes bundled
together via the topic. This mental model is outdated by now and doesn't
help the user recognize what is wrong. So rename the tooltip such that
it includes a pointer to the submitted together tab, which would be the
first step in debugging the problem.

Also rename the constant in the code to be more appropriate.

Change-Id: I25afc7201babfc11cef83476452aa56221f78805
Signed-off-by: Stefan Beller <sbeller@google.com>
This commit is contained in:
Stefan Beller
2016-02-18 16:25:57 -08:00
committed by David Pursehouse
parent 126af24dd5
commit 2c4dfaa237
2 changed files with 4 additions and 4 deletions

View File

@@ -103,7 +103,7 @@ public class ActionsIT extends AbstractDaemonTest {
assertThat(info.label).isEqualTo("Submit whole topic");
assertThat(info.method).isEqualTo("POST");
assertThat(info.title).isEqualTo(
"Clicking the button would fail for other changes");
"See the \"Submitted Together\" tab for problems");
} else {
noSubmitWholeTopicAssertions(actions, 1);
}

View File

@@ -91,8 +91,8 @@ public class Submit implements RestModifyView<RevisionResource, SubmitInput>,
"This change depends on other hidden changes which are not ready";
private static final String CLICK_FAILURE_TOOLTIP =
"Clicking the button would fail";
private static final String CLICK_FAILURE_OTHER_TOOLTIP =
"Clicking the button would fail for other changes";
private static final String CHANGES_NOT_MERGEABLE =
"See the \"Submitted Together\" tab for problems";
public static class Output {
transient Change change;
@@ -245,7 +245,7 @@ public class Submit implements RestModifyView<RevisionResource, SubmitInput>,
if (csIsMergeable == null) {
return CLICK_FAILURE_TOOLTIP;
} else if (!csIsMergeable) {
return CLICK_FAILURE_OTHER_TOOLTIP;
return CHANGES_NOT_MERGEABLE;
}
} catch (ResourceConflictException e) {
return BLOCKED_SUBMIT_TOOLTIP;