Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gpt
large_projects
gitlabhq1
Commits
c7d671a9
Unverified
Commit
c7d671a9
authored
6 years ago
by
Filipa Lacerda
Browse files
Options
Download
Email Patches
Plain Diff
Uses tooltip vue directive in issue card component
parent
07de43a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
app/assets/javascripts/boards/components/issue_card_inner.vue
...assets/javascripts/boards/components/issue_card_inner.vue
+8
-2
spec/javascripts/boards/issue_card_spec.js
spec/javascripts/boards/issue_card_spec.js
+2
-2
No files found.
app/assets/javascripts/boards/components/issue_card_inner.vue
View file @
c7d671a9
...
...
@@ -2,6 +2,7 @@
import
$
from
'
jquery
'
;
import
UserAvatarLink
from
'
../../vue_shared/components/user_avatar/user_avatar_link.vue
'
;
import
eventHub
from
'
../eventhub
'
;
import
tooltip
from
'
../../vue_shared/directives/tooltip
'
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
...
...
@@ -9,6 +10,9 @@
components
:
{
UserAvatarLink
,
},
directives
:
{
tooltip
,
},
props
:
{
issue
:
{
type
:
Object
,
...
...
@@ -166,9 +170,10 @@
tooltip-placement=
"bottom"
/>
<span
v-tooltip
v-if=
"shouldRenderCounter"
:title=
"assigneeCounterTooltip"
class=
"avatar-counter
has-tooltip
"
class=
"avatar-counter"
>
{{
assigneeCounterLabel
}}
</span>
...
...
@@ -179,12 +184,13 @@
class=
"board-card-footer"
>
<button
v-tooltip
v-for=
"label in issue.labels"
v-if=
"showLabel(label)"
:key=
"label.id"
:style=
"labelStyle(label)"
:title=
"label.description"
class=
"badge color-label
has-tooltip
"
class=
"badge color-label"
type=
"button"
data-container=
"body"
@
click=
"filterByLabel(label, $event)"
...
...
This diff is collapsed.
Click to expand it.
spec/javascripts/boards/issue_card_spec.js
View file @
c7d671a9
...
...
@@ -255,7 +255,7 @@ describe('Issue card component', () => {
it
(
'
renders label
'
,
()
=>
{
const
nodes
=
[];
component
.
$el
.
querySelectorAll
(
'
.badge
'
).
forEach
((
label
)
=>
{
nodes
.
push
(
label
.
title
);
nodes
.
push
(
label
.
getAttribute
(
'
data-original-
title
'
)
);
});
expect
(
...
...
@@ -265,7 +265,7 @@ describe('Issue card component', () => {
it
(
'
sets label description as title
'
,
()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
.badge
'
).
getAttribute
(
'
title
'
),
component
.
$el
.
querySelector
(
'
.badge
'
).
getAttribute
(
'
data-original-
title
'
),
).
toContain
(
label1
.
description
);
});
...
...
This diff is collapsed.
Click to expand it.
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