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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
36fa45e7
Commit
36fa45e7
authored
Jan 06, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added note about width of sidebar
Changed CSS transition property for only values that change
parent
b16fbd69
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
app/assets/javascripts/boards/components/board.js.es6
app/assets/javascripts/boards/components/board.js.es6
+11
-7
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+2
-1
No files found.
app/assets/javascripts/boards/components/board.js.es6
View file @
36fa45e7
...
@@ -45,11 +45,15 @@
...
@@ -45,11 +45,15 @@
const issue = this.list.findIssue(this.detailIssue.issue.id);
const issue = this.list.findIssue(this.detailIssue.issue.id);
if (issue) {
if (issue) {
const offsetLeft = this.$el.offsetLeft;
const boardsList = document.querySelectorAll('.boards-list')[0];
const boardsList = document.querySelectorAll('.boards-list')[0];
const left = boardsList.scrollLeft -
this.$el.
offsetLeft;
const left = boardsList.scrollLeft - offsetLeft;
let right = (
this.$el.
offsetLeft + this.$el.offsetWidth);
let right = (offsetLeft + this.$el.offsetWidth);
if (window.innerWidth > 768 && boardsList.classList.contains('is-compact')) {
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);
right -= (boardsList.offsetWidth - 290);
} else {
} else {
right -= boardsList.offsetWidth;
right -= boardsList.offsetWidth;
...
@@ -58,11 +62,11 @@
...
@@ -58,11 +62,11 @@
if (right - boardsList.scrollLeft > 0) {
if (right - boardsList.scrollLeft > 0) {
$(boardsList).animate({
$(boardsList).animate({
scrollLeft: right
scrollLeft: right
},
200
);
},
this.sortableOptions.animation
);
} else if (left > 0) {
} else if (left > 0) {
$(boardsList).animate({
$(boardsList).animate({
scrollLeft:
this.$el.
offsetLeft
scrollLeft: offsetLeft
},
200
);
},
this.sortableOptions.animation
);
}
}
}
}
},
},
...
@@ -75,7 +79,7 @@
...
@@ -75,7 +79,7 @@
}
}
},
},
mounted () {
mounted () {
const o
ptions = gl.issueBoards.getBoardSortableDefaultOptions({
this.sortableO
ptions = gl.issueBoards.getBoardSortableDefaultOptions({
disabled: this.disabled,
disabled: this.disabled,
group: 'boards',
group: 'boards',
draggable: '.is-draggable',
draggable: '.is-draggable',
...
@@ -94,7 +98,7 @@
...
@@ -94,7 +98,7 @@
}
}
});
});
this.sortable = Sortable.create(this.$el.parentNode,
o
ptions);
this.sortable = Sortable.create(this.$el.parentNode,
this.sortableO
ptions);
},
},
});
});
})();
})();
app/assets/stylesheets/pages/boards.scss
View file @
36fa45e7
...
@@ -343,7 +343,8 @@
...
@@ -343,7 +343,8 @@
.right-sidebar.right-sidebar-expanded
{
.right-sidebar.right-sidebar-expanded
{
&
.boards-sidebar-slide-enter-active
,
&
.boards-sidebar-slide-enter-active
,
&
.boards-sidebar-slide-leave-active
{
&
.boards-sidebar-slide-leave-active
{
transition
:
all
.2s
;
transition
:
width
.2s
,
padding
.2s
;
}
}
&
.boards-sidebar-slide-enter
,
&
.boards-sidebar-slide-enter
,
...
...
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