Commit 293cc469 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch '227139-remove-performance_bar-js-from-main-js' into 'master'

Remove performance_bar JS from main.js

Closes #227139

See merge request gitlab-org/gitlab!41741
parents 2262c280 83cc1948
...@@ -31,7 +31,6 @@ import initLogoAnimation from './logo'; ...@@ -31,7 +31,6 @@ import initLogoAnimation from './logo';
import initFrequentItemDropdowns from './frequent_items'; import initFrequentItemDropdowns from './frequent_items';
import initBreadcrumbs from './breadcrumb'; import initBreadcrumbs from './breadcrumb';
import initUsagePingConsent from './usage_ping_consent'; import initUsagePingConsent from './usage_ping_consent';
import initPerformanceBar from './performance_bar';
import initSearchAutocomplete from './search_autocomplete'; import initSearchAutocomplete from './search_autocomplete';
import GlFieldErrors from './gl_field_errors'; import GlFieldErrors from './gl_field_errors';
import initUserPopovers from './user_popovers'; import initUserPopovers from './user_popovers';
...@@ -164,8 +163,6 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -164,8 +163,6 @@ document.addEventListener('DOMContentLoaded', () => {
const $document = $(document); const $document = $(document);
const bootstrapBreakpoint = bp.getBreakpointSize(); const bootstrapBreakpoint = bp.getBreakpointSize();
if (document.querySelector('#js-peek')) initPerformanceBar({ container: '#js-peek' });
initUserTracking(); initUserTracking();
initLayoutNav(); initLayoutNav();
initAlertHandler(); initAlertHandler();
......
...@@ -5,7 +5,7 @@ import axios from '~/lib/utils/axios_utils'; ...@@ -5,7 +5,7 @@ import axios from '~/lib/utils/axios_utils';
import PerformanceBarService from './services/performance_bar_service'; import PerformanceBarService from './services/performance_bar_service';
import PerformanceBarStore from './stores/performance_bar_store'; import PerformanceBarStore from './stores/performance_bar_store';
export default ({ container }) => const initPerformanceBar = ({ container }) =>
new Vue({ new Vue({
el: container, el: container,
components: { components: {
...@@ -118,3 +118,9 @@ export default ({ container }) => ...@@ -118,3 +118,9 @@ export default ({ container }) =>
}); });
}, },
}); });
document.addEventListener('DOMContentLoaded', () => {
initPerformanceBar({ container: '#js-peek' });
});
export default initPerformanceBar;
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
= yield :page_specific_javascripts = yield :page_specific_javascripts
= webpack_controller_bundle_tags = webpack_controller_bundle_tags
= webpack_bundle_tag 'performance_bar' if performance_bar_enabled?
= webpack_bundle_tag "chrome_84_icon_fix" if browser.chrome?([">=84", "<84.0.4147.125"]) || browser.edge?([">=84", "<84.0.522.59"]) = webpack_bundle_tag "chrome_84_icon_fix" if browser.chrome?([">=84", "<84.0.4147.125"]) || browser.edge?([">=84", "<84.0.522.59"])
= yield :project_javascripts = yield :project_javascripts
......
...@@ -79,6 +79,7 @@ function generateEntries() { ...@@ -79,6 +79,7 @@ function generateEntries() {
const manualEntries = { const manualEntries = {
default: defaultEntries, default: defaultEntries,
sentry: './sentry/index.js', sentry: './sentry/index.js',
performance_bar: './performance_bar/index.js',
chrome_84_icon_fix: './lib/chrome_84_icon_fix.js', chrome_84_icon_fix: './lib/chrome_84_icon_fix.js',
}; };
......
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