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
Jérome Perrin
gitlab-ce
Commits
9806db32
Commit
9806db32
authored
Aug 12, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added loading icon so user knows when new page is loading
Added test for finding lists when limited to type
parent
31657f8d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
5 deletions
+23
-5
app/assets/javascripts/boards/components/board_list.js.es6
app/assets/javascripts/boards/components/board_list.js.es6
+4
-5
app/assets/javascripts/boards/models/list.js.es6
app/assets/javascripts/boards/models/list.js.es6
+1
-0
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+5
-0
app/views/projects/boards/components/_board.html.haml
app/views/projects/boards/components/_board.html.haml
+1
-0
spec/javascripts/boards/boards_store_spec.js.es6
spec/javascripts/boards/boards_store_spec.js.es6
+12
-0
No files found.
app/assets/javascripts/boards/components/board_list.js.es6
View file @
9806db32
...
...
@@ -10,14 +10,13 @@
data () {
return {
scrollOffset: 250,
loadingMore: false,
filters: BoardsStore.state.filters
};
},
watch: {
filters: {
handler () {
this.loadingMore = false;
this.l
ist.l
oadingMore = false;
this.$els.list.scrollTop = 0;
},
deep: true
...
...
@@ -34,12 +33,12 @@
return this.$els.list.scrollTop + this.listHeight();
},
loadNextPage () {
this.loadingMore = true;
const getIssues = this.list.nextPage();
if (getIssues) {
this.list.loadingMore = true;
getIssues.then(() => {
this.loadingMore = false;
this.l
ist.l
oadingMore = false;
});
}
},
...
...
@@ -71,7 +70,7 @@
// Scroll event on list to load more
this.$els.list.onscroll = () => {
if ((this.scrollTop() > this.scrollHeight() - this.scrollOffset) && !this.loadingMore) {
if ((this.scrollTop() > this.scrollHeight() - this.scrollOffset) && !this.l
ist.l
oadingMore) {
this.loadNextPage();
}
};
...
...
app/assets/javascripts/boards/models/list.js.es6
View file @
9806db32
...
...
@@ -7,6 +7,7 @@ class List {
this.filters = BoardsStore.state.filters;
this.page = 1;
this.loading = true;
this.loadingMore = false;
this.issues = [];
if (obj.label) {
...
...
app/assets/stylesheets/pages/boards.scss
View file @
9806db32
...
...
@@ -133,6 +133,11 @@
}
}
.board-header-loading-spinner
{
margin-right
:
10px
;
color
:
$gray-darkest
;
}
.board-inner-container
{
border-bottom
:
1px
solid
$border-color
;
padding
:
$gl-padding
;
...
...
app/views/projects/boards/components/_board.html.haml
View file @
9806db32
...
...
@@ -18,6 +18,7 @@
":list"
=>
"list"
}
%button
.board-delete.has-tooltip.pull-right
{
type:
"button"
,
title:
"Delete list"
,
"aria-label"
=>
"Delete list"
,
data:
{
placement:
"bottom"
},
"@click"
=>
"deleteBoard"
}
=
icon
(
"trash"
)
=
icon
(
"spinner spin"
,
class:
"board-header-loading-spinner pull-right"
,
"v-show"
=>
"list.loadingMore"
)
.board-inner-container.board-search-container
{
"v-if"
=>
"list.canSearch()"
}
%input
.form-control
{
type:
"text"
,
placeholder:
"Search issues"
,
"v-model"
=>
"query"
,
"debounce"
=>
"250"
}
=
icon
(
"search"
,
class:
"board-search-icon"
,
"v-show"
=>
"!query"
)
...
...
spec/javascripts/boards/boards_store_spec.js.es6
View file @
9806db32
...
...
@@ -46,6 +46,18 @@
expect(list).toBeDefined();
});
it('finds list limited by type', () => {
BoardsStore.addList({
id: 1,
position: 0,
title: 'Test',
list_type: 'backlog'
});
const list = BoardsStore.findList('id', 1, 'backlog');
expect(list).toBeDefined();
});
it('gets issue when new list added', (done) => {
BoardsStore.addList(listObj);
const list = BoardsStore.findList('id', 1);
...
...
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