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
99ad6e19
Commit
99ad6e19
authored
Aug 23, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
79b13a8d
91b77a16
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
11 deletions
+54
-11
app/assets/javascripts/test_utils/simulate_drag.js
app/assets/javascripts/test_utils/simulate_drag.js
+5
-1
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+3
-0
app/views/shared/boards/components/_board.html.haml
app/views/shared/boards/components/_board.html.haml
+1
-1
changelogs/unreleased/winh-deduplicate-board-headers.yml
changelogs/unreleased/winh-deduplicate-board-headers.yml
+5
-0
doc/api/dependencies.md
doc/api/dependencies.md
+11
-5
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+12
-2
spec/support/helpers/drag_to_helper.rb
spec/support/helpers/drag_to_helper.rb
+17
-2
No files found.
app/assets/javascripts/test_utils/simulate_drag.js
View file @
99ad6e19
...
...
@@ -153,7 +153,11 @@ export default function simulateDrag(options) {
if
(
progress
>=
1
)
{
if
(
options
.
ondragend
)
options
.
ondragend
();
simulateEvent
(
toEl
,
'
mouseup
'
);
if
(
options
.
performDrop
)
{
simulateEvent
(
toEl
,
'
mouseup
'
);
}
clearInterval
(
dragInterval
);
window
.
SIMULATE_DRAG_ACTIVE
=
0
;
}
...
...
app/assets/stylesheets/pages/boards.scss
View file @
99ad6e19
...
...
@@ -86,6 +86,9 @@
}
.board
{
// the next line cannot be replaced with .d-inline-block because it breaks display: none of SortableJS
// see https://gitlab.com/gitlab-org/gitlab-ce/issues/64828
display
:
inline-block
;
width
:
calc
(
85vw
-
15px
);
@include
media-breakpoint-up
(
sm
)
{
...
...
app/views/shared/boards/components/_board.html.haml
View file @
99ad6e19
.board.
d-inline-block.
h-100.px-2.align-top.ws-normal
{
":class"
=>
'
{
"is-draggable"
:
!
list
.
preset
,
"is-expandable"
:
list
.
isExpandable
,
"is-collapsed"
:
!
list
.
isExpanded
,
"board-type-assignee"
:
list
.
type
===
"assignee"
}
'
,
.board.h-100.px-2.align-top.ws-normal
{
":class"
=>
'
{
"is-draggable"
:
!
list
.
preset
,
"is-expandable"
:
list
.
isExpandable
,
"is-collapsed"
:
!
list
.
isExpanded
,
"board-type-assignee"
:
list
.
type
===
"assignee"
}
'
,
":data-id"
=>
"list.id"
,
data:
{
qa_selector:
"board_list"
}
}
.board-inner.d-flex.flex-column.position-relative.h-100.rounded
%header
.board-header
{
":class"
=>
'
{
"has-border"
:
list
.
label
&&
list
.
label
.
color
,
"position-relative"
:
list
.
isExpanded
,
"position-absolute position-top-0 position-left-0 w-100 h-100"
:
!
list
.
isExpanded
}
'
,
":style"
=>
"{ borderTopColor: (list.label && list.label.color ? list.label.color : null) }"
,
data:
{
qa_selector:
"board_list_header"
}
}
...
...
changelogs/unreleased/winh-deduplicate-board-headers.yml
0 → 100644
View file @
99ad6e19
---
title
:
Hide duplicate board list while dragging
merge_request
:
32099
author
:
type
:
fixed
doc/api/dependencies.md
View file @
99ad6e19
...
...
@@ -5,7 +5,8 @@ This API is in an alpha stage and considered unstable.
The response payload may be subject to change or breakage
across GitLab releases.
Every call to this endpoint requires authentication. To perform this call, user should be authorized to read
Every call to this endpoint requires authentication. To perform this call, user should be authorized to read repository.
To see vulnerabilities in response, user should be authorized to read
[
Project Security Dashboard
](
../user/application_security/security_dashboard/index.md#project-security-dashboard
)
.
## List project dependencies
...
...
@@ -17,8 +18,8 @@ supported by Gemnasium.
```
GET /projects/:id/dependencies
GET /projects/:id/
vulnerabilit
ies?package_manager=maven
GET /projects/:id/
vulnerabilit
ies?package_manager=yarn,bundler
GET /projects/:id/
dependenc
ies?package_manager=maven
GET /projects/:id/
dependenc
ies?package_manager=yarn,bundler
```
| Attribute | Type | Required | Description |
...
...
@@ -38,13 +39,18 @@ Example response:
"name"
:
"rails"
,
"version"
:
"5.0.1"
,
"package_manager"
:
"bundler"
,
"dependency_file_path"
:
"Gemfile.lock"
"dependency_file_path"
:
"Gemfile.lock"
,
"vulnerabilities"
:
[{
"name"
:
"DDoS"
,
"severity"
:
"unknown"
}]
},
{
"name"
:
"hanami"
,
"version"
:
"1.3.1"
,
"package_manager"
:
"bundler"
,
"dependency_file_path"
:
"Gemfile.lock"
"dependency_file_path"
:
"Gemfile.lock"
,
"vulnerabilities"
:
[]
}
]
```
spec/features/boards/boards_spec.rb
View file @
99ad6e19
...
...
@@ -236,6 +236,15 @@ describe 'Issue Boards', :js do
expect
(
find
(
'.board:nth-child(2)'
)).
to
have_content
(
planning
.
title
)
end
it
'dragging does not duplicate list'
do
selector
=
'.board:not(.is-ghost) .board-header'
expect
(
page
).
to
have_selector
(
selector
,
text:
development
.
title
,
count:
1
)
drag
(
list_from_index:
2
,
list_to_index:
1
,
selector:
'.board-header'
,
perform_drop:
false
)
expect
(
page
).
to
have_selector
(
selector
,
text:
development
.
title
,
count:
1
)
end
it
'issue moves between lists'
do
drag
(
list_from_index:
1
,
from_index:
1
,
list_to_index:
2
)
...
...
@@ -576,7 +585,7 @@ describe 'Issue Boards', :js do
end
end
def
drag
(
selector:
'.board-list'
,
list_from_index:
0
,
from_index:
0
,
to_index:
0
,
list_to_index:
0
)
def
drag
(
selector:
'.board-list'
,
list_from_index:
0
,
from_index:
0
,
to_index:
0
,
list_to_index:
0
,
perform_drop:
true
)
# ensure there is enough horizontal space for four boards
resize_window
(
2000
,
800
)
...
...
@@ -585,7 +594,8 @@ describe 'Issue Boards', :js do
list_from_index:
list_from_index
,
from_index:
from_index
,
to_index:
to_index
,
list_to_index:
list_to_index
)
list_to_index:
list_to_index
,
perform_drop:
perform_drop
)
end
def
wait_for_board_cards
(
board_number
,
expected_cards
)
...
...
spec/support/helpers/drag_to_helper.rb
View file @
99ad6e19
# frozen_string_literal: true
module
DragTo
def
drag_to
(
list_from_index:
0
,
from_index:
0
,
to_index:
0
,
list_to_index:
0
,
selector:
''
,
scrollable:
'body'
,
duration:
1000
)
evaluate_script
(
"simulateDrag({scrollable: $('
#{
scrollable
}
').get(0), duration:
#{
duration
}
, from: {el: $('
#{
selector
}
').eq(
#{
list_from_index
}
).get(0), index:
#{
from_index
}
}, to: {el: $('
#{
selector
}
').eq(
#{
list_to_index
}
).get(0), index:
#{
to_index
}
}});"
)
def
drag_to
(
list_from_index:
0
,
from_index:
0
,
to_index:
0
,
list_to_index:
0
,
selector:
''
,
scrollable:
'body'
,
duration:
1000
,
perform_drop:
true
)
js
=
<<~
JS
simulateDrag({
scrollable: document.querySelector('
#{
scrollable
}
'),
duration:
#{
duration
}
,
from: {
el: document.querySelectorAll('
#{
selector
}
')[
#{
list_from_index
}
],
index:
#{
from_index
}
},
to: {
el: document.querySelectorAll('
#{
selector
}
')[
#{
list_to_index
}
],
index:
#{
to_index
}
},
performDrop:
#{
perform_drop
}
});
JS
evaluate_script
(
js
)
Timeout
.
timeout
(
Capybara
.
default_max_wait_time
)
do
loop
while
drag_active?
...
...
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