Commit 4c63009b authored by Mark Florian's avatar Mark Florian Committed by David O'Regan

Fix loading icon in activity calendar

The loading icon/spinner wasn't visible, as the `spinner` CSS class was
removed in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58706.

Changelog: fixed
parent d232ccd5
...@@ -7,6 +7,7 @@ import axios from '~/lib/utils/axios_utils'; ...@@ -7,6 +7,7 @@ import axios from '~/lib/utils/axios_utils';
import { getDayName, getDayDifference } from '~/lib/utils/datetime_utility'; import { getDayName, getDayDifference } from '~/lib/utils/datetime_utility';
import { formatDate } from '~/lib/utils/datetime/date_format_utility'; import { formatDate } from '~/lib/utils/datetime/date_format_utility';
import { n__, s__, __ } from '~/locale'; import { n__, s__, __ } from '~/locale';
import { loadingIconForLegacyJS } from '~/loading_icon_for_legacy_js';
const d3 = { select }; const d3 = { select };
...@@ -24,12 +25,6 @@ const CONTRIB_LEGENDS = [ ...@@ -24,12 +25,6 @@ const CONTRIB_LEGENDS = [
{ title: __('30+ contributions'), min: 30 }, { title: __('30+ contributions'), min: 30 },
]; ];
const LOADING_HTML = `
<div class="text-center">
<div class="spinner spinner-md"></div>
</div>
`;
function getSystemDate(systemUtcOffsetSeconds) { function getSystemDate(systemUtcOffsetSeconds) {
const date = new Date(); const date = new Date();
const localUtcOffsetMinutes = 0 - date.getTimezoneOffset(); const localUtcOffsetMinutes = 0 - date.getTimezoneOffset();
...@@ -286,7 +281,9 @@ export default class ActivityCalendar { ...@@ -286,7 +281,9 @@ export default class ActivityCalendar {
this.currentSelectedDate.getDate(), this.currentSelectedDate.getDate(),
].join('-'); ].join('-');
$(this.activitiesContainer).html(LOADING_HTML); $(this.activitiesContainer)
.empty()
.append(loadingIconForLegacyJS({ size: 'lg' }));
axios axios
.get(this.calendarActivitiesPath, { .get(this.calendarActivitiesPath, {
......
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