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
1a19552e
Commit
1a19552e
authored
Dec 11, 2020
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Boards - Remove List model from GraphQL boards
Review feedback
parent
829d6edf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
8 deletions
+25
-8
app/assets/javascripts/boards/boards_util.js
app/assets/javascripts/boards/boards_util.js
+2
-3
app/assets/javascripts/boards/components/issue_card_inner.vue
...assets/javascripts/boards/components/issue_card_inner.vue
+1
-1
app/assets/javascripts/boards/components/project_select.vue
app/assets/javascripts/boards/components/project_select.vue
+1
-4
spec/frontend/boards/components/board_list_header_new_spec.js
.../frontend/boards/components/board_list_header_new_spec.js
+21
-0
No files found.
app/assets/javascripts/boards/boards_util.js
View file @
1a19552e
...
...
@@ -13,11 +13,10 @@ export function updateListPosition(listObj) {
if
(
listType
===
ListType
.
closed
)
{
position
=
Infinity
;
}
else
if
(
listType
===
ListType
.
backlog
)
{
position
=
-
1
;
position
=
-
Infinity
;
}
const
list
=
{
...
listObj
,
position
};
return
list
;
return
{
...
listObj
,
position
};
}
export
function
formatBoardLists
(
lists
)
{
...
...
app/assets/javascripts/boards/components/issue_card_inner.vue
View file @
1a19552e
...
...
@@ -126,7 +126,7 @@ export default {
return
(
label
.
id
&&
!
(
(
this
.
list
.
type
===
ListType
.
label
||
this
.
list
.
listType
===
ListType
.
label
)
&&
(
this
.
list
.
type
||
this
.
list
.
listType
)
===
ListType
.
label
&&
this
.
list
.
title
===
label
.
title
)
);
...
...
app/assets/javascripts/boards/components/project_select.vue
View file @
1a19552e
...
...
@@ -54,10 +54,7 @@ export default {
this
.
loading
=
true
;
const
additionalAttrs
=
{};
if
(
(
this
.
list
.
type
&&
this
.
list
.
type
!==
ListType
.
backlog
)
||
(
this
.
list
.
listType
&&
this
.
list
.
listType
!==
ListType
.
backlog
)
)
{
if
((
this
.
list
.
type
||
this
.
list
.
listType
)
!==
ListType
.
backlog
)
{
additionalAttrs
.
min_access_level
=
featureAccessLevel
.
EVERYONE
;
}
...
...
spec/frontend/boards/components/board_list_header_new_spec.js
View file @
1a19552e
...
...
@@ -73,6 +73,7 @@ describe('Board List Header Component', () => {
const
isExpanded
=
()
=>
!
isCollapsed
;
const
findAddIssueButton
=
()
=>
wrapper
.
find
({
ref
:
'
newIssueBtn
'
});
const
findTitle
=
()
=>
wrapper
.
find
(
'
.board-title
'
);
const
findCaret
=
()
=>
wrapper
.
find
(
'
.board-title-caret
'
);
describe
(
'
Add issue button
'
,
()
=>
{
...
...
@@ -163,4 +164,24 @@ describe('Board List Header Component', () => {
expect
(
localStorage
.
getItem
(
`
${
wrapper
.
vm
.
uniqueKey
}
.expanded`
)).
toBe
(
String
(
isExpanded
()));
});
});
describe
(
'
user can drag
'
,
()
=>
{
const
cannotDragList
=
[
ListType
.
backlog
,
ListType
.
closed
];
const
canDragList
=
[
ListType
.
label
,
ListType
.
milestone
,
ListType
.
assignee
];
it
.
each
(
cannotDragList
)(
'
does not have user-can-drag-class so user cannot drag list
'
,
listType
=>
{
createComponent
({
listType
});
expect
(
findTitle
().
classes
()).
not
.
toContain
(
'
user-can-drag
'
);
},
);
it
.
each
(
canDragList
)(
'
has user-can-drag-class so user can drag list
'
,
listType
=>
{
createComponent
({
listType
});
expect
(
findTitle
().
classes
()).
toContain
(
'
user-can-drag
'
);
});
});
});
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