diff options
author | Phil Hughes <me@iamphill.com> | 2018-10-25 18:51:00 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-11-09 12:55:37 +0300 |
commit | cfedc31b7a2595922e0aa19bf63a679fe0bd6669 (patch) | |
tree | 3190c05d8993f7a08e8040568bb2b84365c4bd18 /app/assets/javascripts/notes/components/note_body.vue | |
parent | ef58a64039c517be7df08eef1b3a7af7ad5eab16 (diff) |
Improve initial rendering of discussion notes
This improves the initial rendering performance of notes
by only creating a new TaskList for the whole app,
rather than on a per-note component basis.
Diffstat (limited to 'app/assets/javascripts/notes/components/note_body.vue')
-rw-r--r-- | app/assets/javascripts/notes/components/note_body.vue | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/app/assets/javascripts/notes/components/note_body.vue b/app/assets/javascripts/notes/components/note_body.vue index cf4c35de42c..9375627359c 100644 --- a/app/assets/javascripts/notes/components/note_body.vue +++ b/app/assets/javascripts/notes/components/note_body.vue @@ -4,7 +4,6 @@ import noteEditedText from './note_edited_text.vue'; import noteAwardsList from './note_awards_list.vue'; import noteAttachment from './note_attachment.vue'; import noteForm from './note_form.vue'; -import TaskList from '../../task_list'; import autosave from '../mixins/autosave'; export default { @@ -37,14 +36,12 @@ export default { }, mounted() { this.renderGFM(); - this.initTaskList(); if (this.isEditing) { this.initAutoSave(this.note); } }, updated() { - this.initTaskList(); this.renderGFM(); if (this.isEditing) { @@ -59,15 +56,6 @@ export default { renderGFM() { $(this.$refs['note-body']).renderGFM(); }, - initTaskList() { - if (this.canEdit) { - this.taskList = new TaskList({ - dataType: 'note', - fieldName: 'note', - selector: '.notes', - }); - } - }, handleFormUpdate(note, parentElement, callback) { this.$emit('handleFormUpdate', note, parentElement, callback); }, |