Always show "submitted together" for topicless changes

Currently we hide the "submitted together" tab to make room for "same
topic" on hosts with submitWholeTopic disabled.

On a change that does not have a topic, though, there is no need to
hide the submitted-together tab to make room and the tab contains
useful information.  Display it.

This should make it easier for people on !submitWholeTopic hosts to
get used to the change in c5993446eb (MergeOp: Operate on ChangeSets
instead of branches, 2015-06-18), which made submitting a change
automatically submit its ancestors at the same time.

Change-Id: I7c7a6759ed8285f56ccbe71b48c29e718de4a017
This commit is contained in:
Jonathan Nieder 2015-07-17 11:26:19 -07:00
parent b4e1bb858d
commit 5f6f1aa136

View File

@ -215,12 +215,8 @@ public class RelatedChanges extends TabPanel {
EnumSet.of(ListChangesOption.CURRENT_REVISION, ListChangesOption.CURRENT_COMMIT),
new TabChangeListCallback(Tab.CHERRY_PICKS, info.project(), revision));
if (Gerrit.info().change().isSubmitWholeTopicEnabled()) {
// TODO(sbeller): show only on latest revision
ChangeApi.change(info.legacyId().get()).view("submitted_together")
.get(new TabChangeListCallback(Tab.SUBMITTED_TOGETHER,
info.project(), revision));
} else if (info.topic() != null && !"".equals(info.topic())) {
if (!Gerrit.info().change().isSubmitWholeTopicEnabled()
&& info.topic() != null && !"".equals(info.topic())) {
StringBuilder topicQuery = new StringBuilder();
topicQuery.append("status:open");
topicQuery.append(" ").append(op("topic", info.topic()));
@ -230,6 +226,11 @@ public class RelatedChanges extends TabPanel {
ListChangesOption.DETAILED_LABELS,
ListChangesOption.LABELS),
new TabChangeListCallback(Tab.SAME_TOPIC, info.project(), revision));
} else {
// TODO(sbeller): show only on latest revision
ChangeApi.change(info.legacyId().get()).view("submitted_together")
.get(new TabChangeListCallback(Tab.SUBMITTED_TOGETHER,
info.project(), revision));
}
}