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
cf348fc0
Commit
cf348fc0
authored
Jun 04, 2021
by
Natalia Tepluhina
Committed by
Ezekiel Kigbo
Jun 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix loading board lists on big screen size
parent
47db9b79
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
14 deletions
+23
-14
app/assets/javascripts/boards/components/board_list.vue
app/assets/javascripts/boards/components/board_list.vue
+22
-13
spec/features/boards/issue_ordering_spec.rb
spec/features/boards/issue_ordering_spec.rb
+1
-1
No files found.
app/assets/javascripts/boards/components/board_list.vue
View file @
cf348fc0
...
...
@@ -142,6 +142,7 @@ export default {
},
onReachingListBottom
()
{
if
(
!
this
.
loadingMore
&&
this
.
hasNextPage
)
{
this
.
showCount
=
true
;
this
.
loadNextPage
();
}
},
...
...
@@ -150,12 +151,19 @@ export default {
},
handleDragOnEnd
(
params
)
{
sortableEnd
();
const
{
newIndex
,
oldIndex
,
from
,
to
,
item
}
=
params
;
const
{
oldIndex
,
from
,
to
,
item
}
=
params
;
let
{
newIndex
}
=
params
;
const
{
itemId
,
itemIid
,
itemPath
}
=
item
.
dataset
;
cons
t
{
children
}
=
to
;
le
t
{
children
}
=
to
;
let
moveBeforeId
;
let
moveAfterId
;
children
=
Array
.
from
(
children
).
filter
((
card
)
=>
card
.
classList
.
contains
(
'
board-card
'
));
if
(
newIndex
>
children
.
length
)
{
newIndex
=
children
.
length
;
}
const
getItemId
=
(
el
)
=>
Number
(
el
.
dataset
.
itemId
);
// If item is being moved within the same list
...
...
@@ -218,6 +226,7 @@ export default {
:data-board=
"list.id"
:data-board-type=
"list.listType"
:class=
"
{ 'bg-danger-100': boardItemsSizeExceedsMax }"
draggable=".board-card"
class="board-list gl-w-full gl-h-full gl-list-style-none gl-mb-0 gl-p-2 js-board-list"
data-testid="tree-root-wrapper"
@start="handleDragOnStart"
...
...
@@ -232,6 +241,7 @@ export default {
:item=
"item"
:disabled=
"disabled"
/>
<gl-intersection-observer
@
appear=
"onReachingListBottom"
>
<li
v-if=
"showCount"
class=
"board-list-count gl-text-center"
data-issue-id=
"-1"
>
<gl-loading-icon
v-if=
"loadingMore"
...
...
@@ -239,10 +249,9 @@ export default {
data-testid=
"count-loading-icon"
/>
<span
v-if=
"showingAllItems"
>
{{
showingAllItemsText
}}
</span>
<gl-intersection-observer
v-else
@
appear=
"onReachingListBottom"
>
<span>
{{
paginatedIssueText
}}
</span>
</gl-intersection-observer>
<span
v-else
>
{{
paginatedIssueText
}}
</span>
</li>
</gl-intersection-observer>
</component>
</div>
</
template
>
spec/features/boards/issue_ordering_spec.rb
View file @
cf348fc0
...
...
@@ -157,7 +157,7 @@ RSpec.describe 'Issue Boards', :js do
end
it
'moves to bottom of another list'
do
drag
(
list_from_index:
1
,
list_to_index:
2
,
to_index:
2
,
duration:
1020
)
drag
(
list_from_index:
1
,
list_to_index:
2
,
to_index:
3
,
duration:
1020
)
wait_for_requests
...
...
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