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
5796221b
Commit
5796221b
authored
Nov 09, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix TaskList init on update & poll
Fixed duplicate TaskList requests being made
parent
cfedc31b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
11 deletions
+10
-11
app/assets/javascripts/notes/components/comment_form.vue
app/assets/javascripts/notes/components/comment_form.vue
+0
-9
app/assets/javascripts/notes/stores/actions.js
app/assets/javascripts/notes/stores/actions.js
+5
-2
changelogs/unreleased/discussion-perf-improvement.yml
changelogs/unreleased/discussion-perf-improvement.yml
+5
-0
No files found.
app/assets/javascripts/notes/components/comment_form.vue
View file @
5796221b
...
...
@@ -6,7 +6,6 @@ import Autosize from 'autosize';
import
{
__
,
sprintf
}
from
'
~/locale
'
;
import
Flash
from
'
../../flash
'
;
import
Autosave
from
'
../../autosave
'
;
import
TaskList
from
'
../../task_list
'
;
import
{
capitalizeFirstCharacter
,
convertToCamelCase
,
...
...
@@ -146,7 +145,6 @@ export default {
});
this
.
initAutoSave
();
this
.
initTaskList
();
},
methods
:
{
...
mapActions
([
...
...
@@ -298,13 +296,6 @@ Please check your network connection and try again.`;
]);
}
},
initTaskList
()
{
return
new
TaskList
({
dataType
:
'
note
'
,
fieldName
:
'
note
'
,
selector
:
'
.notes
'
,
});
},
resizeTextarea
()
{
this
.
$nextTick
(()
=>
{
Autosize
.
update
(
this
.
$refs
.
textarea
);
...
...
app/assets/javascripts/notes/stores/actions.js
View file @
5796221b
...
...
@@ -60,12 +60,13 @@ export const deleteNote = ({ commit, dispatch }, note) =>
dispatch
(
'
updateMergeRequestWidget
'
);
});
export
const
updateNote
=
({
commit
},
{
endpoint
,
note
})
=>
export
const
updateNote
=
({
commit
,
dispatch
},
{
endpoint
,
note
})
=>
service
.
updateNote
(
endpoint
,
note
)
.
then
(
res
=>
res
.
json
())
.
then
(
res
=>
{
commit
(
types
.
UPDATE_NOTE
,
res
);
Vue
.
nextTick
(()
=>
dispatch
(
'
startTaskList
'
));
});
export
const
replyToDiscussion
=
({
commit
},
{
endpoint
,
data
})
=>
...
...
@@ -262,6 +263,8 @@ const pollSuccessCallBack = (resp, commit, state, getters, dispatch) => {
commit
(
types
.
ADD_NEW_NOTE
,
note
);
}
});
Vue
.
nextTick
(()
=>
dispatch
(
'
startTaskList
'
));
}
commit
(
types
.
SET_LAST_FETCHED_AT
,
resp
.
last_fetched_at
);
...
...
@@ -375,7 +378,7 @@ export const startTaskList = ({ dispatch }) =>
dataType
:
'
note
'
,
fieldName
:
'
note
'
,
selector
:
'
.notes .is-editable
'
,
onSuccess
:
()
=>
Vue
.
$
nextTick
(()
=>
dispatch
(
'
startTaskList
'
)),
onSuccess
:
()
=>
Vue
.
nextTick
(()
=>
dispatch
(
'
startTaskList
'
)),
});
// prevent babel-plugin-rewire from generating an invalid default during karma tests
...
...
changelogs/unreleased/discussion-perf-improvement.yml
0 → 100644
View file @
5796221b
---
title
:
Improve initial discussion rendering performance
merge_request
:
22607
author
:
type
:
changed
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