Commit 2c9b6c98 authored by Zack Cuddy's avatar Zack Cuddy Committed by Olena Horal-Koretska

Global Search - Fix Sidebar Whitespace

On very large screens, we give
too much space to the left sidebar.

This simply adds a col-2 on XL screens
(1200px).
parent 59e3ea2c
...@@ -26,7 +26,7 @@ export default { ...@@ -26,7 +26,7 @@ export default {
<template> <template>
<form <form
class="gl-display-flex gl-flex-direction-column col-md-3 gl-mr-4 gl-mb-6 gl-mt-5" class="search-sidebar gl-display-flex gl-flex-direction-column gl-mr-4 gl-mb-6 gl-mt-5"
@submit.prevent="applyQuery" @submit.prevent="applyQuery"
> >
<status-filter /> <status-filter />
......
$search-dropdown-max-height: 400px; $search-dropdown-max-height: 400px;
$search-avatar-size: 16px; $search-avatar-size: 16px;
$search-sidebar-min-width: 240px;
$search-sidebar-max-width: 300px;
.search-results { .search-results {
.search-result-row { .search-result-row {
...@@ -17,6 +19,13 @@ $search-avatar-size: 16px; ...@@ -17,6 +19,13 @@ $search-avatar-size: 16px;
} }
} }
.search-sidebar {
@include media-breakpoint-up(md) {
min-width: $search-sidebar-min-width;
max-width: $search-sidebar-max-width;
}
}
.search form:hover, .search form:hover,
.file-finder-input:hover, .file-finder-input:hover,
.issuable-search-form:hover, .issuable-search-form:hover,
......
- search_bar_classes = 'search-sidebar gl-display-flex gl-flex-direction-column gl-mr-4'
- if @search_objects.to_a.empty? - if @search_objects.to_a.empty?
.gl-display-md-flex .gl-display-md-flex
- if %w(issues merge_requests).include?(@scope) - if %w(issues merge_requests).include?(@scope)
#js-search-sidebar.gl-display-flex.gl-flex-direction-column.col-md-3.gl-mr-4{ } #js-search-sidebar{ class: search_bar_classes }
.gl-w-full .gl-w-full.gl-flex-fill-1.gl-overflow-x-hidden
= render partial: "search/results/empty" = render partial: "search/results/empty"
= render_if_exists 'shared/promotions/promote_advanced_search' = render_if_exists 'shared/promotions/promote_advanced_search'
- else - else
...@@ -11,8 +13,8 @@ ...@@ -11,8 +13,8 @@
.results.gl-display-md-flex.gl-mt-3 .results.gl-display-md-flex.gl-mt-3
- if %w(issues merge_requests).include?(@scope) - if %w(issues merge_requests).include?(@scope)
#js-search-sidebar.gl-display-flex.gl-flex-direction-column.col-md-3.gl-mr-4{ } #js-search-sidebar{ class: search_bar_classes }
.gl-w-full .gl-w-full.gl-flex-fill-1.gl-overflow-x-hidden
- if @scope == 'commits' - if @scope == 'commits'
%ul.content-list.commit-list %ul.content-list.commit-list
= render partial: "search/results/commit", collection: @search_objects = render partial: "search/results/commit", collection: @search_objects
......
---
title: Global Search - Fix Sidebar Whitespace
merge_request: 48832
author:
type: changed
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