Commit 8c870e22 authored by Coung Ngo's avatar Coung Ngo

Fix issues on issue board cards with new "Show labels" button

- Reuse SCSS variables
- Create new breakpoint for boards search bar layout between 768 to 992
parent d9627de2
...@@ -357,7 +357,8 @@ ...@@ -357,7 +357,8 @@
} }
} }
.filter-dropdown-container > div { .filter-dropdown-container {
> div {
margin: 0; margin: 0;
> .btn { > .btn {
...@@ -366,6 +367,11 @@ ...@@ -366,6 +367,11 @@
} }
} }
.board-labels-toggle-wrapper {
margin-bottom: $gl-input-padding;
}
}
.boards-add-list > .btn { .boards-add-list > .btn {
text-align: left; text-align: left;
......
...@@ -497,7 +497,7 @@ ...@@ -497,7 +497,7 @@
.add-issues-footer-to-list { .add-issues-footer-to-list {
padding-left: $gl-vert-padding; padding-left: $gl-vert-padding;
padding-right: $gl-vert-padding; padding-right: $gl-vert-padding;
line-height: 34px; line-height: $input-height;
} }
.issue-card-selected { .issue-card-selected {
...@@ -551,9 +551,5 @@ ...@@ -551,9 +551,5 @@
* Make the wrapper the same height as a button so it aligns properly when the * Make the wrapper the same height as a button so it aligns properly when the
* filtered-search-box input element increases in size on Linux smaller breakpoints * filtered-search-box input element increases in size on Linux smaller breakpoints
*/ */
height: 34px; height: $input-height;
@include media-breakpoint-down(sm) {
margin-bottom: 10px;
}
} }
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
- user_can_admin_list = board && can?(current_user, :admin_list, board.resource_parent) - user_can_admin_list = board && can?(current_user, :admin_list, board.resource_parent)
.issues-filters{ class: ("w-100" if type == :boards_modal) } .issues-filters{ class: ("w-100" if type == :boards_modal) }
.issues-details-filters.filtered-search-block.d-flex.flex-column.flex-md-row{ class: block_css_class, "v-pre" => type == :boards_modal } .issues-details-filters.filtered-search-block.d-flex.flex-column.flex-lg-row{ class: block_css_class, "v-pre" => type == :boards_modal }
.d-flex.flex-column.flex-md-row.flex-grow-1.mb-lg-0.mb-md-2.mb-sm-0
- if type == :boards - if type == :boards
= render "shared/boards/switcher", board: board = render "shared/boards/switcher", board: board
= form_tag page_filter_path, method: :get, class: 'filter-form js-filter-form w-100' do = form_tag page_filter_path, method: :get, class: 'filter-form js-filter-form w-100' do
...@@ -160,8 +161,8 @@ ...@@ -160,8 +161,8 @@
%button.clear-search.hidden{ type: 'button' } %button.clear-search.hidden{ type: 'button' }
= icon('times') = icon('times')
#js-board-labels-toggle
.filter-dropdown-container.d-flex.flex-column.flex-md-row .filter-dropdown-container.d-flex.flex-column.flex-md-row
#js-board-labels-toggle
- if type == :boards - if type == :boards
.js-board-config{ data: { can_admin_list: user_can_admin_list, has_scope: board.scoped? } } .js-board-config{ data: { can_admin_list: user_can_admin_list, has_scope: board.scoped? } }
- if user_can_admin_list - if user_can_admin_list
......
...@@ -37,7 +37,7 @@ export default () => ...@@ -37,7 +37,7 @@ export default () =>
}, },
template: ` template: `
<div class="board-labels-toggle-wrapper d-flex align-items-center prepend-left-10"> <div class="board-labels-toggle-wrapper d-flex align-items-center prepend-left-10">
<span id="board-labels-toggle-text"> <span id="board-labels-toggle-text" class="text-nowrap">
{{ __('Show labels') }} {{ __('Show labels') }}
</span> </span>
<gl-toggle <gl-toggle
......
---
title: Hide labels from issue board cards
merge_request: 20072
author:
type: fixed
...@@ -57,7 +57,7 @@ describe 'Sort Issuable List' do ...@@ -57,7 +57,7 @@ describe 'Sort Issuable List' do
it 'is "last updated"' do it 'is "last updated"' do
visit_merge_requests_with_state(project, 'merged') visit_merge_requests_with_state(project, 'merged')
expect(find('.issues-other-filters')).to have_content('Last updated') expect(find('.filter-dropdown-container')).to have_content('Last updated')
expect(first_merge_request).to include(last_updated_issuable.title) expect(first_merge_request).to include(last_updated_issuable.title)
expect(last_merge_request).to include(first_updated_issuable.title) expect(last_merge_request).to include(first_updated_issuable.title)
end end
...@@ -69,7 +69,7 @@ describe 'Sort Issuable List' do ...@@ -69,7 +69,7 @@ describe 'Sort Issuable List' do
it 'is "last updated"' do it 'is "last updated"' do
visit_merge_requests_with_state(project, 'closed') visit_merge_requests_with_state(project, 'closed')
expect(find('.issues-other-filters')).to have_content('Last updated') expect(find('.filter-dropdown-container')).to have_content('Last updated')
expect(first_merge_request).to include(last_updated_issuable.title) expect(first_merge_request).to include(last_updated_issuable.title)
expect(last_merge_request).to include(first_updated_issuable.title) expect(last_merge_request).to include(first_updated_issuable.title)
end end
...@@ -81,7 +81,7 @@ describe 'Sort Issuable List' do ...@@ -81,7 +81,7 @@ describe 'Sort Issuable List' do
it 'is "created date"' do it 'is "created date"' do
visit_merge_requests_with_state(project, 'all') visit_merge_requests_with_state(project, 'all')
expect(find('.issues-other-filters')).to have_content('Created date') expect(find('.filter-dropdown-container')).to have_content('Created date')
expect(first_merge_request).to include(last_created_issuable.title) expect(first_merge_request).to include(last_created_issuable.title)
expect(last_merge_request).to include(first_created_issuable.title) expect(last_merge_request).to include(first_created_issuable.title)
end end
...@@ -94,7 +94,7 @@ describe 'Sort Issuable List' do ...@@ -94,7 +94,7 @@ describe 'Sort Issuable List' do
it 'supports sorting in asc and desc order' do it 'supports sorting in asc and desc order' do
visit_merge_requests_with_state(project, 'open') visit_merge_requests_with_state(project, 'open')
page.within('.issues-other-filters') do page.within('.filter-dropdown-container') do
click_button('Created date') click_button('Created date')
click_link('Last updated') click_link('Last updated')
end end
...@@ -102,7 +102,7 @@ describe 'Sort Issuable List' do ...@@ -102,7 +102,7 @@ describe 'Sort Issuable List' do
expect(first_merge_request).to include(last_updated_issuable.title) expect(first_merge_request).to include(last_updated_issuable.title)
expect(last_merge_request).to include(first_updated_issuable.title) expect(last_merge_request).to include(first_updated_issuable.title)
find('.issues-other-filters .filter-dropdown-container .rspec-reverse-sort').click find('.filter-dropdown-container .rspec-reverse-sort').click
expect(first_merge_request).to include(first_updated_issuable.title) expect(first_merge_request).to include(first_updated_issuable.title)
expect(last_merge_request).to include(last_updated_issuable.title) expect(last_merge_request).to include(last_updated_issuable.title)
...@@ -133,7 +133,7 @@ describe 'Sort Issuable List' do ...@@ -133,7 +133,7 @@ describe 'Sort Issuable List' do
it 'is "created date"' do it 'is "created date"' do
visit_issues project visit_issues project
expect(find('.issues-other-filters')).to have_content('Created date') expect(find('.filter-dropdown-container')).to have_content('Created date')
expect(first_issue).to include(last_created_issuable.title) expect(first_issue).to include(last_created_issuable.title)
expect(last_issue).to include(first_created_issuable.title) expect(last_issue).to include(first_created_issuable.title)
end end
...@@ -145,7 +145,7 @@ describe 'Sort Issuable List' do ...@@ -145,7 +145,7 @@ describe 'Sort Issuable List' do
it 'is "created date"' do it 'is "created date"' do
visit_issues_with_state(project, 'open') visit_issues_with_state(project, 'open')
expect(find('.issues-other-filters')).to have_content('Created date') expect(find('.filter-dropdown-container')).to have_content('Created date')
expect(first_issue).to include(last_created_issuable.title) expect(first_issue).to include(last_created_issuable.title)
expect(last_issue).to include(first_created_issuable.title) expect(last_issue).to include(first_created_issuable.title)
end end
...@@ -157,7 +157,7 @@ describe 'Sort Issuable List' do ...@@ -157,7 +157,7 @@ describe 'Sort Issuable List' do
it 'is "last updated"' do it 'is "last updated"' do
visit_issues_with_state(project, 'closed') visit_issues_with_state(project, 'closed')
expect(find('.issues-other-filters')).to have_content('Last updated') expect(find('.filter-dropdown-container')).to have_content('Last updated')
expect(first_issue).to include(last_updated_issuable.title) expect(first_issue).to include(last_updated_issuable.title)
expect(last_issue).to include(first_updated_issuable.title) expect(last_issue).to include(first_updated_issuable.title)
end end
...@@ -169,7 +169,7 @@ describe 'Sort Issuable List' do ...@@ -169,7 +169,7 @@ describe 'Sort Issuable List' do
it 'is "created date"' do it 'is "created date"' do
visit_issues_with_state(project, 'all') visit_issues_with_state(project, 'all')
expect(find('.issues-other-filters')).to have_content('Created date') expect(find('.filter-dropdown-container')).to have_content('Created date')
expect(first_issue).to include(last_created_issuable.title) expect(first_issue).to include(last_created_issuable.title)
expect(last_issue).to include(first_created_issuable.title) expect(last_issue).to include(first_created_issuable.title)
end end
...@@ -183,7 +183,7 @@ describe 'Sort Issuable List' do ...@@ -183,7 +183,7 @@ describe 'Sort Issuable List' do
end end
it 'shows the sort order as created date' do it 'shows the sort order as created date' do
expect(find('.issues-other-filters')).to have_content('Created date') expect(find('.filter-dropdown-container')).to have_content('Created date')
expect(first_issue).to include(last_created_issuable.title) expect(first_issue).to include(last_created_issuable.title)
expect(last_issue).to include(first_created_issuable.title) expect(last_issue).to include(first_created_issuable.title)
end end
...@@ -196,7 +196,7 @@ describe 'Sort Issuable List' do ...@@ -196,7 +196,7 @@ describe 'Sort Issuable List' do
it 'supports sorting in asc and desc order' do it 'supports sorting in asc and desc order' do
visit_issues_with_state(project, 'open') visit_issues_with_state(project, 'open')
page.within('.issues-other-filters') do page.within('.filter-dropdown-container') do
click_button('Created date') click_button('Created date')
click_link('Last updated') click_link('Last updated')
end end
...@@ -204,7 +204,7 @@ describe 'Sort Issuable List' do ...@@ -204,7 +204,7 @@ describe 'Sort Issuable List' do
expect(first_issue).to include(last_updated_issuable.title) expect(first_issue).to include(last_updated_issuable.title)
expect(last_issue).to include(first_updated_issuable.title) expect(last_issue).to include(first_updated_issuable.title)
find('.issues-other-filters .filter-dropdown-container .rspec-reverse-sort').click find('.filter-dropdown-container .rspec-reverse-sort').click
expect(first_issue).to include(first_updated_issuable.title) expect(first_issue).to include(first_updated_issuable.title)
expect(last_issue).to include(last_updated_issuable.title) expect(last_issue).to include(last_updated_issuable.title)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment