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
Boxiang Sun
gitlab-ce
Commits
888c0481
Commit
888c0481
authored
Aug 19, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to issue boards on mobile
parent
206375c8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
38 deletions
+34
-38
app/assets/javascripts/boards/boards_bundle.js.es6
app/assets/javascripts/boards/boards_bundle.js.es6
+1
-1
app/assets/javascripts/boards/components/board.js.es6
app/assets/javascripts/boards/components/board.js.es6
+14
-4
app/assets/javascripts/boards/components/board_list.js.es6
app/assets/javascripts/boards/components/board_list.js.es6
+12
-4
app/assets/javascripts/boards/mixins/sortable_default_options.js.es6
...javascripts/boards/mixins/sortable_default_options.js.es6
+4
-1
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+3
-26
app/views/projects/boards/components/_board.html.haml
app/views/projects/boards/components/_board.html.haml
+0
-1
app/views/projects/boards/components/_card.html.haml
app/views/projects/boards/components/_card.html.haml
+0
-1
No files found.
app/assets/javascripts/boards/boards_bundle.js.es6
View file @
888c0481
...
...
@@ -38,7 +38,7 @@ $(() => {
ready () {
Store.disabled = this.disabled;
gl.boardService.all()
.then((resp) => {
.then((resp) => {
resp.json().forEach((board) => {
const list = Store.addList(board);
...
...
app/assets/javascripts/boards/components/board.js.es6
View file @
888c0481
...
...
@@ -72,11 +72,21 @@
}
});
if (bp.getBreakpointSize() === 'xs') {
options.handle = '.js-board-drag-handle';
}
this.sortable = Sortable.create(this.$el.parentNode, options);
// if (gl.issueBoards.touchEnabled) {
// this.$on('scroll', () => {
// if (!startedDragging) {
// this.sortable.option("disabled", true);
// }
// this.$broadcast('scroll');
// });
//
// this.$on('scrollend', () => {
// this.sortable.option("disabled", false);
// this.$broadcast('scrollend');
// });
// }
},
beforeDestroy () {
Store.state.lists.$remove(this.list);
...
...
app/assets/javascripts/boards/components/board_list.js.es6
View file @
888c0481
...
...
@@ -74,10 +74,6 @@
}
});
if (bp.getBreakpointSize() === 'xs') {
options.handle = '.js-card-drag-handle';
}
this.sortable = Sortable.create(this.$els.list, options);
// Scroll event on list to load more
...
...
@@ -86,6 +82,18 @@
this.loadNextPage();
}
};
// if (gl.issueBoards.touchEnabled) {
// this.$on('scroll', () => {
// if (!startedDragging) {
// this.sortable.option("disabled", true);
// }
// });
//
// this.$on('scrollend', () => {
// this.sortable.option("disabled", false);
// });
// }
}
});
})();
app/assets/javascripts/boards/mixins/sortable_default_options.js.es6
View file @
888c0481
...
...
@@ -13,6 +13,8 @@
document.body.classList.remove('is-dragging');
};
gl.issueBoards.touchEnabled = ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch;
gl.issueBoards.getBoardSortableDefaultOptions = (obj) => {
let defaultSortOptions = {
forceFallback: true,
...
...
@@ -20,7 +22,8 @@
fallbackOnBody: true,
ghostClass: 'is-ghost',
filter: '.has-tooltip',
scrollSensitivity: 100,
delay: gl.issueBoards.touchEnabled ? 100 : 0,
scrollSensitivity: gl.issueBoards.touchEnabled ? 60 : 100,
scrollSpeed: 20,
onStart: gl.issueBoards.onStart,
onEnd: gl.issueBoards.onEnd
...
...
app/assets/stylesheets/pages/boards.scss
View file @
888c0481
...
...
@@ -105,8 +105,8 @@
.board
{
display
:
-
webkit-flex
;
display
:
flex
;
min-width
:
calc
(
100
vw
-
15px
);
max-width
:
calc
(
100
vw
-
15px
);
min-width
:
calc
(
85
vw
-
15px
);
max-width
:
calc
(
85
vw
-
15px
);
margin-bottom
:
25px
;
padding-right
:
(
$gl-padding
/
2
);
padding-left
:
(
$gl-padding
/
2
);
...
...
@@ -158,14 +158,6 @@
padding
:
$gl-padding
;
font-size
:
1em
;
border-bottom
:
1px
solid
$border-color
;
.board-mobile-handle
{
position
:
relative
;
left
:
0
;
top
:
1px
;
margin-top
:
0
;
margin-right
:
5px
;
}
}
.board-search-container
{
...
...
@@ -268,11 +260,7 @@
list-style
:
none
;
&
.user-can-drag
{
padding-left
:
(
$gl-padding
*
2
);
@media
(
min-width
:
$screen-sm-min
)
{
padding-left
:
$gl-padding
;
}
padding-left
:
$gl-padding
;
}
&
:not
(
:last-child
)
{
...
...
@@ -293,17 +281,6 @@
}
}
.board-mobile-handle
{
position
:
absolute
;
left
:
10px
;
top
:
50%
;
margin-top
:
(
-15px
/
2
);
@media
(
min-width
:
$screen-sm-min
)
{
display
:
none
;
}
}
.card-title
{
margin
:
0
;
font-size
:
1em
;
...
...
app/views/projects/boards/components/_board.html.haml
View file @
888c0481
...
...
@@ -11,7 +11,6 @@
.board-inner
%header
.board-header
{
":class"
=>
"{ 'has-border': list.label }"
,
":style"
=>
"{ borderTopColor: (list.label ? list.label.color : null) }"
}
%h3
.board-title.js-board-handle
{
":class"
=>
"{ 'user-can-drag': (!disabled && !list.preset) }"
}
=
icon
(
"align-justify"
,
class:
"board-mobile-handle js-board-drag-handle"
,
"v-if"
=>
"(!disabled && !list.preset)"
)
{{ list.title }}
%span
.pull-right
{
"v-if"
=>
"list.type !== 'blank'"
}
{{ list.issues.length }}
...
...
app/views/projects/boards/components/_card.html.haml
View file @
888c0481
...
...
@@ -9,7 +9,6 @@
"track-by"
=>
"id"
}
%li
.card
{
":class"
=>
"{ 'user-can-drag': !disabled }"
,
":index"
=>
"index"
}
=
icon
(
"align-justify"
,
class:
"board-mobile-handle js-card-drag-handle"
,
"v-if"
=>
"!disabled"
)
%h4
.card-title
=
icon
(
"eye-slash"
,
class:
"confidential-icon"
,
"v-if"
=>
"issue.confidential"
)
%a
{
":href"
=>
"issueLinkBase + '/' + issue.id"
,
...
...
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