Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a6ef2796
Commit
a6ef2796
authored
Jul 22, 2020
by
Thomas Randolph
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename the DiscussionKeyboardNavigator to DiscussionNavigator
parent
7a5db690
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
app/assets/javascripts/mr_notes/init_notes.js
app/assets/javascripts/mr_notes/init_notes.js
+3
-3
app/assets/javascripts/notes/components/discussion_navigator.vue
...ets/javascripts/notes/components/discussion_navigator.vue
+0
-0
spec/frontend/notes/components/discussion_navigator_spec.js
spec/frontend/notes/components/discussion_navigator_spec.js
+4
-4
No files found.
app/assets/javascripts/mr_notes/init_notes.js
View file @
a6ef2796
...
@@ -3,7 +3,7 @@ import Vue from 'vue';
...
@@ -3,7 +3,7 @@ import Vue from 'vue';
import
{
mapActions
,
mapState
,
mapGetters
}
from
'
vuex
'
;
import
{
mapActions
,
mapState
,
mapGetters
}
from
'
vuex
'
;
import
store
from
'
~/mr_notes/stores
'
;
import
store
from
'
~/mr_notes/stores
'
;
import
notesApp
from
'
../notes/components/notes_app.vue
'
;
import
notesApp
from
'
../notes/components/notes_app.vue
'
;
import
discussion
KeyboardNavigator
from
'
../notes/components/discussion_keyboard
_navigator.vue
'
;
import
discussion
Navigator
from
'
../notes/components/discussion
_navigator.vue
'
;
import
initWidget
from
'
../vue_merge_request_widget
'
;
import
initWidget
from
'
../vue_merge_request_widget
'
;
export
default
()
=>
{
export
default
()
=>
{
...
@@ -69,11 +69,11 @@ export default () => {
...
@@ -69,11 +69,11 @@ export default () => {
},
},
},
},
render
(
createElement
)
{
render
(
createElement
)
{
// NOTE: Even though `discussion
Keyboard
Navigator` 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.
// 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
// If we create a single Vue app for all of the MR tabs, we should move this
// up the tree, to the root.
// up the tree, to the root.
return
createElement
(
discussion
Keyboard
Navigator
,
[
return
createElement
(
discussionNavigator
,
[
createElement
(
'
notes-app
'
,
{
createElement
(
'
notes-app
'
,
{
props
:
{
props
:
{
noteableData
:
this
.
noteableData
,
noteableData
:
this
.
noteableData
,
...
...
app/assets/javascripts/notes/components/discussion_
keyboard_
navigator.vue
→
app/assets/javascripts/notes/components/discussion_navigator.vue
View file @
a6ef2796
File moved
spec/frontend/notes/components/discussion_
keyboard_
navigator_spec.js
→
spec/frontend/notes/components/discussion_navigator_spec.js
View file @
a6ef2796
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
import
'
mousetrap
'
;
import
'
mousetrap
'
;
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
Discussion
KeyboardNavigator
from
'
~/notes/components/discussion_keyboard
_navigator.vue
'
;
import
Discussion
Navigator
from
'
~/notes/components/discussion
_navigator.vue
'
;
import
eventHub
from
'
~/notes/event_hub
'
;
import
eventHub
from
'
~/notes/event_hub
'
;
describe
(
'
notes/components/discussion_
keyboard_
navigator
'
,
()
=>
{
describe
(
'
notes/components/discussion_navigator
'
,
()
=>
{
const
localVue
=
createLocalVue
();
const
localVue
=
createLocalVue
();
let
wrapper
;
let
wrapper
;
...
@@ -13,7 +13,7 @@ describe('notes/components/discussion_keyboard_navigator', () => {
...
@@ -13,7 +13,7 @@ describe('notes/components/discussion_keyboard_navigator', () => {
let
jumpToPreviousDiscussion
;
let
jumpToPreviousDiscussion
;
const
createComponent
=
()
=>
{
const
createComponent
=
()
=>
{
wrapper
=
shallowMount
(
Discussion
Keyboard
Navigator
,
{
wrapper
=
shallowMount
(
DiscussionNavigator
,
{
mixins
:
[
mixins
:
[
localVue
.
extend
({
localVue
.
extend
({
methods
:
{
methods
:
{
...
@@ -43,7 +43,7 @@ describe('notes/components/discussion_keyboard_navigator', () => {
...
@@ -43,7 +43,7 @@ describe('notes/components/discussion_keyboard_navigator', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
onSpy
=
jest
.
spyOn
(
eventHub
,
'
$on
'
);
onSpy
=
jest
.
spyOn
(
eventHub
,
'
$on
'
);
vm
=
new
(
Vue
.
extend
(
Discussion
Keyboard
Navigator
))();
vm
=
new
(
Vue
.
extend
(
DiscussionNavigator
))();
});
});
it
(
'
listens for jumpToFirstUnresolvedDiscussion events
'
,
()
=>
{
it
(
'
listens for jumpToFirstUnresolvedDiscussion events
'
,
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment