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
Léo-Paul Géneau
gitlab-ce
Commits
619f7ec8
Commit
619f7ec8
authored
Feb 02, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show empty state if filter returns empty results
parent
c3339b33
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
1 deletion
+37
-1
app/assets/javascripts/boards/components/modal/index.js.es6
app/assets/javascripts/boards/components/modal/index.js.es6
+2
-1
app/assets/javascripts/boards/components/modal/list.js.es6
app/assets/javascripts/boards/components/modal/list.js.es6
+17
-0
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+6
-0
spec/features/boards/modal_filter_spec.rb
spec/features/boards/modal_filter_spec.rb
+12
-0
No files found.
app/assets/javascripts/boards/components/modal/index.js.es6
View file @
619f7ec8
...
...
@@ -75,7 +75,7 @@
}, 500),
loadIssues(clearIssues = false) {
if (!this.showAddIssuesModal) return;
const data = Object.assign({}, this.filter, {
search: this.searchTerm,
page: this.page,
...
...
@@ -138,6 +138,7 @@
:label-path="labelPath">
</modal-header>
<modal-list
:image="blankStateImage"
:issue-link-base="issueLinkBase"
:root-path="rootPath"
v-if="!loading && showList"></modal-list>
...
...
app/assets/javascripts/boards/components/modal/list.js.es6
View file @
619f7ec8
...
...
@@ -14,6 +14,10 @@
type: String,
required: true,
},
image: {
type: String,
required: true,
},
},
data() {
return ModalStore.store;
...
...
@@ -110,6 +114,19 @@
<section
class="add-issues-list add-issues-list-columns"
ref="list">
<div
class="empty-state add-issues-empty-state-filter text-center"
v-if="issuesCount > 0 && issues.length === 0">
<div
class="svg-content"
v-html="image">
</div>
<div class="text-content">
<h4>
There are no issues to show.
</h4>
</div>
</div>
<div
v-for="group in groupedIssues"
class="add-issues-list-column">
...
...
app/assets/stylesheets/pages/boards.scss
View file @
619f7ec8
...
...
@@ -389,6 +389,12 @@
flex
:
1
;
margin-top
:
0
;
&
.add-issues-empty-state-filter
{
-webkit-flex-direction
:
column
;
flex-direction
:
column
;
margin-top
:
50px
;
}
>
.row
{
width
:
100%
;
margin
:
auto
0
;
...
...
spec/features/boards/modal_filter_spec.rb
View file @
619f7ec8
...
...
@@ -16,6 +16,18 @@ describe 'Issue Boards add issue modal filtering', :feature, :js do
login_as
(
user
)
end
it
'shows empty state when no results found'
do
visit_board
page
.
within
(
'.add-issues-modal'
)
do
find
(
'.form-control'
).
native
.
send_keys
(
'testing empty state'
)
wait_for_vue_resource
expect
(
page
).
to
have_content
(
'There are no issues to show.'
)
end
end
it
'restores filters when closing'
do
visit_board
...
...
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