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
ef50166f
Commit
ef50166f
authored
May 20, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lock a newly created item card in boards
Review feedback
parent
454f3b81
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
7 deletions
+18
-7
app/assets/javascripts/boards/components/board_card_inner.vue
...assets/javascripts/boards/components/board_card_inner.vue
+1
-1
app/assets/javascripts/boards/components/board_list.vue
app/assets/javascripts/boards/components/board_list.vue
+3
-1
app/assets/javascripts/boards/components/board_new_issue.vue
app/assets/javascripts/boards/components/board_new_issue.vue
+1
-1
app/assets/javascripts/boards/stores/actions.js
app/assets/javascripts/boards/stores/actions.js
+8
-3
app/assets/javascripts/boards/stores/mutations.js
app/assets/javascripts/boards/stores/mutations.js
+2
-1
spec/frontend/boards/stores/actions_spec.js
spec/frontend/boards/stores/actions_spec.js
+3
-0
No files found.
app/assets/javascripts/boards/components/board_card_inner.vue
View file @
ef50166f
...
...
@@ -185,7 +185,7 @@ export default {
<a
:href=
"item.path || item.webUrl || ''"
:title=
"item.title"
:class=
"
{ 'gl-text-gray-400': item.isLoading }"
:class=
"
{ 'gl-text-gray-400
!
': item.isLoading }"
@mousemove.stop
>
{{
item
.
title
}}
</a
>
...
...
app/assets/javascripts/boards/components/board_list.vue
View file @
ef50166f
...
...
@@ -86,7 +86,9 @@ export default {
:
this
.
$options
.
i18n
.
showingAllIssues
;
},
treeRootWrapper
()
{
return
this
.
canAdminList
?
Draggable
:
'
ul
'
;
return
this
.
canAdminList
&&
!
this
.
listsFlags
[
this
.
list
.
id
]?.
addItemToListInProgress
?
Draggable
:
'
ul
'
;
},
treeRootOptions
()
{
const
options
=
{
...
...
app/assets/javascripts/boards/components/board_new_issue.vue
View file @
ef50166f
...
...
@@ -102,7 +102,7 @@ export default {
ref=
"submitButton"
:disabled=
"disabled"
class=
"float-left js-no-auto-disable"
variant=
"
success
"
variant=
"
confirm
"
category=
"primary"
type=
"submit"
>
...
...
app/assets/javascripts/boards/stores/actions.js
View file @
ef50166f
...
...
@@ -489,8 +489,13 @@ export default {
});
},
addListItem
:
({
commit
},
{
list
,
item
,
position
})
=>
{
commit
(
types
.
ADD_BOARD_ITEM_TO_LIST
,
{
listId
:
list
.
id
,
itemId
:
item
.
id
,
atIndex
:
position
});
addListItem
:
({
commit
},
{
list
,
item
,
position
,
inProgress
=
false
})
=>
{
commit
(
types
.
ADD_BOARD_ITEM_TO_LIST
,
{
listId
:
list
.
id
,
itemId
:
item
.
id
,
atIndex
:
position
,
inProgress
,
});
commit
(
types
.
UPDATE_BOARD_ITEM
,
item
);
},
...
...
@@ -510,7 +515,7 @@ export default {
}
const
placeholderIssue
=
formatIssue
({
...
issueInput
,
id
:
placeholderId
,
isLoading
:
true
});
dispatch
(
'
addListItem
'
,
{
list
,
item
:
placeholderIssue
,
position
:
0
});
dispatch
(
'
addListItem
'
,
{
list
,
item
:
placeholderIssue
,
position
:
0
,
inProgress
:
true
});
gqlClient
.
mutate
({
...
...
app/assets/javascripts/boards/stores/mutations.js
View file @
ef50166f
...
...
@@ -166,8 +166,9 @@ export default {
[
mutationTypes
.
ADD_BOARD_ITEM_TO_LIST
]:
(
state
,
{
itemId
,
listId
,
moveBeforeId
,
moveAfterId
,
atIndex
},
{
itemId
,
listId
,
moveBeforeId
,
moveAfterId
,
atIndex
,
inProgress
=
false
},
)
=>
{
Vue
.
set
(
state
.
listsFlags
,
listId
,
{
...
state
.
listsFlags
,
addItemToListInProgress
:
inProgress
});
addItemToList
({
state
,
listId
,
itemId
,
moveBeforeId
,
moveAfterId
,
atIndex
});
},
...
...
spec/frontend/boards/stores/actions_spec.js
View file @
ef50166f
...
...
@@ -1114,6 +1114,7 @@ describe('addListItem', () => {
listId
:
mockLists
[
0
].
id
,
itemId
:
mockIssue
.
id
,
atIndex
:
0
,
inProgress
:
false
,
},
},
{
type
:
types
.
UPDATE_BOARD_ITEM
,
payload
:
mockIssue
},
...
...
@@ -1246,6 +1247,7 @@ describe('addListNewIssue', () => {
list
:
fakeList
,
item
:
formatIssue
({
...
mockIssue
,
id
:
'
tmp
'
,
isLoading
:
true
}),
position
:
0
,
inProgress
:
true
,
},
},
{
type
:
'
removeListItem
'
,
payload
:
{
listId
:
fakeList
.
id
,
itemId
:
'
tmp
'
}
},
...
...
@@ -1288,6 +1290,7 @@ describe('addListNewIssue', () => {
list
:
fakeList
,
item
:
formatIssue
({
...
mockIssue
,
id
:
'
tmp
'
,
isLoading
:
true
}),
position
:
0
,
inProgress
:
true
,
},
},
{
type
:
'
removeListItem
'
,
payload
:
{
listId
:
fakeList
.
id
,
itemId
:
'
tmp
'
}
},
...
...
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