Commit 34f81f6b authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'maintenance/discussion-keyboard-navigator' into 'master'

Rename the DiscussionKeyboardNavigator to DiscussionNavigator

See merge request gitlab-org/gitlab!37644
parents 462cc755 a6ef2796
......@@ -3,7 +3,7 @@ import Vue from 'vue';
import { mapActions, mapState, mapGetters } from 'vuex';
import store from '~/mr_notes/stores';
import notesApp from '../notes/components/notes_app.vue';
import discussionKeyboardNavigator from '../notes/components/discussion_keyboard_navigator.vue';
import discussionNavigator from '../notes/components/discussion_navigator.vue';
import initWidget from '../vue_merge_request_widget';
import { parseBoolean } from '~/lib/utils/common_utils';
......@@ -71,11 +71,11 @@ export default () => {
},
},
render(createElement) {
// NOTE: Even though `discussionKeyboardNavigator` is added to the `notes-app`,
// NOTE: Even though `discussionNavigator` is added to the `notes-app`,
// it adds a global key listener so it works on the diffs tab as well.
// If we create a single Vue app for all of the MR tabs, we should move this
// up the tree, to the root.
return createElement(discussionKeyboardNavigator, [
return createElement(discussionNavigator, [
createElement('notes-app', {
props: {
noteableData: this.noteableData,
......
......@@ -2,10 +2,10 @@
import 'mousetrap';
import Vue from 'vue';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import DiscussionKeyboardNavigator from '~/notes/components/discussion_keyboard_navigator.vue';
import DiscussionNavigator from '~/notes/components/discussion_navigator.vue';
import eventHub from '~/notes/event_hub';
describe('notes/components/discussion_keyboard_navigator', () => {
describe('notes/components/discussion_navigator', () => {
const localVue = createLocalVue();
let wrapper;
......@@ -13,7 +13,7 @@ describe('notes/components/discussion_keyboard_navigator', () => {
let jumpToPreviousDiscussion;
const createComponent = () => {
wrapper = shallowMount(DiscussionKeyboardNavigator, {
wrapper = shallowMount(DiscussionNavigator, {
mixins: [
localVue.extend({
methods: {
......@@ -43,7 +43,7 @@ describe('notes/components/discussion_keyboard_navigator', () => {
beforeEach(() => {
onSpy = jest.spyOn(eventHub, '$on');
vm = new (Vue.extend(DiscussionKeyboardNavigator))();
vm = new (Vue.extend(DiscussionNavigator))();
});
it('listens for jumpToFirstUnresolvedDiscussion events', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment