Commit 66b74b20 authored by Simon Knox's avatar Simon Knox Committed by Illya Klymov

Reorder and align boards search bar buttons

Group by button next to Show labels, so buttons are all together
Align label text for toggles and dropdowns
Vetically align all buttons
Convert Group by and fullscreen buttons to gl-buttons
Add flex + center
parent 610d4f34
...@@ -13,8 +13,8 @@ export default { ...@@ -13,8 +13,8 @@ export default {
</script> </script>
<template> <template>
<span class="gl-ml-4"> <span class="gl-ml-3 gl-display-flex gl-align-items-center">
<gl-button variant="success" @click="setAddColumnFormVisibility(true)" <gl-button variant="confirm" @click="setAddColumnFormVisibility(true)"
>{{ __('Create list') }} >{{ __('Create list') }}
</gl-button> </gl-button>
</span> </span>
......
<script> <script>
import { GlIcon } from '@gitlab/ui'; import { GlButton, GlTooltipDirective as GlTooltip } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import { hide } from '~/tooltips'; import { hide } from '~/tooltips';
export default { export default {
components: { components: {
GlIcon, GlButton,
},
directives: {
GlTooltip,
}, },
props: { props: {
issueBoardsContentSelector: { issueBoardsContentSelector: {
...@@ -35,18 +38,15 @@ export default { ...@@ -35,18 +38,15 @@ export default {
</script> </script>
<template> <template>
<div class="board-extra-actions"> <div class="board-extra-actions gl-ml-3 gl-display-flex gl-align-items-center">
<a <gl-button
ref="toggleFocusModeButton" ref="toggleFocusModeButton"
href="#" v-gl-tooltip
class="btn btn-default has-tooltip gl-ml-3 js-focus-mode-btn" :icon="isFullscreen ? 'minimize' : 'maximize'"
class="js-focus-mode-btn"
data-qa-selector="focus_mode_button" data-qa-selector="focus_mode_button"
role="button"
:aria-label="$options.i18n.toggleFocusMode"
:title="$options.i18n.toggleFocusMode" :title="$options.i18n.toggleFocusMode"
@click="toggleFocusMode" @click="toggleFocusMode"
> />
<gl-icon :name="isFullscreen ? 'minimize' : 'maximize'" />
</a>
</div> </div>
</template> </template>
...@@ -280,7 +280,7 @@ module ApplicationHelper ...@@ -280,7 +280,7 @@ module ApplicationHelper
def page_class def page_class
class_names = [] class_names = []
class_names << 'issue-boards-page' if current_controller?(:boards) class_names << 'issue-boards-page gl-overflow-hidden' if current_controller?(:boards)
class_names << 'environment-logs-page' if current_controller?(:logs) class_names << 'environment-logs-page' if current_controller?(:logs)
class_names << 'with-performance-bar' if performance_bar_enabled? class_names << 'with-performance-bar' if performance_bar_enabled?
class_names << system_message_class class_names << system_message_class
......
.dropdown.gl-ml-3#js-add-list .dropdown.gl-display-flex.gl-align-items-center.gl-ml-3#js-add-list
%button.gl-button.btn.btn-success.btn-inverted.js-new-board-list{ type: "button", data: board_list_data } %button.gl-button.btn.btn-confirm.btn-confirm-secondary.js-new-board-list{ type: "button", data: board_list_data }
Add list Add list
.dropdown-menu.dropdown-extended-height.dropdown-menu-paging.dropdown-menu-right.dropdown-menu-issues-board-new.dropdown-menu-selectable.js-tab-container-labels .dropdown-menu.dropdown-extended-height.dropdown-menu-paging.dropdown-menu-right.dropdown-menu-issues-board-new.dropdown-menu-selectable.js-tab-container-labels
= render partial: "shared/issuable/label_page_default", locals: { show_footer: true, show_create: true, show_boards_content: true, title: "Add list" } = render partial: "shared/issuable/label_page_default", locals: { show_footer: true, show_create: true, show_boards_content: true, title: "Add list" }
......
...@@ -193,6 +193,8 @@ ...@@ -193,6 +193,8 @@
.filter-dropdown-container.d-flex.flex-column.flex-md-row .filter-dropdown-container.d-flex.flex-column.flex-md-row
- if type == :boards - if type == :boards
#js-board-labels-toggle #js-board-labels-toggle
- if current_user
#js-board-epics-swimlanes-toggle
.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
- if Feature.enabled?(:board_new_list, board.resource_parent, default_enabled: :yaml) - if Feature.enabled?(:board_new_list, board.resource_parent, default_enabled: :yaml)
...@@ -200,9 +202,7 @@ ...@@ -200,9 +202,7 @@
- else - else
= render 'shared/issuable/board_create_list_dropdown', board: board = render 'shared/issuable/board_create_list_dropdown', board: board
- if @project - if @project
#js-add-issues-btn.gl-ml-3{ data: { can_admin_list: can?(current_user, :admin_list, @project) } } #js-add-issues-btn{ data: { can_admin_list: can?(current_user, :admin_list, @project) } }
- if current_user
#js-board-epics-swimlanes-toggle
#js-toggle-focus-btn #js-toggle-focus-btn
- elsif is_not_boards_modal_or_productivity_analytics && show_sorting_dropdown - elsif is_not_boards_modal_or_productivity_analytics && show_sorting_dropdown
= render 'shared/issuable/sort_dropdown' = render 'shared/issuable/sort_dropdown'
---
title: Align and reorder boards search bar buttons
merge_request: 53690
author:
type: changed
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
</script> </script>
<template> <template>
<div class="gl-ml-3"> <div class="gl-ml-3 gl-display-flex gl-align-items-center">
<gl-button <gl-button
v-gl-modal-directive="'board-config-modal'" v-gl-modal-directive="'board-config-modal'"
v-gl-tooltip v-gl-tooltip
......
...@@ -54,16 +54,12 @@ export default { ...@@ -54,16 +54,12 @@ export default {
data-testid="toggle-swimlanes" data-testid="toggle-swimlanes"
> >
<span <span
class="board-swimlanes-toggle-text gl-white-space-nowrap gl-font-weight-bold" class="board-swimlanes-toggle-text gl-white-space-nowrap gl-font-weight-bold gl-line-height-normal"
data-testid="toggle-swimlanes-label" data-testid="toggle-swimlanes-label"
> >
{{ __('Group by') }} {{ __('Group by') }}
</span> </span>
<gl-dropdown <gl-dropdown right :text="dropdownLabel" class="gl-ml-3" toggle-class="gl-line-height-normal!">
right
:text="dropdownLabel"
toggle-class="gl-ml-3 gl-border-none gl-inset-border-1-gray-200! border-radius-default"
>
<gl-dropdown-item <gl-dropdown-item
:is-check-item="true" :is-check-item="true"
:is-checked="!isShowingEpicsSwimlanes" :is-checked="!isShowingEpicsSwimlanes"
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
- milestone_lists_available = board.resource_parent.feature_available?(:board_milestone_lists) - milestone_lists_available = board.resource_parent.feature_available?(:board_milestone_lists)
- if assignee_lists_available || milestone_lists_available - if assignee_lists_available || milestone_lists_available
.dropdown.boards-add-list.gl-ml-3#js-add-list .dropdown.boards-add-list.gl-ml-3.gl-display-flex.gl-align-items-center#js-add-list
%button.btn.gl-button.btn-success.btn-inverted.d-flex.js-new-board-list{ type: "button", data: board_list_data } %button.btn.gl-button.btn-confirm.btn-confirm-secondary.gl-display-flex.js-new-board-list{ type: "button", data: board_list_data }
%span Add list %span Add list
= sprite_icon('chevron-down', css_class: 'gl-ml-2 btn-success-board-list-chevron') = sprite_icon('chevron-down', css_class: 'gl-ml-2 btn-success-board-list-chevron')
.dropdown-menu.dropdown-menu-paging.dropdown-menu-right.dropdown-menu-issues-board-new.dropdown-menu-selectable.dropdown-menu-tabs.pt-0 .dropdown-menu.dropdown-menu-paging.dropdown-menu-right.dropdown-menu-issues-board-new.dropdown-menu-selectable.dropdown-menu-tabs.pt-0
......
...@@ -575,7 +575,7 @@ RSpec.describe 'Issue Boards', :js do ...@@ -575,7 +575,7 @@ RSpec.describe 'Issue Boards', :js do
end end
it 'shows the button' do it 'shows the button' do
expect(page).to have_link('Toggle focus mode') expect(page).to have_button('Toggle focus mode')
end end
end end
......
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