Commit 8d739237 authored by Fatih Acet's avatar Fatih Acet

Merge branch 'issue-note-rename' into 'master'

rename remaining issue_ prefixed files

See merge request gitlab-org/gitlab-ce!15818
parents 9e9d3313 874deb41
......@@ -15,7 +15,7 @@
import issuableStateMixin from '../mixins/issuable_state';
export default {
name: 'issueCommentForm',
name: 'commentForm',
data() {
return {
note: '',
......
......@@ -2,7 +2,7 @@
import noteEditedText from './note_edited_text.vue';
import noteAwardsList from './note_awards_list.vue';
import noteAttachment from './note_attachment.vue';
import issueNoteForm from './issue_note_form.vue';
import noteForm from './note_form.vue';
import TaskList from '../../task_list';
import autosave from '../mixins/autosave';
......@@ -29,7 +29,7 @@
noteEditedText,
noteAwardsList,
noteAttachment,
issueNoteForm,
noteForm,
},
computed: {
noteBody() {
......@@ -87,7 +87,7 @@
<div
v-html="note.note_html"
class="note-text md"></div>
<issue-note-form
<note-form
v-if="isEditing"
ref="noteForm"
@handleFormUpdate="handleFormUpdate"
......
......@@ -2,12 +2,12 @@
import { mapActions, mapGetters } from 'vuex';
import Flash from '../../flash';
import { SYSTEM_NOTE } from '../constants';
import issueNote from './issue_note.vue';
import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
import noteableNote from './noteable_note.vue';
import noteHeader from './note_header.vue';
import noteSignedOutWidget from './note_signed_out_widget.vue';
import noteEditedText from './note_edited_text.vue';
import issueNoteForm from './issue_note_form.vue';
import noteForm from './note_form.vue';
import placeholderNote from '../../vue_shared/components/notes/placeholder_note.vue';
import placeholderSystemNote from '../../vue_shared/components/notes/placeholder_system_note.vue';
import autosave from '../mixins/autosave';
......@@ -25,12 +25,12 @@
};
},
components: {
issueNote,
noteableNote,
userAvatarLink,
noteHeader,
noteSignedOutWidget,
noteEditedText,
issueNoteForm,
noteForm,
placeholderNote,
placeholderSystemNote,
},
......@@ -86,7 +86,7 @@
return placeholderNote;
}
return issueNote;
return noteableNote;
},
componentData(note) {
return note.isPlaceholderNote ? note.notes[0] : note;
......@@ -209,7 +209,7 @@
type="button"
class="js-vue-discussion-reply btn btn-text-field"
title="Add a reply">Reply...</button>
<issue-note-form
<note-form
v-if="isReplying"
save-button-title="Comment"
:discussion="note"
......
......@@ -5,7 +5,7 @@
import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
import noteHeader from './note_header.vue';
import noteActions from './note_actions.vue';
import issueNoteBody from './issue_note_body.vue';
import noteBody from './note_body.vue';
import eventHub from '../event_hub';
export default {
......@@ -26,7 +26,7 @@
userAvatarLink,
noteHeader,
noteActions,
issueNoteBody,
noteBody,
},
computed: {
...mapGetters([
......@@ -174,7 +174,7 @@
@handleDelete="deleteHandler"
/>
</div>
<issue-note-body
<note-body
:note="note"
:can-edit="note.current_user.can_edit"
:is-editing="isEditing"
......
......@@ -4,16 +4,16 @@
import Flash from '../../flash';
import store from '../stores/';
import * as constants from '../constants';
import issueNote from './issue_note.vue';
import issueDiscussion from './issue_discussion.vue';
import noteableNote from './noteable_note.vue';
import noteableDiscussion from './noteable_discussion.vue';
import systemNote from '../../vue_shared/components/notes/system_note.vue';
import issueCommentForm from './issue_comment_form.vue';
import commentForm from './comment_form.vue';
import placeholderNote from '../../vue_shared/components/notes/placeholder_note.vue';
import placeholderSystemNote from '../../vue_shared/components/notes/placeholder_system_note.vue';
import loadingIcon from '../../vue_shared/components/loading_icon.vue';
export default {
name: 'issueNotesApp',
name: 'notesApp',
props: {
noteableData: {
type: Object,
......@@ -36,10 +36,10 @@
};
},
components: {
issueNote,
issueDiscussion,
noteableNote,
noteableDiscussion,
systemNote,
issueCommentForm,
commentForm,
loadingIcon,
placeholderNote,
placeholderSystemNote,
......@@ -69,10 +69,10 @@
}
return placeholderNote;
} else if (note.individual_note) {
return note.notes[0].system ? systemNote : issueNote;
return note.notes[0].system ? systemNote : noteableNote;
}
return issueDiscussion;
return noteableDiscussion;
},
getComponentData(note) {
return note.individual_note ? note.notes[0] : note;
......@@ -87,7 +87,7 @@
.then(() => this.checkLocationHash())
.catch(() => {
this.isLoading = false;
Flash('Something went wrong while fetching issue comments. Please try again.');
Flash('Something went wrong while fetching comments. Please try again.');
});
},
initPolling() {
......@@ -147,6 +147,6 @@
/>
</ul>
<issue-comment-form />
<comment-form />
</div>
</template>
import Vue from 'vue';
import issueNotesApp from './components/issue_notes_app.vue';
import notesApp from './components/notes_app.vue';
document.addEventListener('DOMContentLoaded', () => new Vue({
el: '#js-vue-notes',
components: {
issueNotesApp,
notesApp,
},
data() {
const notesDataset = document.getElementById('js-vue-notes').dataset;
......@@ -32,7 +32,7 @@ document.addEventListener('DOMContentLoaded', () => new Vue({
};
},
render(createElement) {
return createElement('issue-notes-app', {
return createElement('notes-app', {
props: {
noteableData: this.noteableData,
notesData: this.notesData,
......
import Vue from 'vue';
import Autosize from 'autosize';
import store from '~/notes/stores';
import issueCommentForm from '~/notes/components/issue_comment_form.vue';
import issueCommentForm from '~/notes/components/comment_form.vue';
import { loggedOutnoteableData, notesDataMock, userDataMock, noteableDataMock } from '../mock_data';
import { keyboardDownEvent } from '../../issue_show/helpers';
......
import Vue from 'vue';
import issueNotesApp from '~/notes/components/issue_notes_app.vue';
import notesApp from '~/notes/components/notes_app.vue';
import service from '~/notes/services/notes_service';
import * as mockData from '../mock_data';
describe('issue_note_app', () => {
describe('note_app', () => {
let mountComponent;
let vm;
......@@ -20,7 +20,7 @@ describe('issue_note_app', () => {
};
beforeEach(() => {
const IssueNotesApp = Vue.extend(issueNotesApp);
const IssueNotesApp = Vue.extend(notesApp);
mountComponent = (data) => {
const props = data || {
......
import Vue from 'vue';
import store from '~/notes/stores';
import noteBody from '~/notes/components/issue_note_body.vue';
import noteBody from '~/notes/components/note_body.vue';
import { noteableDataMock, notesDataMock, note } from '../mock_data';
describe('issue_note_body component', () => {
......
import Vue from 'vue';
import store from '~/notes/stores';
import issueNoteForm from '~/notes/components/issue_note_form.vue';
import issueNoteForm from '~/notes/components/note_form.vue';
import { noteableDataMock, notesDataMock } from '../mock_data';
import { keyboardDownEvent } from '../../issue_show/helpers';
......
import Vue from 'vue';
import store from '~/notes/stores';
import issueDiscussion from '~/notes/components/issue_discussion.vue';
import issueDiscussion from '~/notes/components/noteable_discussion.vue';
import { noteableDataMock, discussionMock, notesDataMock } from '../mock_data';
describe('issue_discussion component', () => {
......@@ -30,7 +30,7 @@ describe('issue_discussion component', () => {
it('should render discussion header', () => {
expect(vm.$el.querySelector('.discussion-header')).toBeDefined();
expect(vm.$el.querySelectorAll('.notes li').length).toEqual(discussionMock.notes.length);
expect(vm.$el.querySelector('.notes').children.length).toEqual(discussionMock.notes.length);
});
describe('actions', () => {
......
import Vue from 'vue';
import store from '~/notes/stores';
import issueNote from '~/notes/components/issue_note.vue';
import issueNote from '~/notes/components/noteable_note.vue';
import { noteableDataMock, notesDataMock, note } from '../mock_data';
describe('issue_note', () => {
......
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