Skip to content
Snippets Groups Projects
Commit 36fa45e7 authored by Phil Hughes's avatar Phil Hughes
Browse files

Added note about width of sidebar

Changed CSS transition property for only values that change
parent b16fbd69
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -45,11 +45,15 @@
const issue = this.list.findIssue(this.detailIssue.issue.id);
 
if (issue) {
const offsetLeft = this.$el.offsetLeft;
const boardsList = document.querySelectorAll('.boards-list')[0];
const left = boardsList.scrollLeft - this.$el.offsetLeft;
let right = (this.$el.offsetLeft + this.$el.offsetWidth);
const left = boardsList.scrollLeft - offsetLeft;
let right = (offsetLeft + this.$el.offsetWidth);
 
if (window.innerWidth > 768 && boardsList.classList.contains('is-compact')) {
// -290 here because width of boardsList is animating so therefore
// getting the width here is incorrect
// 290 is the width of the sidebar
right -= (boardsList.offsetWidth - 290);
} else {
right -= boardsList.offsetWidth;
Loading
Loading
@@ -58,11 +62,11 @@
if (right - boardsList.scrollLeft > 0) {
$(boardsList).animate({
scrollLeft: right
}, 200);
}, this.sortableOptions.animation);
} else if (left > 0) {
$(boardsList).animate({
scrollLeft: this.$el.offsetLeft
}, 200);
scrollLeft: offsetLeft
}, this.sortableOptions.animation);
}
}
},
Loading
Loading
@@ -75,7 +79,7 @@
}
},
mounted () {
const options = gl.issueBoards.getBoardSortableDefaultOptions({
this.sortableOptions = gl.issueBoards.getBoardSortableDefaultOptions({
disabled: this.disabled,
group: 'boards',
draggable: '.is-draggable',
Loading
Loading
@@ -94,7 +98,7 @@
}
});
 
this.sortable = Sortable.create(this.$el.parentNode, options);
this.sortable = Sortable.create(this.$el.parentNode, this.sortableOptions);
},
});
})();
Loading
Loading
@@ -343,7 +343,8 @@
.right-sidebar.right-sidebar-expanded {
&.boards-sidebar-slide-enter-active,
&.boards-sidebar-slide-leave-active {
transition: all .2s;
transition: width .2s,
padding .2s;
}
 
&.boards-sidebar-slide-enter,
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment