Commit 06a2e385 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Make it explicit that merge conflict feature commits to source branch

parent c6f72ac9
...@@ -351,7 +351,7 @@ import Cookies from 'js-cookie'; ...@@ -351,7 +351,7 @@ import Cookies from 'js-cookie';
}, },
getCommitButtonText() { getCommitButtonText() {
const initial = 'Commit conflict resolution'; const initial = 'Commit to source branch';
const inProgress = 'Committing...'; const inProgress = 'Committing...';
return this.state ? this.state.isSubmitting ? inProgress : initial : initial; return this.state ? this.state.isSubmitting ? inProgress : initial : initial;
......
...@@ -286,6 +286,14 @@ $colors: ( ...@@ -286,6 +286,14 @@ $colors: (
} }
.resolve-conflicts-form { .resolve-conflicts-form {
padding-top: $gl-padding; h4 {
margin-top: 0;
}
.resolve-info {
@media (max-width: $screen-md-max) {
margin-bottom: $gl-padding;
}
}
} }
} }
%hr
.form-horizontal.resolve-conflicts-form .form-horizontal.resolve-conflicts-form
.form-group .form-group
%label.col-sm-2.control-label{ "for" => "commit-message" } .col-md-4
%h4 Resolve conflicts on source branch
.resolve-info Resolve the merge conflict by choosing Ours or Theirs in all the conflicted files above. Commit these changes into {{conflictsData.sourceBranch}}.
.col-md-8
%label.label-light{ "for" => "commit-message" }
#{ _('Commit message') } #{ _('Commit message') }
.col-sm-10
.commit-message-container .commit-message-container
.max-width-marker .max-width-marker
%textarea.form-control.js-commit-message#commit-message{ "v-model" => "conflictsData.commitMessage", "rows" => "5" } %textarea.form-control.js-commit-message#commit-message{ "v-model" => "conflictsData.commitMessage", "rows" => "5" }
.form-group .form-group
.col-sm-offset-2.col-sm-10 .col-md-offset-4.col-md-8
.row .row
.col-xs-6 .col-xs-6
%button.btn.btn-success.js-submit-button{ type: "button", "@click" => "commit()", ":disabled" => "!readyToCommit" } %button.btn.btn-success.js-submit-button{ type: "button", "@click" => "commit()", ":disabled" => "!readyToCommit" }
......
...@@ -29,7 +29,7 @@ The merge conflict resolution editor allows for more complex merge conflicts, ...@@ -29,7 +29,7 @@ The merge conflict resolution editor allows for more complex merge conflicts,
which require the user to manually modify a file in order to resolve a conflict, which require the user to manually modify a file in order to resolve a conflict,
to be solved right form the GitLab interface. Use the **Edit inline** button to be solved right form the GitLab interface. Use the **Edit inline** button
to open the editor. Once you're sure about your changes, hit the to open the editor. Once you're sure about your changes, hit the
**Commit conflict resolution** button. **Commit to source branch** button.
![Merge conflict editor](img/merge_conflict_editor.png) ![Merge conflict editor](img/merge_conflict_editor.png)
......
...@@ -27,7 +27,7 @@ describe 'Merge request > User resolves conflicts', :js do ...@@ -27,7 +27,7 @@ describe 'Merge request > User resolves conflicts', :js do
end end
end end
find_button('Commit conflict resolution').send_keys(:return) find_button('Commit to source branch').send_keys(:return)
expect(page).to have_content('All merge conflicts were resolved') expect(page).to have_content('All merge conflicts were resolved')
merge_request.reload_diff merge_request.reload_diff
...@@ -71,7 +71,7 @@ describe 'Merge request > User resolves conflicts', :js do ...@@ -71,7 +71,7 @@ describe 'Merge request > User resolves conflicts', :js do
execute_script('ace.edit($(".files-wrapper .diff-file pre")[1]).setValue("Gregor Samsa woke from troubled dreams");') execute_script('ace.edit($(".files-wrapper .diff-file pre")[1]).setValue("Gregor Samsa woke from troubled dreams");')
end end
find_button('Commit conflict resolution').send_keys(:return) find_button('Commit to source branch').send_keys(:return)
expect(page).to have_content('All merge conflicts were resolved') expect(page).to have_content('All merge conflicts were resolved')
merge_request.reload_diff merge_request.reload_diff
...@@ -145,7 +145,7 @@ describe 'Merge request > User resolves conflicts', :js do ...@@ -145,7 +145,7 @@ describe 'Merge request > User resolves conflicts', :js do
execute_script('ace.edit($(".files-wrapper .diff-file pre")[0]).setValue("Gregor Samsa woke from troubled dreams");') execute_script('ace.edit($(".files-wrapper .diff-file pre")[0]).setValue("Gregor Samsa woke from troubled dreams");')
end end
click_button 'Commit conflict resolution' click_button 'Commit to source branch'
expect(page).to have_content('All merge conflicts were resolved') expect(page).to have_content('All merge conflicts were resolved')
......
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