summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Knox <psimyn@gmail.com>2017-07-25 21:02:17 +1000
committerSimon Knox <psimyn@gmail.com>2017-07-27 20:46:53 +1000
commit9b9c86787a009c420536c65aecfa5823af88f665 (patch)
treec22ce299d3b9e0eee87900b80fb725c79a3fc21b
parentd95e6da0d582cd4b0d333b3b6a1bfa3a565b874e (diff)
downloadgitlab-ce-9b9c86787a009c420536c65aecfa5823af88f665.tar.gz
fix Jump to next discussion35232-next-unresolved
Notes tab was renamed to show, was previously overridden in merge_request_tabs.js
-rw-r--r--app/assets/javascripts/diff_notes/components/jump_to_discussion.js10
-rw-r--r--changelogs/unreleased/35232-next-unresolved.yml4
2 files changed, 9 insertions, 5 deletions
diff --git a/app/assets/javascripts/diff_notes/components/jump_to_discussion.js b/app/assets/javascripts/diff_notes/components/jump_to_discussion.js
index 37ddca29e71..298f737a2bc 100644
--- a/app/assets/javascripts/diff_notes/components/jump_to_discussion.js
+++ b/app/assets/javascripts/diff_notes/components/jump_to_discussion.js
@@ -94,7 +94,7 @@ const JumpToDiscussion = Vue.extend({
hasDiscussionsToJumpTo = false;
}
}
- } else if (activeTab !== 'notes') {
+ } else if (activeTab !== 'show') {
// If we are on the commits or builds tabs,
// there are no discussions to jump to.
hasDiscussionsToJumpTo = false;
@@ -103,12 +103,12 @@ const JumpToDiscussion = Vue.extend({
if (!hasDiscussionsToJumpTo) {
// If there are no discussions to jump to on the current page,
// switch to the notes tab and jump to the first disucssion there.
- window.mrTabs.activateTab('notes');
- activeTab = 'notes';
+ window.mrTabs.activateTab('show');
+ activeTab = 'show';
jumpToFirstDiscussion = true;
}
- if (activeTab === 'notes') {
+ if (activeTab === 'show') {
discussionsSelector = '.discussion[data-discussion-id]';
discussionIdsInScope = discussionIdsForElements($(discussionsSelector));
}
@@ -156,7 +156,7 @@ const JumpToDiscussion = Vue.extend({
let $target = $(`${discussionsSelector}[data-discussion-id="${nextUnresolvedDiscussionId}"]`);
- if (activeTab === 'notes') {
+ if (activeTab === 'show') {
$target = $target.closest('.note-discussion');
// If the next discussion is closed, toggle it open.
diff --git a/changelogs/unreleased/35232-next-unresolved.yml b/changelogs/unreleased/35232-next-unresolved.yml
new file mode 100644
index 00000000000..45f3fb429a8
--- /dev/null
+++ b/changelogs/unreleased/35232-next-unresolved.yml
@@ -0,0 +1,4 @@
+---
+title: fix jump to next discussion button
+merge_request:
+author: