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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
c543970d
Commit
c543970d
authored
Aug 08, 2017
by
Regis Boudinot
Committed by
Jacob Schatz
Aug 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show all labels
parent
fd40bce9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
22 deletions
+35
-22
app/assets/javascripts/boards/components/issue_card_inner.js
app/assets/javascripts/boards/components/issue_card_inner.js
+2
-3
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+2
-0
app/views/projects/boards/components/_board.html.haml
app/views/projects/boards/components/_board.html.haml
+10
-2
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+2
-2
spec/features/boards/sidebar_spec.rb
spec/features/boards/sidebar_spec.rb
+3
-3
spec/javascripts/boards/issue_card_spec.js
spec/javascripts/boards/issue_card_spec.js
+16
-12
No files found.
app/assets/javascripts/boards/components/issue_card_inner.js
View file @
c543970d
...
@@ -97,9 +97,8 @@ gl.issueBoards.IssueCardInner = Vue.extend({
...
@@ -97,9 +97,8 @@ gl.issueBoards.IssueCardInner = Vue.extend({
return
`Avatar for
${
assignee
.
name
}
`
;
return
`Avatar for
${
assignee
.
name
}
`
;
},
},
showLabel
(
label
)
{
showLabel
(
label
)
{
if
(
!
this
.
list
)
return
true
;
if
(
!
this
.
list
||
!
label
)
return
true
;
return
true
;
return
!
this
.
list
.
label
||
label
.
id
!==
this
.
list
.
label
.
id
;
},
},
filterByLabel
(
label
,
e
)
{
filterByLabel
(
label
,
e
)
{
if
(
!
this
.
updateFilters
)
return
;
if
(
!
this
.
updateFilters
)
return
;
...
...
app/assets/stylesheets/pages/boards.scss
View file @
c543970d
...
@@ -165,6 +165,7 @@
...
@@ -165,6 +165,7 @@
.board-title
{
.board-title
{
padding-top
:
(
$gl-padding
-
3px
);
padding-top
:
(
$gl-padding
-
3px
);
padding-bottom
:
$gl-padding
;
}
}
}
}
}
}
...
@@ -178,6 +179,7 @@
...
@@ -178,6 +179,7 @@
position
:
relative
;
position
:
relative
;
margin
:
0
;
margin
:
0
;
padding
:
$gl-padding
;
padding
:
$gl-padding
;
padding-bottom
:
(
$gl-padding
+
3px
);
font-size
:
1em
;
font-size
:
1em
;
border-bottom
:
1px
solid
$border-color
;
border-bottom
:
1px
solid
$border-color
;
}
}
...
...
app/views/projects/boards/components/_board.html.haml
View file @
c543970d
...
@@ -6,8 +6,16 @@
...
@@ -6,8 +6,16 @@
%i
.fa.fa-fw.board-title-expandable-toggle
{
"v-if"
:
"list.isExpandable"
,
%i
.fa.fa-fw.board-title-expandable-toggle
{
"v-if"
:
"list.isExpandable"
,
":class"
:
"{
\"
fa-caret-down
\"
: list.isExpanded,
\"
fa-caret-right
\"
: !list.isExpanded && list.position === -1,
\"
fa-caret-left
\"
: !list.isExpanded && list.position !== -1 }"
,
":class"
:
"{
\"
fa-caret-down
\"
: list.isExpanded,
\"
fa-caret-right
\"
: !list.isExpanded && list.position === -1,
\"
fa-caret-left
\"
: !list.isExpanded && list.position !== -1 }"
,
"aria-hidden"
:
"true"
}
"aria-hidden"
:
"true"
}
%span
.has-tooltip
{
":title"
=>
'(list.label ? list.label.description : "")'
,
data:
{
container:
"body"
,
placement:
"bottom"
}
}
%span
.has-tooltip
{
"v-if"
:
"list.type !==
\"
label
\"
"
,
":title"
=>
'(list.label ? list.label.description : "")'
}
{{ list.title }}
%span
.has-tooltip
{
"v-if"
:
"list.type ===
\"
label
\"
"
,
":title"
=>
'(list.label ? list.label.description : "")'
,
data:
{
container:
"body"
,
placement:
"bottom"
},
class:
"label color-label title"
,
":style"
=>
"{ backgroundColor: (list.label && list.label.color ? list.label.color : null), color: (list.label && list.label.color ? list.label.text_color :
\"
#2e2e2e
\"
) }"
}
{{ list.title }}
{{ list.title }}
.issue-count-badge.pull-right.clearfix
{
"v-if"
=>
'list.type !== "blank"'
}
.issue-count-badge.pull-right.clearfix
{
"v-if"
=>
'list.type !== "blank"'
}
%span
.issue-count-badge-count.pull-left
{
":class"
=>
'
{
"has-btn"
:
list
.
type
!==
"closed"
&&
!
disabled
}
'
}
%span
.issue-count-badge-count.pull-left
{
":class"
=>
'
{
"has-btn"
:
list
.
type
!==
"closed"
&&
!
disabled
}
'
}
...
...
spec/features/boards/boards_spec.rb
View file @
c543970d
...
@@ -233,7 +233,7 @@ describe 'Issue Boards', js: true do
...
@@ -233,7 +233,7 @@ describe 'Issue Boards', js: true do
wait_for_board_cards
(
4
,
1
)
wait_for_board_cards
(
4
,
1
)
expect
(
find
(
'.board:nth-child(3)'
)).
to
have_content
(
issue6
.
title
)
expect
(
find
(
'.board:nth-child(3)'
)).
to
have_content
(
issue6
.
title
)
expect
(
find
(
'.board:nth-child(3)'
).
all
(
'.card'
).
last
).
not_
to
have_content
(
development
.
title
)
expect
(
find
(
'.board:nth-child(3)'
).
all
(
'.card'
).
last
).
to
have_content
(
development
.
title
)
end
end
it
'issue moves between lists'
do
it
'issue moves between lists'
do
...
@@ -244,7 +244,7 @@ describe 'Issue Boards', js: true do
...
@@ -244,7 +244,7 @@ describe 'Issue Boards', js: true do
wait_for_board_cards
(
4
,
1
)
wait_for_board_cards
(
4
,
1
)
expect
(
find
(
'.board:nth-child(2)'
)).
to
have_content
(
issue7
.
title
)
expect
(
find
(
'.board:nth-child(2)'
)).
to
have_content
(
issue7
.
title
)
expect
(
find
(
'.board:nth-child(2)'
).
all
(
'.card'
).
first
).
not_
to
have_content
(
planning
.
title
)
expect
(
find
(
'.board:nth-child(2)'
).
all
(
'.card'
).
first
).
to
have_content
(
planning
.
title
)
end
end
it
'issue moves from closed'
do
it
'issue moves from closed'
do
...
...
spec/features/boards/sidebar_spec.rb
View file @
c543970d
...
@@ -257,7 +257,7 @@ describe 'Issue Boards', js: true do
...
@@ -257,7 +257,7 @@ describe 'Issue Boards', js: true do
end
end
end
end
expect
(
card
).
to
have_selector
(
'.label'
,
count:
2
)
expect
(
card
).
to
have_selector
(
'.label'
,
count:
3
)
expect
(
card
).
to
have_content
(
bug
.
title
)
expect
(
card
).
to
have_content
(
bug
.
title
)
end
end
...
@@ -283,7 +283,7 @@ describe 'Issue Boards', js: true do
...
@@ -283,7 +283,7 @@ describe 'Issue Boards', js: true do
end
end
end
end
expect
(
card
).
to
have_selector
(
'.label'
,
count:
3
)
expect
(
card
).
to
have_selector
(
'.label'
,
count:
4
)
expect
(
card
).
to
have_content
(
bug
.
title
)
expect
(
card
).
to
have_content
(
bug
.
title
)
expect
(
card
).
to
have_content
(
regression
.
title
)
expect
(
card
).
to
have_content
(
regression
.
title
)
end
end
...
@@ -308,7 +308,7 @@ describe 'Issue Boards', js: true do
...
@@ -308,7 +308,7 @@ describe 'Issue Boards', js: true do
end
end
end
end
expect
(
card
).
not_to
have_selector
(
'.label'
)
expect
(
card
).
to
have_selector
(
'.label'
,
count:
1
)
expect
(
card
).
not_to
have_content
(
stretch
.
title
)
expect
(
card
).
not_to
have_content
(
stretch
.
title
)
end
end
end
end
...
...
spec/javascripts/boards/issue_card_spec.js
View file @
c543970d
...
@@ -238,12 +238,6 @@ describe('Issue card component', () => {
...
@@ -238,12 +238,6 @@ describe('Issue card component', () => {
});
});
describe
(
'
labels
'
,
()
=>
{
describe
(
'
labels
'
,
()
=>
{
it
(
'
does not render any
'
,
()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
.label
'
),
).
toBeNull
();
});
describe
(
'
exists
'
,
()
=>
{
describe
(
'
exists
'
,
()
=>
{
beforeEach
((
done
)
=>
{
beforeEach
((
done
)
=>
{
component
.
issue
.
addLabel
(
label1
);
component
.
issue
.
addLabel
(
label1
);
...
@@ -251,16 +245,21 @@ describe('Issue card component', () => {
...
@@ -251,16 +245,21 @@ describe('Issue card component', () => {
Vue
.
nextTick
(()
=>
done
());
Vue
.
nextTick
(()
=>
done
());
});
});
it
(
'
does not render
list label
'
,
()
=>
{
it
(
'
renders
list label
'
,
()
=>
{
expect
(
expect
(
component
.
$el
.
querySelectorAll
(
'
.label
'
).
length
,
component
.
$el
.
querySelectorAll
(
'
.label
'
).
length
,
).
toBe
(
1
);
).
toBe
(
2
);
});
});
it
(
'
renders label
'
,
()
=>
{
it
(
'
renders label
'
,
()
=>
{
const
nodes
=
[];
component
.
$el
.
querySelectorAll
(
'
.label
'
).
forEach
((
label
)
=>
{
nodes
.
push
(
label
.
title
);
});
expect
(
expect
(
component
.
$el
.
querySelector
(
'
.label
'
).
textContent
,
nodes
.
includes
(
label1
.
description
)
,
).
to
Contain
(
label1
.
titl
e
);
).
to
Be
(
tru
e
);
});
});
it
(
'
sets label description as title
'
,
()
=>
{
it
(
'
sets label description as title
'
,
()
=>
{
...
@@ -270,9 +269,14 @@ describe('Issue card component', () => {
...
@@ -270,9 +269,14 @@ describe('Issue card component', () => {
});
});
it
(
'
sets background color of button
'
,
()
=>
{
it
(
'
sets background color of button
'
,
()
=>
{
const
nodes
=
[];
component
.
$el
.
querySelectorAll
(
'
.label
'
).
forEach
((
label
)
=>
{
nodes
.
push
(
label
.
style
.
backgroundColor
);
});
expect
(
expect
(
component
.
$el
.
querySelector
(
'
.label
'
).
style
.
backgroundColor
,
nodes
.
includes
(
label1
.
color
)
,
).
to
Contain
(
label1
.
color
);
).
to
Be
(
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