Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/notes/components/comment_form.vue')
-rw-r--r--app/assets/javascripts/notes/components/comment_form.vue14
1 files changed, 8 insertions, 6 deletions
diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue
index cba0f960c00..c6d94a3b7b7 100644
--- a/app/assets/javascripts/notes/components/comment_form.vue
+++ b/app/assets/javascripts/notes/components/comment_form.vue
@@ -16,11 +16,12 @@ import { sprintf } from '~/locale';
import MarkdownEditor from '~/vue_shared/components/markdown/markdown_editor.vue';
import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
+import { trackSavedUsingEditor } from '~/vue_shared/components/markdown/tracking';
import * as constants from '../constants';
import eventHub from '../event_hub';
import { COMMENT_FORM } from '../i18n';
-import { getErrorMessages } from '../utils';
+import { createNoteErrorMessages } from '../utils';
import issuableStateMixin from '../mixins/issuable_state';
import CommentFieldLayout from './comment_field_layout.vue';
@@ -146,9 +147,6 @@ export default {
markdownDocsPath() {
return this.getNotesData.markdownDocsPath;
},
- quickActionsDocsPath() {
- return this.getNotesData.quickActionsDocsPath;
- },
markdownPreviewPath() {
return this.getNoteableData.preview_note_path;
},
@@ -219,7 +217,7 @@ export default {
'toggleIssueLocalState',
]),
handleSaveError({ data, status }) {
- this.errors = getErrorMessages(data, status);
+ this.errors = createNoteErrorMessages(data, status);
},
handleSaveDraft() {
this.handleSave({ isDraft: true });
@@ -258,6 +256,11 @@ export default {
this.isSubmitting = true;
+ trackSavedUsingEditor(
+ this.$refs.markdownEditor.isContentEditorActive,
+ `${this.noteableType}_${this.noteType}`,
+ );
+
this.saveNote(noteData)
.then(() => {
this.restartPolling();
@@ -366,7 +369,6 @@ export default {
:render-markdown-path="markdownPreviewPath"
:markdown-docs-path="markdownDocsPath"
:add-spacing-classes="false"
- :quick-actions-docs-path="quickActionsDocsPath"
:form-field-props="formFieldProps"
:autosave-key="autosaveKey"
:disabled="isSubmitting"