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