Commit 286c45ac authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch...

Merge branch '244694-replace-gldeprecatedskeletonloading-with-glskeletonloader-in-app-assets-javascripts' into 'master'

Migrate `GlDeprecatedSkeletonLoading` to `GlSkeletonLoader`

See merge request gitlab-org/gitlab!59180
parents 337e9b61 79e35725
<script> <script>
/* eslint-disable vue/no-v-html */ /* eslint-disable vue/no-v-html */
import { import { GlPopover, GlLink, GlSkeletonLoader, GlIcon } from '@gitlab/ui';
GlPopover,
GlLink,
GlDeprecatedSkeletonLoading as GlSkeletonLoading,
GlIcon,
} from '@gitlab/ui';
import UserNameWithStatus from '~/sidebar/components/assignees/user_name_with_status.vue'; import UserNameWithStatus from '~/sidebar/components/assignees/user_name_with_status.vue';
import { glEmojiTag } from '../../../emoji'; import { glEmojiTag } from '../../../emoji';
import UserAvatarImage from '../user_avatar/user_avatar_image.vue'; import UserAvatarImage from '../user_avatar/user_avatar_image.vue';
...@@ -19,7 +14,7 @@ export default { ...@@ -19,7 +14,7 @@ export default {
GlIcon, GlIcon,
GlLink, GlLink,
GlPopover, GlPopover,
GlSkeletonLoading, GlSkeletonLoader,
UserAvatarImage, UserAvatarImage,
UserNameWithStatus, UserNameWithStatus,
}, },
...@@ -65,15 +60,13 @@ export default { ...@@ -65,15 +60,13 @@ export default {
<div class="gl-p-2 flex-shrink-1"> <div class="gl-p-2 flex-shrink-1">
<user-avatar-image :img-src="user.avatarUrl" :size="60" css-classes="gl-mr-3!" /> <user-avatar-image :img-src="user.avatarUrl" :size="60" css-classes="gl-mr-3!" />
</div> </div>
<div class="gl-p-2 gl-w-full"> <div class="gl-p-2 gl-w-full gl-min-w-0">
<template v-if="userIsLoading"> <template v-if="userIsLoading">
<!-- `gl-skeleton-loading` does not support equal length lines --> <gl-skeleton-loader
<!-- This can be migrated to `gl-skeleton-loader` when https://gitlab.com/gitlab-org/gitlab-ui/-/issues/872 is completed --> :lines="$options.maxSkeletonLines"
<gl-skeleton-loading preserve-aspect-ratio="none"
v-for="n in $options.maxSkeletonLines" equal-width-lines
:key="n" :height="52"
:lines="1"
class="animation-container-small gl-mb-2"
/> />
</template> </template>
<template v-else> <template v-else>
......
---
title: Replace deprecated skeleton loader in the user popover with slightly darker SVG based skelton loader
merge_request: 59180
author:
type: other
import { GlDeprecatedSkeletonLoading as GlSkeletonLoading, GlSprintf, GlIcon } from '@gitlab/ui'; import { GlSkeletonLoader, GlSprintf, GlIcon } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { AVAILABILITY_STATUS } from '~/set_status_modal/utils'; import { AVAILABILITY_STATUS } from '~/set_status_modal/utils';
import UserNameWithStatus from '~/sidebar/components/assignees/user_name_with_status.vue'; import UserNameWithStatus from '~/sidebar/components/assignees/user_name_with_status.vue';
...@@ -52,7 +52,7 @@ describe('User Popover Component', () => { ...@@ -52,7 +52,7 @@ describe('User Popover Component', () => {
}; };
describe('when user is loading', () => { describe('when user is loading', () => {
it('displays skeleton loaders', () => { it('displays skeleton loader', () => {
createWrapper({ createWrapper({
user: { user: {
name: null, name: null,
...@@ -65,7 +65,7 @@ describe('User Popover Component', () => { ...@@ -65,7 +65,7 @@ describe('User Popover Component', () => {
}, },
}); });
expect(wrapper.findAll(GlSkeletonLoading)).toHaveLength(4); expect(wrapper.find(GlSkeletonLoader).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