Commit 020da23b authored by Paul Slaughter's avatar Paul Slaughter

Revert async loading components in ide.vue

- This causes timeouts in Jest because the compilation
happens at runtime. Also the loadDeferred state is the
most significant performance boost here.
parent 08bfc7fc
<script>
import { mapActions, mapGetters, mapState } from 'vuex';
import { GlButton, GlLoadingIcon } from '@gitlab/ui';
import { __ } from '~/locale';
import {
WEBIDE_MARK_APP_START,
......@@ -9,10 +10,17 @@ import {
WEBIDE_MEASURE_BEFORE_VUE,
} from '~/performance/constants';
import { performanceMarkAndMeasure } from '~/performance/utils';
import FindFile from '~/vue_shared/components/file_finder/index.vue';
import { modalTypes } from '../constants';
import eventHub from '../eventhub';
import IdeSidebar from './ide_side_bar.vue';
import RepoEditor from './repo_editor.vue';
import ErrorMessage from './error_message.vue';
import CommitEditorHeader from './commit_sidebar/editor_header.vue';
import RepoTabs from './repo_tabs.vue';
import IdeStatusBar from './ide_status_bar.vue';
import RightPane from './panes/right.vue';
import NewModal from './new_dropdown/modal.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { measurePerformance } from '../utils';
......@@ -29,15 +37,15 @@ export default {
components: {
IdeSidebar,
RepoEditor,
'error-message': () => import('./error_message.vue'),
'gl-button': () => import('@gitlab/ui/src/components/base/button/button.vue'),
'gl-loading-icon': () => import('@gitlab/ui/src/components/base/loading_icon/loading_icon.vue'),
'commit-editor-header': () => import('./commit_sidebar/editor_header.vue'),
'repo-tabs': () => import('./repo_tabs.vue'),
'ide-status-bar': () => import('./ide_status_bar.vue'),
'find-file': () => import('~/vue_shared/components/file_finder/index.vue'),
'right-pane': () => import('./panes/right.vue'),
'new-modal': () => import('./new_dropdown/modal.vue'),
ErrorMessage,
GlButton,
GlLoadingIcon,
CommitEditorHeader,
RepoTabs,
IdeStatusBar,
FindFile,
RightPane,
NewModal,
},
mixins: [glFeatureFlagsMixin()],
data() {
......
......@@ -14,7 +14,7 @@ describe('WebIDE', () => {
let wrapper;
function createComponent({ projData = emptyProjData, state = {}, mockStubs = {} } = {}) {
function createComponent({ projData = emptyProjData, state = {} } = {}) {
const store = createStore();
store.state.currentProjectId = 'abcproject';
......@@ -31,7 +31,6 @@ describe('WebIDE', () => {
return shallowMount(ide, {
store,
localVue,
stubs: mockStubs,
});
}
......@@ -61,9 +60,6 @@ describe('WebIDE', () => {
state: {
errorMessage: null,
},
mockStubs: {
ErrorMessage,
},
});
expect(wrapper.find(ErrorMessage).exists()).toBe(false);
......@@ -76,9 +72,6 @@ describe('WebIDE', () => {
text: 'error',
},
},
mockStubs: {
ErrorMessage,
},
});
expect(wrapper.find(ErrorMessage).exists()).toBe(true);
......
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