Commit 1503e899 authored by Tim Zallmann's avatar Tim Zallmann

Merge branch '48497-merge-request-refactor-displays-changes-dropdown-incorrectly-fix' into 'master'

Resolve "Merge request refactor displays changes dropdown incorrectly"

Closes #48497

See merge request gitlab-org/gitlab-ce!20245
parents a0ff7724 60379c7c
...@@ -66,59 +66,61 @@ export default { ...@@ -66,59 +66,61 @@ export default {
@click="clearSearch" @click="clearSearch"
></i> ></i>
</div> </div>
<ul> <div class="dropdown-content">
<li <ul>
v-for="diffFile in filteredDiffFiles" <li
:key="diffFile.name" v-for="diffFile in filteredDiffFiles"
> :key="diffFile.name"
<a
:href="`#${diffFile.fileHash}`"
:title="diffFile.newPath"
class="diff-changed-file"
> >
<icon <a
:name="fileChangedIcon(diffFile)" :href="`#${diffFile.fileHash}`"
:size="16" :title="diffFile.newPath"
:class="fileChangedClass(diffFile)" class="diff-changed-file"
class="diff-file-changed-icon append-right-8" >
/> <icon
<span class="diff-changed-file-content append-right-8"> :name="fileChangedIcon(diffFile)"
<strong :size="16"
v-if="diffFile.blob && diffFile.blob.name" :class="fileChangedClass(diffFile)"
class="diff-changed-file-name" class="diff-file-changed-icon append-right-8"
> />
{{ diffFile.blob.name }} <span class="diff-changed-file-content append-right-8">
</strong> <strong
<strong v-if="diffFile.blob && diffFile.blob.name"
v-else class="diff-changed-file-name"
class="diff-changed-blank-file-name" >
> {{ diffFile.blob.name }}
{{ s__('Diffs|No file name available') }} </strong>
</strong> <strong
<span class="diff-changed-file-path prepend-top-5"> v-else
{{ truncatedDiffPath(diffFile.blob.path) }} class="diff-changed-blank-file-name"
>
{{ s__('Diffs|No file name available') }}
</strong>
<span class="diff-changed-file-path prepend-top-5">
{{ truncatedDiffPath(diffFile.blob.path) }}
</span>
</span> </span>
</span> <span class="diff-changed-stats">
<span class="diff-changed-stats"> <span class="cgreen">
<span class="cgreen"> +{{ diffFile.addedLines }}
+{{ diffFile.addedLines }} </span>
<span class="cred">
-{{ diffFile.removedLines }}
</span>
</span> </span>
<span class="cred"> </a>
-{{ diffFile.removedLines }} </li>
</span>
</span>
</a>
</li>
<li <li
v-show="filteredDiffFiles.length === 0" v-show="filteredDiffFiles.length === 0"
class="dropdown-menu-empty-item" class="dropdown-menu-empty-item"
> >
<a> <a>
{{ __('No files found') }} {{ __('No files found') }}
</a> </a>
</li> </li>
</ul> </ul>
</div>
</div> </div>
</span> </span>
</template> </template>
...@@ -737,6 +737,10 @@ ...@@ -737,6 +737,10 @@
max-width: 560px; max-width: 560px;
width: 100%; width: 100%;
z-index: 150; z-index: 150;
min-height: $dropdown-min-height;
max-height: $dropdown-max-height;
overflow-y: auto;
margin-bottom: 0;
@include media-breakpoint-up(sm) { @include media-breakpoint-up(sm) {
left: $gl-padding; left: $gl-padding;
......
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