diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2018-05-22 21:08:16 +0000 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-05-22 21:08:16 +0000 |
commit | 76e276cb433a7023cf8154f9d9555725b3b11e67 (patch) | |
tree | 1a456a96d5dcdf0abacbfffe4438bad8d515c0f5 | |
parent | 4c63e904ec9118f44b83496867d9e3cc0d3082c1 (diff) | |
parent | add9defa05179865ee5460fd4bbd67cac9e23f53 (diff) | |
download | gitlab-ce-76e276cb433a7023cf8154f9d9555725b3b11e67.tar.gz |
Merge branch '44895-explicit-merge-conflict' into 'master'
Resolve "Make explicit that merge conflict feature commits to source branch"
Closes #44895
See merge request gitlab-org/gitlab-ce!18921
7 files changed, 52 insertions, 15 deletions
diff --git a/app/assets/javascripts/merge_conflicts/merge_conflict_store.js b/app/assets/javascripts/merge_conflicts/merge_conflict_store.js index db1d09eb2f2..70f185e3656 100644 --- a/app/assets/javascripts/merge_conflicts/merge_conflict_store.js +++ b/app/assets/javascripts/merge_conflicts/merge_conflict_store.js @@ -351,7 +351,7 @@ import Cookies from 'js-cookie'; }, getCommitButtonText() { - const initial = 'Commit conflict resolution'; + const initial = 'Commit to source branch'; const inProgress = 'Committing...'; return this.state ? this.state.isSubmitting ? inProgress : initial : initial; diff --git a/app/assets/stylesheets/pages/merge_conflicts.scss b/app/assets/stylesheets/pages/merge_conflicts.scss index 04bde64c752..3d5ed9ef3c5 100644 --- a/app/assets/stylesheets/pages/merge_conflicts.scss +++ b/app/assets/stylesheets/pages/merge_conflicts.scss @@ -286,6 +286,14 @@ $colors: ( } .resolve-conflicts-form { - padding-top: $gl-padding; + h4 { + margin-top: 0; + } + + .resolve-info { + @media (max-width: $screen-md-max) { + margin-bottom: $gl-padding; + } + } } } diff --git a/app/views/projects/merge_requests/conflicts/_commit_stats.html.haml b/app/views/projects/merge_requests/conflicts/_commit_stats.html.haml index 964dc40a213..e6205f24ae6 100644 --- a/app/views/projects/merge_requests/conflicts/_commit_stats.html.haml +++ b/app/views/projects/merge_requests/conflicts/_commit_stats.html.haml @@ -11,6 +11,6 @@ Showing %strong.cred {{conflictsCountText}} between - %strong {{conflictsData.sourceBranch}} + %strong.ref-name {{conflictsData.sourceBranch}} and - %strong {{conflictsData.targetBranch}} + %strong.ref-name {{conflictsData.targetBranch}} diff --git a/app/views/projects/merge_requests/conflicts/_submit_form.html.haml b/app/views/projects/merge_requests/conflicts/_submit_form.html.haml index 13026b7566a..b86a87a1fc6 100644 --- a/app/views/projects/merge_requests/conflicts/_submit_form.html.haml +++ b/app/views/projects/merge_requests/conflicts/_submit_form.html.haml @@ -1,13 +1,21 @@ +- branch_name = link_to @merge_request.source_branch, project_tree_path(@merge_request.project, @merge_request.source_branch), class: "ref-name" +- translation =_('You can resolve the merge conflict using either the Interactive mode, by choosing %{use_ours} or %{use_theirs} buttons, or by editing the files directly. Commit these changes into %{branch_name}') % { use_ours: '<code>Use Ours</code>', use_theirs: '<code>Use Theirs</code>', branch_name: branch_name } + +%hr .form-horizontal.resolve-conflicts-form .form-group - %label.col-sm-2.control-label{ "for" => "commit-message" } - #{ _('Commit message') } - .col-sm-10 + .col-md-4 + %h4= _('Resolve conflicts on source branch') + .resolve-info + = translation.html_safe + .col-md-8 + %label.label-light{ "for" => "commit-message" } + #{ _('Commit message') } .commit-message-container .max-width-marker %textarea.form-control.js-commit-message#commit-message{ "v-model" => "conflictsData.commitMessage", "rows" => "5" } .form-group - .col-sm-offset-2.col-sm-10 + .col-md-offset-4.col-md-8 .row .col-xs-6 %button.btn.btn-success.js-submit-button{ type: "button", "@click" => "commit()", ":disabled" => "!readyToCommit" } diff --git a/doc/user/project/merge_requests/resolve_conflicts.md b/doc/user/project/merge_requests/resolve_conflicts.md index 68c49054e47..ecbc8534eea 100644 --- a/doc/user/project/merge_requests/resolve_conflicts.md +++ b/doc/user/project/merge_requests/resolve_conflicts.md @@ -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, 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 -**Commit conflict resolution** button. +**Commit to source branch** button.  diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 14228b18332..608d2a584ba 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: gitlab 1.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-16 18:52+0200\n" -"PO-Revision-Date: 2018-05-16 18:52+0200\n" +"POT-Creation-Date: 2018-05-21 12:38-0700\n" +"PO-Revision-Date: 2018-05-21 12:38-0700\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "Language: \n" @@ -82,6 +82,9 @@ msgstr[1] "" msgid "%{loadingIcon} Started" msgstr "" +msgid "%{lock_path} is locked by GitLab User %{lock_user_id}" +msgstr "" + msgid "%{nip_domain} can be used as an alternative to a custom domain." msgstr "" @@ -1447,7 +1450,7 @@ msgstr "" msgid "ContainerRegistry|With the Docker Container Registry integrated into GitLab, every project can have its own space to store its Docker images." msgstr "" -msgid "ContainerRegistry|You can also %{deploy_token} for read-only access to the registry images." +msgid "ContainerRegistry|You can also use a %{deploy_token} for read-only access to the registry images." msgstr "" msgid "Continuous Integration and Deployment" @@ -2487,6 +2490,9 @@ msgstr "" msgid "Lock %{issuableDisplayName}" msgstr "" +msgid "Lock not found" +msgstr "" + msgid "Lock to current projects" msgstr "" @@ -3407,6 +3413,9 @@ msgstr "" msgid "Reset runners registration token" msgstr "" +msgid "Resolve conflicts on source branch" +msgstr "" + msgid "Resolve discussion" msgstr "" @@ -4278,6 +4287,9 @@ msgstr "" msgid "Toggle Sidebar" msgstr "" +msgid "Toggle discussion" +msgstr "" + msgid "Toggle sidebar" msgstr "" @@ -4599,12 +4611,21 @@ msgstr "" msgid "You can only edit files when you are on a branch" msgstr "" +msgid "You can resolve the merge conflict using either the Interactive mode, by choosing %{use_ours} or %{use_theirs} buttons, or by editing the files directly. Commit these changes into %{branch_name}" +msgstr "" + msgid "You cannot write to this read-only GitLab instance." msgstr "" +msgid "You have no permissions" +msgstr "" + msgid "You have reached your project limit" msgstr "" +msgid "You must have master access to force delete a lock" +msgstr "" + msgid "You must sign in to star a project" msgstr "" diff --git a/spec/features/merge_request/user_resolves_conflicts_spec.rb b/spec/features/merge_request/user_resolves_conflicts_spec.rb index 19995559fae..25a57f7d379 100644 --- a/spec/features/merge_request/user_resolves_conflicts_spec.rb +++ b/spec/features/merge_request/user_resolves_conflicts_spec.rb @@ -27,7 +27,7 @@ describe 'Merge request > User resolves conflicts', :js do 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') merge_request.reload_diff @@ -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");') 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') merge_request.reload_diff @@ -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");') end - click_button 'Commit conflict resolution' + click_button 'Commit to source branch' expect(page).to have_content('All merge conflicts were resolved') |