Skip to content

Commit 4b9328c

Browse files
committed
Reduce the default height of MR/branch dropdowns
To avoid having empty areas in the dropdown that occupy unnessary space, I removed the dropdown's min-height and changed its default height in empty state to be same as its loading state (with the spinner).
1 parent 8470c13 commit 4b9328c

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

app/assets/javascripts/ide/components/branches/search_list.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ export default {
6767
class="form-control dropdown-input-field"
6868
@input="searchBranches"
6969
/>
70-
<icon :size="18" name="search" class="input-icon" />
70+
<icon :size="18" name="search" class="ml-3 input-icon" />
7171
</label>
7272
<div class="dropdown-content ide-merge-requests-dropdown-content d-flex">
7373
<gl-loading-icon
7474
v-if="isLoading"
7575
:size="2"
7676
class="mt-3 mb-3 align-self-center ml-auto mr-auto"
7777
/>
78-
<ul v-else class="mb-3 w-100">
78+
<ul v-else class="mb-0 w-100">
7979
<template v-if="hasBranches">
8080
<li v-for="item in branches" :key="item.name">
8181
<item :item="item" :project-id="currentProjectId" :is-active="isActiveBranch(item)" />

app/assets/javascripts/ide/components/merge_requests/list.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export default {
8585
@input="searchMergeRequests"
8686
@removeToken="setSearchType(null)"
8787
/>
88-
<icon :size="18" name="search" class="input-icon" />
88+
<icon :size="18" name="search" class="ml-3 input-icon" />
8989
</label>
9090
<div class="dropdown-content ide-merge-requests-dropdown-content d-flex">
9191
<gl-loading-icon
@@ -94,7 +94,7 @@ export default {
9494
class="mt-3 mb-3 align-self-center ml-auto mr-auto"
9595
/>
9696
<template v-else>
97-
<ul class="mb-3 w-100">
97+
<ul class="mb-0 w-100">
9898
<template v-if="showSearchTypes">
9999
<li v-for="searchType in $options.searchTypes" :key="searchType.type">
100100
<button

app/assets/stylesheets/page_bundles/ide.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ $ide-commit-header-height: 48px;
11881188

11891189
.input-icon {
11901190
right: auto;
1191-
left: 26px;
1191+
left: 10px;
11921192
top: 50%;
11931193
transform: translateY(-50%);
11941194
}
@@ -1216,11 +1216,10 @@ $ide-commit-header-height: 48px;
12161216
}
12171217

12181218
.ide-search-list-empty {
1219-
height: 230px;
1219+
height: 69px;
12201220
}
12211221

12221222
.ide-merge-requests-dropdown-content {
1223-
min-height: 230px;
12241223
max-height: 470px;
12251224
}
12261225

0 commit comments

Comments
 (0)