Commit 7bad3935 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch...

Merge branch '262466-move-handlers-outside-of-domcontentloaded-app-assets-javascripts-pages-projects' into 'master'

Move handlers outside of DOMContentLoaded for MR List + Show

See merge request gitlab-org/gitlab!45403
parents bff5db6c 5a89ed1d
...@@ -7,16 +7,15 @@ import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered ...@@ -7,16 +7,15 @@ import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered
import { FILTERED_SEARCH } from '~/pages/constants'; import { FILTERED_SEARCH } from '~/pages/constants';
import { ISSUABLE_INDEX } from '~/pages/projects/constants'; import { ISSUABLE_INDEX } from '~/pages/projects/constants';
document.addEventListener('DOMContentLoaded', () => { new IssuableIndex(ISSUABLE_INDEX.MERGE_REQUEST); // eslint-disable-line no-new
addExtraTokensForMergeRequests(IssuableFilteredSearchTokenKeys);
initFilteredSearch({ addExtraTokensForMergeRequests(IssuableFilteredSearchTokenKeys);
page: FILTERED_SEARCH.MERGE_REQUESTS,
filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys,
useDefaultState: true,
});
new IssuableIndex(ISSUABLE_INDEX.MERGE_REQUEST); // eslint-disable-line no-new initFilteredSearch({
new ShortcutsNavigation(); // eslint-disable-line no-new page: FILTERED_SEARCH.MERGE_REQUESTS,
new UsersSelect(); // eslint-disable-line no-new filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys,
useDefaultState: true,
}); });
new UsersSelect(); // eslint-disable-line no-new
new ShortcutsNavigation(); // eslint-disable-line no-new
...@@ -5,12 +5,10 @@ import initShow from '../init_merge_request_show'; ...@@ -5,12 +5,10 @@ import initShow from '../init_merge_request_show';
import initIssuableHeaderWarning from '~/vue_shared/components/issuable/init_issuable_header_warning'; import initIssuableHeaderWarning from '~/vue_shared/components/issuable/init_issuable_header_warning';
import store from '~/mr_notes/stores'; import store from '~/mr_notes/stores';
document.addEventListener('DOMContentLoaded', () => { initShow();
initShow(); if (gon.features && !gon.features.vueIssuableSidebar) {
if (gon.features && !gon.features.vueIssuableSidebar) { initSidebarBundle();
initSidebarBundle(); }
} initMrNotes();
initMrNotes(); initReviewBar();
initReviewBar(); initIssuableHeaderWarning(store);
initIssuableHeaderWarning(store);
});
...@@ -6,16 +6,14 @@ import store from '~/mr_notes/stores'; ...@@ -6,16 +6,14 @@ import store from '~/mr_notes/stores';
import initIssuableHeaderWarning from '~/vue_shared/components/issuable/init_issuable_header_warning'; import initIssuableHeaderWarning from '~/vue_shared/components/issuable/init_issuable_header_warning';
import initShow from '~/pages/projects/merge_requests/init_merge_request_show'; import initShow from '~/pages/projects/merge_requests/init_merge_request_show';
document.addEventListener('DOMContentLoaded', () => { initShow();
initShow(); if (gon.features && !gon.features.vueIssuableSidebar) {
if (gon.features && !gon.features.vueIssuableSidebar) { initSidebarBundle();
initSidebarBundle(); }
} initMrNotes();
initMrNotes(); initReviewBar();
initReviewBar(); initIssuableHeaderWarning(store);
initIssuableHeaderWarning(store);
const assigneeDropdown = document.querySelector('.js-sidebar-assignee-dropdown'); const assigneeDropdown = document.querySelector('.js-sidebar-assignee-dropdown');
if (assigneeDropdown) trackShowInviteMemberLink(assigneeDropdown); if (assigneeDropdown) trackShowInviteMemberLink(assigneeDropdown);
});
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