Commit cb6ad67f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'check-out-branch-button' into 'master'

Add "Check out branch" button to the MR page.

I appreciated the thought behind adding the "Fetch this branch using ..." line, but not so much the implementation. I think a "Check out branch" button alongside the existing "Download as" makes more sense to get instructions on how to get the changes on your local machine, since that's pretty much what "Download as" does as well. 

Like the "command line", the button opens the command line merge instructions modal. I've improved the text of that modal in !1120.

![Screen_Shot_2015-08-08_at_22.10.19](https://gitlab.com/gitlab-org/gitlab-ce/uploads/fd185df012e9759dfea198ed9fa3f80f/Screen_Shot_2015-08-08_at_22.10.19.png)

It looks even better in combination with !1121, which gets rid of the "If you want to ..." line:

![Screen_Shot_2015-08-08_at_22.10.55](https://gitlab.com/gitlab-org/gitlab-ce/uploads/3fa469d0e2bd4e3ec4992ffa5864c718/Screen_Shot_2015-08-08_at_22.10.55.png)

cc @dzaporozhets @rspeicher 

See merge request !1116
parents a0cd4f8f 4a2b7cef
......@@ -47,6 +47,7 @@ v 7.14.0 (unreleased)
- Add support for CI skipped status
- Fetch code from forks to refs/merge-requests/:id/head when merge request created
- Remove comments and email addresses when publicly exposing ssh keys (Zeger-Jan van de Weg)
- Add "Check out branch" button to the MR page.
- Improve MR merge widget text and UI consistency.
- Improve text in MR "How To Merge" modal.
- Cache all events
......
......@@ -186,3 +186,7 @@
#modal_merge_info .modal-dialog {
width: 600px;
}
.mr-source-target {
line-height: 31px;
}
......@@ -5,19 +5,25 @@
%hr
= render "projects/merge_requests/show/mr_box"
%hr
.append-bottom-20
.append-bottom-20.mr-source-target
- if @merge_request.open?
.btn-group.btn-group-sm.pull-right
%a.btn.btn-sm.dropdown-toggle{ data: {toggle: :dropdown} }
= icon('download')
Download as
%span.caret
%ul.dropdown-menu
%li= link_to "Email Patches", merge_request_path(@merge_request, format: :patch)
%li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff)
.pull-right
- if @merge_request.source_branch_exists?
= link_to "#modal_merge_info", class: "btn btn-sm", "data-toggle" => "modal" do
= icon('cloud-download fw')
Check out branch
%span.dropdown
%a.btn.btn-sm.dropdown-toggle{ data: {toggle: :dropdown} }
= icon('download')
Download as
%span.caret
%ul.dropdown-menu
%li= link_to "Email Patches", merge_request_path(@merge_request, format: :patch)
%li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff)
.light
%div
%span From
%span Request to merge
%span.label-branch #{source_branch_with_namespace(@merge_request)}
%span into
%span.label-branch #{@merge_request.target_branch}
......
......@@ -326,7 +326,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I should see new target branch changes' do
expect(page).to have_content 'From fix into feature'
expect(page).to have_content 'Request to merge fix into feature'
expect(page).to have_content 'Target branch changed from master to feature'
end
......
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