Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
79e35725
Commit
79e35725
authored
Apr 13, 2021
by
peterhegman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate `GlDeprecatedSkeletonLoading` to `GlSkeletonLoader`
In user popover
parent
e5dfb288
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
18 deletions
+16
-18
app/assets/javascripts/vue_shared/components/user_popover/user_popover.vue
...ripts/vue_shared/components/user_popover/user_popover.vue
+8
-15
changelogs/unreleased/244694-replace-gldeprecatedskeletonloading-with-glskeletonloader-in-app-a.yml
...recatedskeletonloading-with-glskeletonloader-in-app-a.yml
+5
-0
spec/frontend/vue_shared/components/user_popover/user_popover_spec.js
...d/vue_shared/components/user_popover/user_popover_spec.js
+3
-3
No files found.
app/assets/javascripts/vue_shared/components/user_popover/user_popover.vue
View file @
79e35725
<
script
>
/* eslint-disable vue/no-v-html */
import
{
GlPopover
,
GlLink
,
GlDeprecatedSkeletonLoading
as
GlSkeletonLoading
,
GlIcon
,
}
from
'
@gitlab/ui
'
;
import
{
GlPopover
,
GlLink
,
GlSkeletonLoader
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
UserNameWithStatus
from
'
~/sidebar/components/assignees/user_name_with_status.vue
'
;
import
{
glEmojiTag
}
from
'
../../../emoji
'
;
import
UserAvatarImage
from
'
../user_avatar/user_avatar_image.vue
'
;
...
...
@@ -19,7 +14,7 @@ export default {
GlIcon
,
GlLink
,
GlPopover
,
GlSkeletonLoad
ing
,
GlSkeletonLoad
er
,
UserAvatarImage
,
UserNameWithStatus
,
},
...
...
@@ -65,15 +60,13 @@ export default {
<div
class=
"gl-p-2 flex-shrink-1"
>
<user-avatar-image
:img-src=
"user.avatarUrl"
:size=
"60"
css-classes=
"gl-mr-3!"
/>
</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"
>
<!-- `gl-skeleton-loading` does not support equal length lines -->
<!-- This can be migrated to `gl-skeleton-loader` when https://gitlab.com/gitlab-org/gitlab-ui/-/issues/872 is completed -->
<gl-skeleton-loading
v-for=
"n in $options.maxSkeletonLines"
:key=
"n"
:lines=
"1"
class=
"animation-container-small gl-mb-2"
<gl-skeleton-loader
:lines=
"$options.maxSkeletonLines"
preserve-aspect-ratio=
"none"
equal-width-lines
:height=
"52"
/>
</
template
>
<
template
v-else
>
...
...
changelogs/unreleased/244694-replace-gldeprecatedskeletonloading-with-glskeletonloader-in-app-a.yml
0 → 100644
View file @
79e35725
---
title
:
Replace deprecated skeleton loader in the user popover with slightly darker SVG based skelton loader
merge_request
:
59180
author
:
type
:
other
spec/frontend/vue_shared/components/user_popover/user_popover_spec.js
View file @
79e35725
import
{
Gl
DeprecatedSkeletonLoading
as
GlSkeletonLoading
,
GlSprintf
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
Gl
SkeletonLoader
,
GlSprintf
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
AVAILABILITY_STATUS
}
from
'
~/set_status_modal/utils
'
;
import
UserNameWithStatus
from
'
~/sidebar/components/assignees/user_name_with_status.vue
'
;
...
...
@@ -52,7 +52,7 @@ describe('User Popover Component', () => {
};
describe
(
'
when user is loading
'
,
()
=>
{
it
(
'
displays skeleton loader
s
'
,
()
=>
{
it
(
'
displays skeleton loader
'
,
()
=>
{
createWrapper
({
user
:
{
name
:
null
,
...
...
@@ -65,7 +65,7 @@ describe('User Popover Component', () => {
},
});
expect
(
wrapper
.
find
All
(
GlSkeletonLoading
)).
toHaveLength
(
4
);
expect
(
wrapper
.
find
(
GlSkeletonLoader
).
exists
()).
toBe
(
true
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment