From fcc88e52feb5b19ae6a2ab8264472643b7894aa4 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Mon, 1 Aug 2016 16:21:08 +0100 Subject: [PATCH] Fixed some styling issues in new list dropdown --- .../boards/components/new_list_dropdown.js.es6 | 4 ++++ app/assets/stylesheets/pages/boards.scss | 9 ++++++++- app/views/shared/issuable/_filter.html.haml | 6 +----- app/views/shared/issuable/_label_page_default.html.haml | 9 ++++++--- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/boards/components/new_list_dropdown.js.es6 b/app/assets/javascripts/boards/components/new_list_dropdown.js.es6 index 64e081a462f..f1a8941a733 100644 --- a/app/assets/javascripts/boards/components/new_list_dropdown.js.es6 +++ b/app/assets/javascripts/boards/components/new_list_dropdown.js.es6 @@ -23,6 +23,10 @@ $(() => { return $li.append($a.prepend($labelColor)); }, + search: { + fields: ['title'] + }, + filterable: true, selectable: true, clicked: (label, $el, e) => { e.preventDefault(); diff --git a/app/assets/stylesheets/pages/boards.scss b/app/assets/stylesheets/pages/boards.scss index 5fcfd346485..0c2bb319c2b 100644 --- a/app/assets/stylesheets/pages/boards.scss +++ b/app/assets/stylesheets/pages/boards.scss @@ -4,13 +4,20 @@ .dropdown-menu-issues-board-new { width: 320px; + + .dropdown-content { + max-height: 150px; + } } .issue-board-dropdown-content { - padding: 0px 8px; + margin: 0 8px 10px 8px; + padding-bottom: 10px; + border-bottom: 1px solid $dropdown-divider-color; > p { margin: 0; + font-size: 14px; color: #9c9c9c; } } diff --git a/app/views/shared/issuable/_filter.html.haml b/app/views/shared/issuable/_filter.html.haml index 773f3975816..4f26d92ae6f 100644 --- a/app/views/shared/issuable/_filter.html.haml +++ b/app/views/shared/issuable/_filter.html.haml @@ -34,11 +34,7 @@ %button.btn.btn-create.js-new-board-list{ type: "button", data: { toggle: "dropdown", labels: labels_filter_path } } Create new list .dropdown-menu.dropdown-menu-paging.dropdown-menu-align-right.dropdown-menu-issues-board-new - = dropdown_title("Create a new list") - .issue-board-dropdown-content - %p - Add a list to issue boards by selecting a label below. The list will automatically be populated with issues that have that label. To create a list for a label that doesn't exist yet, simply create the label below. - = render partial: "shared/issuable/label_page_default", locals: { show_title: false, show_footer: true, show_create: true } + = render partial: "shared/issuable/label_page_default", locals: { show_footer: true, show_create: true, show_boards_content: true, title: "Create a new list" } - if can?(current_user, :admin_label, @project) = render partial: "shared/issuable/label_page_create" = dropdown_loading diff --git a/app/views/shared/issuable/_label_page_default.html.haml b/app/views/shared/issuable/_label_page_default.html.haml index 47f056604e9..e1e8929722c 100644 --- a/app/views/shared/issuable/_label_page_default.html.haml +++ b/app/views/shared/issuable/_label_page_default.html.haml @@ -1,11 +1,14 @@ - title = local_assigns.fetch(:title, 'Assign labels') - show_create = local_assigns.fetch(:show_create, true) - show_footer = local_assigns.fetch(:show_footer, true) -- show_title = local_assigns.fetch(:show_title, true) - filter_placeholder = local_assigns.fetch(:filter_placeholder, 'Search labels') +- show_boards_content = local_assigns.fetch(:show_boards_content, false) .dropdown-page-one - - if show_title - = dropdown_title(title) + = dropdown_title(title) + - if show_boards_content + .issue-board-dropdown-content + %p + Add a list to issue boards by selecting a label below. The list will automatically be populated with issues that have that label. To create a list for a label that doesn't exist yet, simply create the label below. = dropdown_filter(filter_placeholder) = dropdown_content - if @project && show_footer