summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-03-06 18:00:11 +0000
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-03-06 18:00:11 +0000
commit450d05981d8da3c6f38ae4ff03dec69b63a7b2c3 (patch)
treef786bbfba6d69b84c84e17b41e8aa8d2ac1696ef
parent528f3ca27c13f067ba418d21ea56d779dafac1f1 (diff)
parent01fae38305799112a2957685bda59336c4ed8110 (diff)
downloadgitlab-ce-450d05981d8da3c6f38ae4ff03dec69b63a7b2c3.tar.gz
Merge branch 'cowbellerina-22562-todos-filters' into 'master'
Fix Sort dropdown reflow issue Closes #22562 See merge request !9728
-rw-r--r--app/assets/stylesheets/framework/dropdowns.scss2
-rw-r--r--app/assets/stylesheets/framework/filters.scss15
-rw-r--r--app/assets/stylesheets/pages/todos.scss10
-rw-r--r--app/views/dashboard/todos/index.html.haml8
-rw-r--r--changelogs/unreleased/22562-todos-filters.yml4
5 files changed, 28 insertions, 11 deletions
diff --git a/app/assets/stylesheets/framework/dropdowns.scss b/app/assets/stylesheets/framework/dropdowns.scss
index 6e8a5cc688b..2a403589a53 100644
--- a/app/assets/stylesheets/framework/dropdowns.scss
+++ b/app/assets/stylesheets/framework/dropdowns.scss
@@ -96,7 +96,7 @@
.dropdown-menu-toggle {
@extend .dropdown-toggle;
- padding-right: 20px;
+ padding-right: 25px;
position: relative;
width: 163px;
text-overflow: ellipsis;
diff --git a/app/assets/stylesheets/framework/filters.scss b/app/assets/stylesheets/framework/filters.scss
index d2be8dc7a39..0ba00cea8b5 100644
--- a/app/assets/stylesheets/framework/filters.scss
+++ b/app/assets/stylesheets/framework/filters.scss
@@ -1,5 +1,4 @@
.filter-item {
- margin-right: 6px;
vertical-align: top;
&.reset-filters {
@@ -14,6 +13,20 @@
width: 132px;
}
}
+
+ .filter-item:not(:last-child) {
+ margin-right: 6px;
+ }
+
+ .sort-filter {
+ display: inline-block;
+ float: right;
+ }
+
+ .dropdown-menu-sort {
+ left: auto;
+ right: 0;
+ }
}
@media (max-width: $screen-xs-max) {
diff --git a/app/assets/stylesheets/pages/todos.scss b/app/assets/stylesheets/pages/todos.scss
index af9ddb9ff80..5f0aede4f5e 100644
--- a/app/assets/stylesheets/pages/todos.scss
+++ b/app/assets/stylesheets/pages/todos.scss
@@ -170,7 +170,11 @@
@media (max-width: $screen-sm-max) {
.todos-filters {
.dropdown-menu-toggle {
- width: 135px;
+ width: 130px;
+ }
+
+ .dropdown-menu-toggle-sort {
+ width: auto;
}
}
}
@@ -200,10 +204,6 @@
}
.todos-filters {
- .row-content-block {
- padding-bottom: 50px;
- }
-
.dropdown-menu-toggle {
width: 100%;
}
diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml
index 16a5713948a..d7e0a8e4b2c 100644
--- a/app/views/dashboard/todos/index.html.haml
+++ b/app/views/dashboard/todos/index.html.haml
@@ -46,16 +46,16 @@
= hidden_field_tag(:action_id, params[:action_id])
= dropdown_tag(todo_actions_dropdown_label(params[:action_id], 'Action'), options: { toggle_class: 'js-action-search js-filter-submit', dropdown_class: 'dropdown-menu-selectable dropdown-menu-action js-filter-submit',
data: { data: todo_actions_options, default_label: 'Action' } })
- .pull-right
- .dropdown.inline.prepend-left-10
- %button.dropdown-toggle{ type: 'button', 'data-toggle' => 'dropdown' }
+ .filter-item.sort-filter
+ .dropdown
+ %button.dropdown-menu-toggle.dropdown-menu-toggle-sort{ type: 'button', 'data-toggle' => 'dropdown' }
%span.light
- if @sort.present?
= sort_options_hash[@sort]
- else
= sort_title_recently_created
= icon('chevron-down')
- %ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-sort
+ %ul.dropdown-menu.dropdown-menu-sort
%li
= link_to todos_filter_path(sort: sort_value_priority) do
= sort_title_priority
diff --git a/changelogs/unreleased/22562-todos-filters.yml b/changelogs/unreleased/22562-todos-filters.yml
new file mode 100644
index 00000000000..9cca138744a
--- /dev/null
+++ b/changelogs/unreleased/22562-todos-filters.yml
@@ -0,0 +1,4 @@
+---
+title: Fix Sort dropdown reflow issue
+merge_request: 9533
+author: Jarkko Tuunanen