Commit fb7a6fe4 authored by Brandon Labuschagne's avatar Brandon Labuschagne

Merge branch '11918-notes-app' into 'master'

Took the NotesApp out of the global scope

See merge request gitlab-org/gitlab!67008
parents a639a44d 850b8bbd
......@@ -5,9 +5,12 @@ import initSortDiscussions from './sort_discussions';
import { store } from './stores';
import initTimelineToggle from './timeline';
const el = document.getElementById('js-vue-notes');
export default () => {
const el = document.getElementById('js-vue-notes');
if (!el) {
return;
}
if (el) {
// eslint-disable-next-line no-new
new Vue({
el,
......@@ -59,4 +62,4 @@ if (el) {
initDiscussionFilters(store);
initSortDiscussions(store);
initTimelineToggle(store);
}
};
......@@ -3,10 +3,10 @@ import ShortcutsIssuable from '~/behaviors/shortcuts/shortcuts_issuable';
import initIssuableSidebar from '~/init_issuable_sidebar';
import { IssuableType } from '~/issuable_show/constants';
import Issue from '~/issue';
import '~/notes/index';
import initIncidentApp from '~/issue_show/incident';
import { initIssuableApp, initIssueHeaderActions } from '~/issue_show/issue';
import { parseIssuableData } from '~/issue_show/utils/parse_data';
import initNotesApp from '~/notes/index';
import { store } from '~/notes/stores';
import initRelatedMergeRequestsApp from '~/related_merge_requests';
import initSentryErrorStackTraceApp from '~/sentry_error_stack_trace';
......@@ -14,6 +14,8 @@ import initIssuableHeaderWarning from '~/vue_shared/components/issuable/init_iss
import ZenMode from '~/zen_mode';
export default function initShowIssue() {
initNotesApp();
const initialDataEl = document.getElementById('js-issuable-app');
const { issueType, ...issuableData } = parseIssuableData(initialDataEl);
......
......@@ -2,9 +2,10 @@ import ShortcutsEpic from 'ee/behaviors/shortcuts/shortcuts_epic';
import initEpicApp from 'ee/epic/epic_bundle';
import EpicTabs from 'ee/epic/epic_tabs';
import loadAwardsHandler from '~/awards_handler';
import initNotesApp from '~/notes/index';
import ZenMode from '~/zen_mode';
import '~/notes/index';
initNotesApp();
initEpicApp();
requestIdleCallback(() => {
......
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