summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorMark Lapierre <mlapierre@gitlab.com>2018-09-28 14:36:49 -0400
committerMark Lapierre <mlapierre@gitlab.com>2018-09-28 14:36:49 -0400
commit8589fa871ee5dd94f821e1f5cbbcee269b46acf9 (patch)
tree4894dbebe97d3f6ffd41bc58fe49661bfd95772d /app/views
parent1ed5ab50c7931cee1283b21512784a487668a27f (diff)
downloadgitlab-ce-8589fa871ee5dd94f821e1f5cbbcee269b46acf9.tar.gz
Optimize groups filter
When searching for a group, submit a request that returns only the filtered list of groups. This makes the state of the page more reliable because it avoids having to wait for the list of groups to dynamically refresh.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/dashboard/groups/_groups.html.haml2
-rw-r--r--app/views/shared/groups/_search_form.html.haml2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/dashboard/groups/_groups.html.haml b/app/views/dashboard/groups/_groups.html.haml
index db856ef7d7b..94d53b78c0f 100644
--- a/app/views/dashboard/groups/_groups.html.haml
+++ b/app/views/dashboard/groups/_groups.html.haml
@@ -1,4 +1,4 @@
.js-groups-list-holder
#js-groups-tree{ data: { hide_projects: 'true', endpoint: dashboard_groups_path(format: :json), path: dashboard_groups_path, form_sel: 'form#group-filter-form', filter_sel: '.js-groups-list-filter', holder_sel: '.js-groups-list-holder', dropdown_sel: '.js-group-filter-dropdown-wrap' } }
.loading-container.text-center
- = icon('spinner spin 2x', class: 'loading-animation prepend-top-20')
+ = icon('spinner spin 2x', class: 'loading-animation prepend-top-20 qa-loading-animation')
diff --git a/app/views/shared/groups/_search_form.html.haml b/app/views/shared/groups/_search_form.html.haml
index 67e1cd0d67b..49b812baefc 100644
--- a/app/views/shared/groups/_search_form.html.haml
+++ b/app/views/shared/groups/_search_form.html.haml
@@ -1,2 +1,2 @@
= form_tag request.path, method: :get, class: "group-filter-form js-group-filter-form", id: 'group-filter-form' do |f|
- = search_field_tag :filter, params[:filter], placeholder: s_('GroupsTree|Search by name'), class: 'group-filter-form-field form-control js-groups-list-filter', spellcheck: false, id: 'group-filter-form-field', tabindex: "2"
+ = search_field_tag :filter, params[:filter], placeholder: s_('GroupsTree|Search by name'), class: 'group-filter-form-field form-control js-groups-list-filter qa-groups-filter', spellcheck: false, id: 'group-filter-form-field', tabindex: "2"