Commit c1a3d9b6 authored by Tim Zallmann's avatar Tim Zallmann

Performance Improvements for the Epic View

StartupJS Loading of Epic Discussions
Better Init
Removed double rendering
parent f3c9c0e1
......@@ -3,6 +3,7 @@ import { GlIcon, GlIntersectionObserver } from '@gitlab/ui';
import Visibility from 'visibilityjs';
import { __, s__, sprintf } from '~/locale';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { sanitize } from '~/lib/dompurify';
import { visitUrl } from '~/lib/utils/url_utility';
import Poll from '~/lib/utils/poll';
import eventHub from '../event_hub';
......@@ -178,7 +179,7 @@ export default {
const store = new Store({
titleHtml: this.initialTitleHtml,
titleText: this.initialTitleText,
descriptionHtml: this.initialDescriptionHtml,
descriptionHtml: sanitize(this.initialDescriptionHtml),
descriptionText: this.initialDescriptionText,
updatedAt: this.updatedAt,
updatedByName: this.updatedByName,
......
......@@ -5,8 +5,11 @@ import ZenMode from '~/zen_mode';
import '~/notes/index';
import loadAwardsHandler from '~/awards_handler';
new ZenMode(); // eslint-disable-line no-new
initEpicApp();
new ShortcutsEpic(); // eslint-disable-line no-new
new EpicTabs(); // eslint-disable-line no-new
loadAwardsHandler();
requestIdleCallback(() => {
new EpicTabs(); // eslint-disable-line no-new
new ShortcutsEpic(); // eslint-disable-line no-new
loadAwardsHandler();
new ZenMode(); // eslint-disable-line no-new
});
......@@ -19,6 +19,8 @@
- add_page_specific_style 'page_bundles/epics'
- add_page_specific_style 'page_bundles/roadmap'
- add_page_startup_api_call discussions_path(@epic)
#epic-app-root{ data: epic_show_app_data(@epic),
'data-allow-sub-epics' => allow_sub_epics }
......
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