Commit 493037d5 authored by Fatih Acet's avatar Fatih Acet Committed by Rémy Coutable

Merge branch 'fix-mr-version-dropdowns' into 'master'

fix dropdowns for mr-versions

## What does this MR do?
Change markup of mr version dropdowns to be in line with ui guidelines so that the dropdown content is scrollable.

## Why was this MR needed?
Dropdowns were not scrolling.

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/issues/21427

cc @brycepj @dzaporozhets

See merge request !6460
parent 50731312
...@@ -10,11 +10,13 @@ ...@@ -10,11 +10,13 @@
- else - else
version #{version_index(@merge_request_diff)} version #{version_index(@merge_request_diff)}
%span.caret %span.caret
%ul.dropdown-menu.dropdown-menu-selectable .dropdown-menu.dropdown-select.dropdown-menu-selectable
.dropdown-title .dropdown-title
%span Version %span Version:
%button.dropdown-title-button.dropdown-menu-close %button.dropdown-title-button.dropdown-menu-close{aria: {label: "Close"}}
= icon('times', class: 'dropdown-menu-close-icon') = icon('times', class: 'dropdown-menu-close-icon')
.dropdown-content
%ul
- @merge_request_diffs.each do |merge_request_diff| - @merge_request_diffs.each do |merge_request_diff|
%li %li
= link_to merge_request_version_path(@project, @merge_request, merge_request_diff), class: ('is-active' if merge_request_diff == @merge_request_diff) do = link_to merge_request_version_path(@project, @merge_request, merge_request_diff), class: ('is-active' if merge_request_diff == @merge_request_diff) do
...@@ -38,11 +40,13 @@ ...@@ -38,11 +40,13 @@
- else - else
#{@merge_request.target_branch} #{@merge_request.target_branch}
%span.caret %span.caret
%ul.dropdown-menu.dropdown-menu-selectable .dropdown-menu.dropdown-select.dropdown-menu-selectable
.dropdown-title .dropdown-title
%span Compared with %span Compared with:
%button.dropdown-title-button.dropdown-menu-close %button.dropdown-title-button.dropdown-menu-close{aria: {label: "Close"}}
= icon('times', class: 'dropdown-menu-close-icon') = icon('times', class: 'dropdown-menu-close-icon')
.dropdown-content
%ul
- @comparable_diffs.each do |merge_request_diff| - @comparable_diffs.each do |merge_request_diff|
%li %li
= link_to merge_request_version_path(@project, @merge_request, @merge_request_diff, merge_request_diff.head_commit_sha), class: ('is-active' if merge_request_diff == @start_version) do = link_to merge_request_version_path(@project, @merge_request, @merge_request_diff, merge_request_diff.head_commit_sha), class: ('is-active' if merge_request_diff == @start_version) do
......
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