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
d3ef21bb
Commit
d3ef21bb
authored
Apr 24, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
5c6404fd
0edd8a6e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
4 deletions
+44
-4
app/assets/javascripts/vue_shared/components/user_popover/user_popover.vue
...ripts/vue_shared/components/user_popover/user_popover.vue
+17
-4
app/assets/stylesheets/components/popover.scss
app/assets/stylesheets/components/popover.scss
+4
-0
changelogs/unreleased/60387-use-icons-in-user-popovers.yml
changelogs/unreleased/60387-use-icons-in-user-popovers.yml
+5
-0
spec/javascripts/vue_shared/components/user_popover/user_popover_spec.js
...s/vue_shared/components/user_popover/user_popover_spec.js
+18
-0
No files found.
app/assets/javascripts/vue_shared/components/user_popover/user_popover.vue
View file @
d3ef21bb
<
script
>
import
{
GlPopover
,
GlSkeletonLoading
}
from
'
@gitlab/ui
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
UserAvatarImage
from
'
../user_avatar/user_avatar_image.vue
'
;
import
{
glEmojiTag
}
from
'
../../../emoji
'
;
export
default
{
name
:
'
UserPopover
'
,
components
:
{
Icon
,
GlPopover
,
GlSkeletonLoading
,
UserAvatarImage
,
...
...
@@ -68,16 +70,27 @@ export default {
<gl-skeleton-loading
v-else
:lines=
"1"
class=
"animation-container-small mb-1"
/>
</div>
<div
class=
"text-secondary"
>
<div
v-if=
"user.bio"
class=
"js-bio"
>
{{
user
.
bio
}}
</div>
<div
v-if=
"user.organization"
class=
"js-organization"
>
{{
user
.
organization
}}
</div>
<div
v-if=
"user.bio"
class=
"js-bio d-flex mb-1"
>
<icon
name=
"profile"
css-classes=
"category-icon"
/>
<span
class=
"ml-1"
>
{{
user
.
bio
}}
</span>
</div>
<div
v-if=
"user.organization"
class=
"js-organization d-flex mb-1"
>
<icon
v-show=
"!jobInfoIsLoading"
name=
"work"
css-classes=
"category-icon"
/>
<span
class=
"ml-1"
>
{{
user
.
organization
}}
</span>
</div>
<gl-skeleton-loading
v-if=
"jobInfoIsLoading"
:lines=
"1"
class=
"animation-container-small mb-1"
/>
</div>
<div
class=
"text-secondary"
>
{{
user
.
location
}}
<div
class=
"js-location text-secondary d-flex"
>
<icon
v-show=
"!locationIsLoading && user.location"
name=
"location"
css-classes=
"category-icon"
/>
<span
class=
"ml-1"
>
{{
user
.
location
}}
</span>
<gl-skeleton-loading
v-if=
"locationIsLoading"
:lines=
"1"
...
...
app/assets/stylesheets/components/popover.scss
View file @
d3ef21bb
...
...
@@ -5,6 +5,10 @@
padding
:
$gl-padding-8
;
font-size
:
$gl-font-size-small
;
line-height
:
$gl-line-height
;
.category-icon
{
color
:
$gray-600
;
}
}
}
...
...
changelogs/unreleased/60387-use-icons-in-user-popovers.yml
0 → 100644
View file @
d3ef21bb
---
title
:
Show category icons in user popover
merge_request
:
author
:
type
:
added
spec/javascripts/vue_shared/components/user_popover/user_popover_spec.js
View file @
d3ef21bb
...
...
@@ -61,6 +61,12 @@ describe('User Popover Component', () => {
expect
(
vm
.
$el
.
textContent
).
toContain
(
DEFAULT_PROPS
.
user
.
username
);
expect
(
vm
.
$el
.
textContent
).
toContain
(
DEFAULT_PROPS
.
user
.
location
);
});
it
(
'
shows icon for location
'
,
()
=>
{
const
iconEl
=
vm
.
$el
.
querySelector
(
'
.js-location svg
'
);
expect
(
iconEl
.
querySelector
(
'
use
'
).
getAttribute
(
'
xlink:href
'
)).
toContain
(
'
location
'
);
});
});
describe
(
'
job data
'
,
()
=>
{
...
...
@@ -117,6 +123,18 @@ describe('User Popover Component', () => {
'
Me & my <funky> Company
'
,
);
});
it
(
'
shows icon for bio
'
,
()
=>
{
const
iconEl
=
vm
.
$el
.
querySelector
(
'
.js-bio svg
'
);
expect
(
iconEl
.
querySelector
(
'
use
'
).
getAttribute
(
'
xlink:href
'
)).
toContain
(
'
profile
'
);
});
it
(
'
shows icon for organization
'
,
()
=>
{
const
iconEl
=
vm
.
$el
.
querySelector
(
'
.js-organization svg
'
);
expect
(
iconEl
.
querySelector
(
'
use
'
).
getAttribute
(
'
xlink:href
'
)).
toContain
(
'
work
'
);
});
});
describe
(
'
status data
'
,
()
=>
{
...
...
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