Skip to content

Commit

Permalink
Merge pull request #2520 from CCAFS/A2-311-Timeline-visual-change
Browse files Browse the repository at this point in the history
🐛 fix(Timeline): scroll visualization
  • Loading branch information
MetalPrime authored Apr 30, 2024
2 parents e3c276b + f4ebb22 commit dd6316f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 23 deletions.
44 changes: 34 additions & 10 deletions marlo-web/src/main/webapp/crp/css/home/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -416,15 +416,41 @@ span.timelineControl:hover {
#timelineContainer {
position: relative;
overflow-x: scroll;
overflow-y: hidden;
overflow-y: visible;
height: 31vh;
width: 95%;
margin: 0 auto;
}

#timelineContainer::-webkit-scrollbar {
-webkit-appearance: none;
}

#timelineContainer::-webkit-scrollbar {
display: block;
height: 0;
width: 0;
padding-left: 6px;
}

#timelineContainer::-webkit-scrollbar-track {
background: transparent;
}

#timelineContainer::-webkit-scrollbar-thumb {
border-radius: 8px;
background-color: #2c3e50;
}

#timelineContainer::-webkit-scrollbar:vertical{
width: 9px;
}

#timelineContainer::-webkit-scrollbar-track-piece:end {
background: transparent;
margin-bottom: 20px;
}

#timelineContainer::-webkit-scrollbar-track-piece:start {
background: transparent;
margin-top: 20px;
}

#timelineDescription{
display: flex;
Expand All @@ -448,8 +474,6 @@ span.timelineControl:hover {
#timeline_times {
display: flex;
width: max-content;
margin-top: 10px;
margin-bottom: 10px;
padding: 5px 0;
position: absolute;
height: 100%;
Expand Down Expand Up @@ -496,7 +520,7 @@ span.timelineControl:hover {

.timebox_information {
position: absolute;
top: -12px;
top: -3px;
left: 6px;
}

Expand Down Expand Up @@ -647,7 +671,7 @@ span.timelineControl:hover {
}

#timeline_activities .activityUnique{
top: 2.5em;
top: 5em;
}

#timelineAlert{
Expand All @@ -659,7 +683,7 @@ span.timelineControl:hover {
padding-bottom: 6px;
position: absolute;
right: 2.5%;
bottom: 2.5%;
top: 10%;
}

#timelineAlert_container{
Expand Down
26 changes: 13 additions & 13 deletions marlo-web/src/main/webapp/crp/js/home/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,9 @@ function getIntersectedActivities() {
switch(activitiesIntersected.length){
case 1:
if(document.documentElement.getBoundingClientRect().width > 1500){
timelineContainer.style.height = "18vh";
timelineContainer.style.height = "22vh";
} else {
timelineContainer.style.height = "26vh";
timelineContainer.style.height = "30vh";
}

break;
Expand Down Expand Up @@ -532,17 +532,6 @@ function createTimeline2() {
<b>Schedule</b>
</div>
</div>
<div id="timelineContainer">
<div id="timeline_times">
${createDivTimes(getWeeksArray, "timebox").reduce((acc, curr) => acc + curr.outerHTML, '')}
</div>
<div id="timeline_activities">
${timelineElements.map((elem, id) => `
${createDivActivities(elem, getWeeksArray, id).outerHTML}
` ).join('')}
</div>
<div id="timeline_today" style="left: ${setDistances(getWeeksArray,null,null, true)}"></div>
</div>
<div id="timelineAlert">
<b>Progress status:</b>
<section id="timelineAlert_container">
Expand All @@ -560,6 +549,17 @@ function createTimeline2() {
</article>
</section>
</div>
<div id="timelineContainer">
<div id="timeline_times">
${createDivTimes(getWeeksArray, "timebox").reduce((acc, curr) => acc + curr.outerHTML, '')}
</div>
<div id="timeline_activities">
${timelineElements.map((elem, id) => `
${createDivActivities(elem, getWeeksArray, id).outerHTML}
` ).join('')}
</div>
<div id="timeline_today" style="left: ${setDistances(getWeeksArray,null,null, true)}"></div>
</div>
</div>
`
}
Expand Down

0 comments on commit dd6316f

Please sign in to comment.