Commit 4d3cf166 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch '4848-fix-roadmap-tech-debt' into 'master'

Group Roadmap enhancements

Closes #5088

See merge request gitlab-org/gitlab-ee!4651
parents 4d74ba74 3ce34660
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
shellHeight: 0, shellHeight: 0,
emptyRowHeight: 0, emptyRowHeight: 0,
showEmptyRow: false, showEmptyRow: false,
offsetLeft: 0,
showBottomShadow: false,
}; };
}, },
computed: { computed: {
...@@ -53,11 +55,16 @@ ...@@ -53,11 +55,16 @@
emptyRowCellStyles() { emptyRowCellStyles() {
return `height: ${this.emptyRowHeight}px;`; return `height: ${this.emptyRowHeight}px;`;
}, },
shadowCellStyles() {
return `left: ${this.offsetLeft}px;`;
},
}, },
watch: { watch: {
shellWidth: function shellWidth() { shellWidth: function shellWidth() {
// Scroll view to today indicator only when shellWidth is updated. // Scroll view to today indicator only when shellWidth is updated.
this.scrollToTodayIndicator(); this.scrollToTodayIndicator();
// Initialize offsetLeft when shellWidth is updated
this.offsetLeft = this.$el.parentElement.offsetLeft;
}, },
}, },
mounted() { mounted() {
...@@ -107,6 +114,8 @@ ...@@ -107,6 +114,8 @@
// set height and show empty row reducing horizontal scrollbar size // set height and show empty row reducing horizontal scrollbar size
this.emptyRowHeight = (this.shellHeight - approxChildrenHeight) - 1; this.emptyRowHeight = (this.shellHeight - approxChildrenHeight) - 1;
this.showEmptyRow = true; this.showEmptyRow = true;
} else {
this.showBottomShadow = true;
} }
}, },
/** /**
...@@ -116,7 +125,7 @@ ...@@ -116,7 +125,7 @@
* update raw element properties upon event via jQuery. * update raw element properties upon event via jQuery.
*/ */
handleScroll() { handleScroll() {
const scrollLeft = this.$el.scrollLeft; const { scrollTop, scrollLeft, scrollHeight, clientHeight } = this.$el;
const tableEl = this.$el.parentElement; const tableEl = this.$el.parentElement;
if (tableEl) { if (tableEl) {
const $theadEl = $(tableEl).find('thead'); const $theadEl = $(tableEl).find('thead');
...@@ -126,7 +135,8 @@ ...@@ -126,7 +135,8 @@
$theadEl.find('th:nth-child(1)').css('left', scrollLeft); $theadEl.find('th:nth-child(1)').css('left', scrollLeft);
$tbodyEl.find('td:nth-child(1)').css('left', scrollLeft); $tbodyEl.find('td:nth-child(1)').css('left', scrollLeft);
} }
eventHub.$emit('epicsListScrolled', this.$el.scrollTop, this.$el.scrollLeft); this.showBottomShadow = (Math.ceil(scrollTop) + clientHeight) < scrollHeight;
eventHub.$emit('epicsListScrolled', scrollTop, scrollLeft);
}, },
/** /**
* `clientWidth` is full width of list section, and we need to * `clientWidth` is full width of list section, and we need to
...@@ -148,6 +158,11 @@ ...@@ -148,6 +158,11 @@
:style="tbodyStyles" :style="tbodyStyles"
@scroll="handleScroll" @scroll="handleScroll"
> >
<tr
v-if="showBottomShadow"
class="bottom-shadow-cell"
:style="shadowCellStyles"
></tr>
<epic-item <epic-item
v-for="(epic, index) in epics" v-for="(epic, index) in epics"
:key="index" :key="index"
......
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
}, },
methods: { methods: {
handleEpicsListScroll(scrollTop) { handleEpicsListScroll(scrollTop) {
// Add class only when content are scrolled at half the height of header // Add class only when epics list is scrolled at 1% the height of header
this.scrolledHeaderClass = (scrollTop > this.$el.clientHeight / 2) ? 'scrolled-ahead' : ''; this.scrolledHeaderClass = (scrollTop > this.$el.clientHeight / 100) ? 'scrolled-ahead' : '';
}, },
}, },
}; };
......
$item-height: 50px; $item-height: 50px;
$column-shadow: 15px 0 15px -15px rgba(0, 0, 0, 0.12) inset; $column-shadow: 15px 0 15px -15px rgba(0, 0, 0, 0.12) inset;
$scroll-top-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.12); $scroll-top-gradient: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, rgba(255, 255, 255, 0.001) 100%);
$scroll-bottom-gradient: linear-gradient(to bottom, rgba(255, 255, 255, 0.001) 0%, rgba(0, 0, 0, 0.15) 100%);
$border-style: 1px solid $border-gray-normal; $border-style: 1px solid $border-gray-normal;
$details-cell-width: 320px; $details-cell-width: 320px;
...@@ -27,11 +28,22 @@ $details-cell-width: 320px; ...@@ -27,11 +28,22 @@ $details-cell-width: 320px;
position: relative; position: relative;
} }
.epics-list-section .bottom-shadow-cell {
position: fixed;
bottom: 0;
height: 10px;
width: $details-cell-width;
pointer-events: none;
background: $scroll-bottom-gradient;
z-index: 3;
}
.epics-list-section .epic-details-cell:after, .epics-list-section .epic-details-cell:after,
.roadmap-timeline-section .timeline-header-blank:after, .roadmap-timeline-section .timeline-header-blank:after,
.roadmap-timeline-section.scrolled-ahead .timeline-header-blank:before { .roadmap-timeline-section.scrolled-ahead .timeline-header-blank:before {
content: ''; content: '';
position: absolute; position: absolute;
pointer-events: none;
} }
.epics-list-section .epic-details-cell:after, .epics-list-section .epic-details-cell:after,
...@@ -41,20 +53,19 @@ $details-cell-width: 320px; ...@@ -41,20 +53,19 @@ $details-cell-width: 320px;
height: 100%; height: 100%;
width: 14px; width: 14px;
box-shadow: $column-shadow; box-shadow: $column-shadow;
pointer-events: none;
} }
.roadmap-timeline-section .timeline-header-blank:after { .roadmap-timeline-section .timeline-header-blank:after {
top: -2px; top: -2px;
height: 60px; height: 62px;
} }
.roadmap-timeline-section.scrolled-ahead .timeline-header-blank:before { .roadmap-timeline-section.scrolled-ahead .timeline-header-blank:before {
bottom: -1px; bottom: -10px;
left: 0; left: 0;
height: 15px; height: 10px;
width: 100%; width: 100%;
box-shadow: $scroll-top-shadow; background: $scroll-top-gradient;
} }
.roadmap-timeline-section { .roadmap-timeline-section {
...@@ -86,6 +97,7 @@ $details-cell-width: 320px; ...@@ -86,6 +97,7 @@ $details-cell-width: 320px;
display: block; display: block;
top: 2px; top: 2px;
height: 60px; height: 60px;
margin-top: -2px;
width: $details-cell-width; width: $details-cell-width;
background-color: $white-light; background-color: $white-light;
border-right: $border-style; border-right: $border-style;
...@@ -122,7 +134,7 @@ $details-cell-width: 320px; ...@@ -122,7 +134,7 @@ $details-cell-width: 320px;
border-bottom: $border-style; border-bottom: $border-style;
&.label-bold { &.label-bold {
font-weight: 700; font-weight: 600;
} }
} }
...@@ -178,7 +190,6 @@ $details-cell-width: 320px; ...@@ -178,7 +190,6 @@ $details-cell-width: 320px;
.epic-details-cell { .epic-details-cell {
position: relative; position: relative;
display: block; display: block;
top: 1px; /* Remove cell spacing */
width: $details-cell-width; width: $details-cell-width;
padding: $gl-padding-8 $gl-padding; padding: $gl-padding-8 $gl-padding;
font-size: $code_font_size; font-size: $code_font_size;
...@@ -194,7 +205,7 @@ $details-cell-width: 320px; ...@@ -194,7 +205,7 @@ $details-cell-width: 320px;
.epic-title .epic-url { .epic-title .epic-url {
display: table-cell; display: table-cell;
color: $theme-gray-900; color: $theme-gray-900;
font-weight: bold; font-weight: 600;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -245,11 +256,11 @@ $details-cell-width: 320px; ...@@ -245,11 +256,11 @@ $details-cell-width: 320px;
} }
&.start-date-undefined { &.start-date-undefined {
background: linear-gradient(to right, transparent 0%, $blue-200 50%, $blue-500 100%); background: linear-gradient(to right, rgba(255, 255, 255, 0.001) 0%, $blue-200 50%, $blue-500 100%);
} }
&.end-date-undefined { &.end-date-undefined {
background: linear-gradient(to right, $blue-500 0%, $blue-200 50%, transparent 100%); background: linear-gradient(to right, $blue-500 0%, $blue-200 50%, rgba(255, 255, 255, 0.001) 100%);
} }
&.start-date-outside { &.start-date-outside {
......
---
title: Group Roadmap enhancements
merge_request: 4651
author:
type: changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment