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
00c5c91c
Commit
00c5c91c
authored
May 06, 2020
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix epics on roadmap when using VirtualList
parent
f48bd763
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
ee/app/assets/javascripts/roadmap/components/epics_list_section.vue
...ets/javascripts/roadmap/components/epics_list_section.vue
+10
-6
ee/spec/frontend/roadmap/components/epics_list_section_spec.js
...ec/frontend/roadmap/components/epics_list_section_spec.js
+12
-0
No files found.
ee/app/assets/javascripts/roadmap/components/epics_list_section.vue
View file @
00c5c91c
...
...
@@ -135,7 +135,7 @@ export default {
if
(
this
.
$refs
.
epicItems
&&
this
.
$refs
.
epicItems
.
length
)
{
return
{
height
:
`
${
this
.
$el
.
clientHeight
-
this
.
e
pics
.
length
*
this
.
$refs
.
epicItems
[
0
].
$el
.
clientHeight
}
px`
,
this
.
displayedE
pics
.
length
*
this
.
$refs
.
epicItems
[
0
].
$el
.
clientHeight
}
px`
,
};
}
return
{};
...
...
@@ -154,10 +154,15 @@ export default {
return
{
key
:
index
,
props
:
{
epic
:
this
.
e
pics
[
index
],
epic
:
this
.
displayedE
pics
[
index
],
presetType
:
this
.
presetType
,
timeframe
:
this
.
timeframe
,
currentGroupId
:
this
.
currentGroupId
,
clientWidth
:
this
.
clientWidth
,
childLevel
:
0
,
childrenEpics
:
this
.
childrenEpics
,
childrenFlags
:
this
.
childrenFlags
,
hasFiltersApplied
:
this
.
hasFiltersApplied
,
},
};
},
...
...
@@ -173,22 +178,21 @@ export default {
<div
:style=
"sectionContainerStyles"
class=
"epics-list-section"
>
<template
v-if=
"glFeatures.roadmapBufferedRendering && !emptyRowContainerVisible"
>
<virtual-list
v-if=
"
e
pics.length"
v-if=
"
displayedE
pics.length"
:size=
"$options.epicItemHeight"
:remain=
"bufferSize"
:bench=
"bufferSize"
:scrollelement=
"roadmapShellEl"
:item=
"$options.EpicItem"
:itemcount=
"
e
pics.length"
:itemcount=
"
displayedE
pics.length"
:itemprops=
"getEpicItemProps"
/>
</
template
>
<
template
v-else
>
<epic-item
v-for=
"
(epic, index)
in displayedEpics"
v-for=
"
epic
in displayedEpics"
ref=
"epicItems"
:key=
"generateKey(epic)"
:first-epic=
"index === 0"
:preset-type=
"presetType"
:epic=
"epic"
:timeframe=
"timeframe"
...
...
ee/spec/frontend/roadmap/components/epics_list_section_spec.js
View file @
00c5c91c
...
...
@@ -245,6 +245,18 @@ describe('EpicsListSectionComponent', () => {
presetType
:
wrapper
.
vm
.
presetType
,
timeframe
:
wrapper
.
vm
.
timeframe
,
currentGroupId
:
wrapper
.
vm
.
currentGroupId
,
clientWidth
:
wrapper
.
vm
.
clientWidth
,
childLevel
:
0
,
childrenEpics
:
expect
.
objectContaining
({
41
:
expect
.
arrayContaining
([
mockFormattedChildEpic1
]),
}),
childrenFlags
:
expect
.
objectContaining
({
1
:
{
itemChildrenFetchInProgress
:
false
,
itemExpanded
:
false
,
},
}),
hasFiltersApplied
:
false
,
},
}),
);
...
...
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