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
Boxiang Sun
gitlab-ce
Commits
94673392
Commit
94673392
authored
Aug 10, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hides label for current list
Added confidential icon Fixed assignee tooltip Updates some tests
parent
1faf67f0
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
24 deletions
+39
-24
app/assets/javascripts/boards/components/board_card.js.es6
app/assets/javascripts/boards/components/board_card.js.es6
+1
-0
app/assets/javascripts/boards/models/issue.js.es6
app/assets/javascripts/boards/models/issue.js.es6
+1
-0
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+4
-0
app/views/projects/boards/components/_card.html.haml
app/views/projects/boards/components/_card.html.haml
+5
-1
app/views/projects/boards/show.html.haml
app/views/projects/boards/show.html.haml
+1
-1
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+27
-22
No files found.
app/assets/javascripts/boards/components/board_card.js.es6
View file @
94673392
(function () {
const BoardCard = Vue.extend({
props: {
list: Object,
issue: Object,
issueLinkBase: String,
disabled: Boolean
...
...
app/assets/javascripts/boards/models/issue.js.es6
View file @
94673392
...
...
@@ -2,6 +2,7 @@ class Issue {
constructor (obj) {
this.id = obj.iid;
this.title = obj.title;
this.confidential = obj.confidential;
if (obj.assignee) {
this.assignee = new User(obj.assignee);
...
...
app/assets/stylesheets/pages/boards.scss
View file @
94673392
...
...
@@ -277,6 +277,10 @@
border
:
0
;
outline
:
0
;
}
.confidential-icon
{
margin-right
:
5px
;
}
}
.board-mobile-handle
{
...
...
app/views/projects/boards/components/_card.html.haml
View file @
94673392
%board-card
{
"inline-template"
=>
true
,
"v-for"
=>
"issue in issues | orderBy 'priority'"
,
":list"
=>
"list"
,
":issue"
=>
"issue"
,
":issue-link-base"
=>
"issueLinkBase"
,
":disabled"
=>
"disabled"
,
...
...
@@ -8,6 +9,7 @@
":class"
=>
"{ 'user-can-drag': !disabled }"
}
=
icon
(
"align-justify"
,
class:
"board-mobile-handle js-card-drag-handle"
,
"v-if"
=>
"!disabled"
)
%h4
.card-title
=
icon
(
"eye-slash"
,
class:
"confidential-icon"
,
"v-if"
=>
"issue.confidential"
)
%a
{
":href"
=>
"issueLinkBase + '/' + issue.id"
,
":title"
=>
"issue.title"
}
{{ issue.title }}
...
...
@@ -17,6 +19,7 @@
{{ issue.id }}
%button
.label.color-label.has-tooltip
{
"v-for"
=>
"label in issue.labels"
,
type:
"button"
,
"v-if"
=>
"(!list.label || label.id !== list.label.id)"
,
"@click"
=>
"filterByLabel(label, $event)"
,
":style"
=>
"{ backgroundColor: label.color, color: label.textColor }"
,
":title"
=>
"label.description"
,
...
...
@@ -24,5 +27,6 @@
{{ label.title }}
%a
.has-tooltip
{
":href"
=>
"'/u/' + issue.assignee.username"
,
":title"
=>
"'Assigned to ' + issue.assignee.name"
,
"v-if"
=>
"issue.assignee"
}
"v-if"
=>
"issue.assignee"
,
data:
{
container:
'body'
}
}
%img
.avatar.avatar-inline.s20
{
":src"
=>
"issue.assignee.avatar"
,
width:
20
,
height:
20
}
app/views/projects/boards/show.html.haml
View file @
94673392
...
...
@@ -4,7 +4,7 @@
-
content_for
:page_specific_javascripts
do
=
page_specific_javascript_tag
(
'boards/boards_bundle.js'
)
=
page_specific_javascript_tag
(
'boards/test_utils/simulate_drag.js'
)
=
page_specific_javascript_tag
(
'boards/test_utils/simulate_drag.js'
)
if
Rails
.
env
.
test?
=
render
"projects/issues/head"
...
...
spec/features/boards/boards_spec.rb
View file @
94673392
...
...
@@ -54,6 +54,7 @@ describe 'Issue Boards', feature: true, js: true do
let!
(
:list1
)
{
create
(
:list
,
board:
project
.
board
,
label:
planning
,
position:
0
)
}
let!
(
:list2
)
{
create
(
:list
,
board:
project
.
board
,
label:
development
,
position:
1
)
}
let!
(
:confidential_issue
)
{
create
(
:issue
,
:confidential
,
project:
project
,
author:
user
)
}
let!
(
:issue1
)
{
create
(
:issue
,
project:
project
,
assignee:
user
)
}
let!
(
:issue2
)
{
create
(
:issue
,
project:
project
,
author:
user2
)
}
let!
(
:issue3
)
{
create
(
:issue
,
project:
project
)
}
...
...
@@ -86,6 +87,12 @@ describe 'Issue Boards', feature: true, js: true do
end
end
it
'shows confidential issues with icon'
do
page
.
within
(
first
(
'.board'
))
do
expect
(
page
).
to
have_selector
(
'.confidential-icon'
,
count:
1
)
end
end
it
'allows user to delete board'
do
page
.
within
(
all
(
'.board'
)[
1
])
do
find
(
'.board-delete'
).
click
...
...
@@ -115,8 +122,8 @@ describe 'Issue Boards', feature: true, js: true do
context
'backlog'
do
it
'shows issues in backlog with no labels'
do
page
.
within
(
first
(
'.board'
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
5
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
5
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
6
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
6
)
end
end
...
...
@@ -136,7 +143,7 @@ describe 'Issue Boards', feature: true, js: true do
find
(
'.board-search-clear-btn'
).
click
expect
(
page
).
to
have_selector
(
'.card'
,
count:
2
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
6
)
end
end
...
...
@@ -144,8 +151,8 @@ describe 'Issue Boards', feature: true, js: true do
drag_to
(
list_to_index:
1
)
page
.
within
(
first
(
'.board'
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
3
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
3
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
5
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
5
)
end
page
.
within
(
all
(
'.board'
)[
1
])
do
...
...
@@ -168,7 +175,7 @@ describe 'Issue Boards', feature: true, js: true do
drag_to
(
list_from_index:
0
,
list_to_index:
3
)
expect
(
all
(
'.board'
).
last
).
to
have_selector
(
'.card'
,
count:
2
)
expect
(
all
(
'.board'
).
last
).
to
have_content
(
issue
4
.
title
)
expect
(
all
(
'.board'
).
last
).
to
have_content
(
issue
9
.
title
)
expect
(
all
(
'.board'
).
last
).
not_to
have_content
(
planning
.
title
)
end
...
...
@@ -195,8 +202,8 @@ describe 'Issue Boards', feature: true, js: true do
expect
(
all
(
'.board'
)[
1
]).
to
have_selector
(
'.card'
,
count:
1
)
expect
(
all
(
'.board'
)[
2
]).
to
have_selector
(
'.card'
,
count:
3
)
expect
(
all
(
'.board'
)[
2
]).
to
have_content
(
issue
5
.
title
)
expect
(
all
(
'.board'
)[
2
].
all
(
'.card'
).
last
).
to
have_content
(
development
.
title
)
expect
(
all
(
'.board'
)[
2
]).
to
have_content
(
issue
6
.
title
)
expect
(
all
(
'.board'
)[
2
].
all
(
'.card'
).
last
).
not_
to
have_content
(
development
.
title
)
end
it
'moves between lists'
do
...
...
@@ -205,7 +212,7 @@ describe 'Issue Boards', feature: true, js: true do
expect
(
all
(
'.board'
)[
1
]).
to
have_selector
(
'.card'
,
count:
3
)
expect
(
all
(
'.board'
)[
2
]).
to
have_selector
(
'.card'
,
count:
1
)
expect
(
all
(
'.board'
)[
1
]).
to
have_content
(
issue7
.
title
)
expect
(
all
(
'.board'
)[
1
].
all
(
'.card'
).
first
).
to
have_content
(
planning
.
title
)
expect
(
all
(
'.board'
)[
1
].
all
(
'.card'
).
first
).
not_
to
have_content
(
planning
.
title
)
end
it
'moves from done'
do
...
...
@@ -219,7 +226,7 @@ describe 'Issue Boards', feature: true, js: true do
context
'issue card'
do
it
'shows assignee'
do
page
.
within
(
first
(
'.board'
))
do
expect
(
all
(
'.card'
).
last
).
to
have_selector
(
'.avatar'
)
expect
(
page
).
to
have_selector
(
'.avatar'
,
count:
1
)
end
end
end
...
...
@@ -247,8 +254,8 @@ describe 'Issue Boards', feature: true, js: true do
it
'moves issues from backlog into new list'
do
page
.
within
(
first
(
'.board'
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
5
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
5
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
6
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
6
)
end
click_button
'Create new list'
...
...
@@ -258,8 +265,8 @@ describe 'Issue Boards', feature: true, js: true do
end
page
.
within
(
first
(
'.board'
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
4
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
4
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
5
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
5
)
end
end
end
...
...
@@ -390,8 +397,8 @@ describe 'Issue Boards', feature: true, js: true do
end
page
.
within
(
first
(
'.board'
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
2
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
2
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
1
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
1
)
end
page
.
within
(
all
(
'.board'
)[
1
])
do
...
...
@@ -411,8 +418,8 @@ describe 'Issue Boards', feature: true, js: true do
end
page
.
within
(
first
(
'.board'
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
4
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
4
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
5
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
5
)
end
page
.
within
(
all
(
'.board'
)[
1
])
do
...
...
@@ -442,11 +449,9 @@ describe 'Issue Boards', feature: true, js: true do
end
page
.
within
(
first
(
'.board'
))
do
page
.
within
(
first
(
'.card'
))
do
click_button
(
bug
.
title
)
end
expect
(
page
).
to
have_selector
(
'.card'
,
count:
5
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
6
)
end
page
.
within
(
'.labels-filter'
)
do
...
...
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