diff options
author | Luke Bennett <lbennett@gitlab.com> | 2019-03-14 20:52:01 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2019-04-07 21:41:58 +0200 |
commit | 55a9bff7e274646b35e7e0cee0a772b4afb490b2 (patch) | |
tree | 21a8dc1557aa8e3663bbb322409a0f904d69b553 | |
parent | b4165554113a7f9ce9fecd7d169f9a64686b5c44 (diff) | |
download | gitlab-ce-55a9bff7e274646b35e7e0cee0a772b4afb490b2.tar.gz |
Improve project merge request settingsce-proj-settings-ok-mr-settings-only
Prioritize and simplify project settings content.
6 files changed, 77 insertions, 36 deletions
diff --git a/app/assets/stylesheets/pages/settings.scss b/app/assets/stylesheets/pages/settings.scss index e4ed685bd1b..7b0538dca20 100644 --- a/app/assets/stylesheets/pages/settings.scss +++ b/app/assets/stylesheets/pages/settings.scss @@ -232,7 +232,7 @@ } } -.settings-flex-row { +.content-list > .settings-flex-row { display: flex; align-items: center; diff --git a/app/views/projects/_merge_request_merge_method_settings.html.haml b/app/views/projects/_merge_request_merge_method_settings.html.haml index 935581643cd..9082bfc409d 100644 --- a/app/views/projects/_merge_request_merge_method_settings.html.haml +++ b/app/views/projects/_merge_request_merge_method_settings.html.haml @@ -2,34 +2,29 @@ .form-group = label_tag :merge_method_merge, class: 'label-bold' do - Merge method + = _('Merge method') .form-check = form.radio_button :merge_method, :merge, class: "js-merge-method-radio form-check-input" = label_tag :project_merge_method_merge, class: 'form-check-label' do - %strong Merge commit - %br - %span.descr - A merge commit is created for every merge, and merging is allowed as long as there are no conflicts. + .mb-3 + = _('Merge commit') + .text-secondary + = _('A merge commit is created for every merge, and merging is allowed as long as there are no conflicts.') - .form-check - = form.radio_button :merge_method, :rebase_merge, class: "js-merge-method-radio form-check-input" - = label_tag :project_merge_method_rebase_merge, class: 'form-check-label' do - %strong Merge commit with semi-linear history - %br - %span.descr - A merge commit is created for every merge, but merging is only allowed if fast-forward merge is possible. - This way you could make sure that if this merge request would build, after merging to target branch it would also build. - %br - %span.descr - When fast-forward merge is not possible, the user is given the option to rebase. +.form-check + = form.radio_button :merge_method, :rebase_merge, class: "js-merge-method-radio form-check-input" + = label_tag :project_merge_method_rebase_merge, class: 'form-check-label' do + .mb-3 + = _('Merge commit with semi-linear history') + .text-secondary + = _('A merge commit is created for every merge, but merging is only allowed if fast-forward merge is possible. This way you could make sure that if this merge request would build, after merging to target branch it would also build.') + .text-secondary + = _('When fast-forward merge is not possible, the user is given the option to rebase.') - .form-check - = form.radio_button :merge_method, :ff, class: "js-merge-method-radio qa-radio-button-merge-ff form-check-input" - = label_tag :project_merge_method_ff, class: 'form-check-label' do - %strong Fast-forward merge - %br - %span.descr - No merge commits are created and all merges are fast-forwarded, which means that merging is only allowed if the branch could be fast-forwarded. - %br - %span.descr - When fast-forward merge is not possible, the user is given the option to rebase. +.form-check + = form.radio_button :merge_method, :ff, class: "js-merge-method-radio qa-radio-button-merge-ff form-check-input" + = label_tag :project_merge_method_ff, class: 'form-check-label' do + .mb-3 + = _('Fast-forward merge') + .text-secondary + = _('No merge commits are created and all merges are fast-forwarded, which means that merging is only allowed if the branch could be fast-forwarded. When fast-forward merge is not possible, the user is given the option to rebase.') diff --git a/app/views/projects/_merge_request_merge_settings.html.haml b/app/views/projects/_merge_request_merge_settings.html.haml index 6ac2e06afa5..3a9f7ca42db 100644 --- a/app/views/projects/_merge_request_merge_settings.html.haml +++ b/app/views/projects/_merge_request_merge_settings.html.haml @@ -4,21 +4,21 @@ .form-check.builds-feature{ class: ("hidden" if @project && @project.project_feature.send(:builds_access_level) == 0) } = form.check_box :only_allow_merge_if_pipeline_succeeds, class: 'form-check-input' = form.label :only_allow_merge_if_pipeline_succeeds, class: 'form-check-label' do - %strong Only allow merge requests to be merged if the pipeline succeeds - %br - %span.descr - Pipelines need to be configured to enable this feature. - = link_to icon('question-circle'), help_page_path('user/project/merge_requests/merge_when_pipeline_succeeds', anchor: 'only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds'), target: '_blank' + .mb-3 + = _('Only allow merge requests to be merged if the pipeline succeeds') + .text-secondary + = _('Pipelines need to be configured to enable this feature.') + = link_to icon('question-circle'), help_page_path('user/project/merge_requests/merge_when_pipeline_succeeds', anchor: 'only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds'), target: '_blank' = render_if_exists 'projects/merge_pipelines_settings', form: form .form-check = form.check_box :only_allow_merge_if_all_discussions_are_resolved, class: 'form-check-input' = form.label :only_allow_merge_if_all_discussions_are_resolved, class: 'form-check-label' do - %strong Only allow merge requests to be merged if all discussions are resolved + %p= _('Only allow merge requests to be merged if all discussions are resolved') .form-check = form.check_box :resolve_outdated_diff_discussions, class: 'form-check-input' = form.label :resolve_outdated_diff_discussions, class: 'form-check-label' do - %strong Automatically resolve merge request diff discussions when they become outdated + %p= _('Automatically resolve merge request diff discussions when they become outdated') .form-check = form.check_box :printing_merge_request_link_enabled, class: 'form-check-input' = form.label :printing_merge_request_link_enabled, class: 'form-check-label' do - %strong Show link to create/view merge request when pushing from the command line + %p= _('Show link to create/view merge request when pushing from the command line') diff --git a/changelogs/unreleased/ce-proj-settings-ok-mr-settings-only.yml b/changelogs/unreleased/ce-proj-settings-ok-mr-settings-only.yml new file mode 100644 index 00000000000..4bbbc706e62 --- /dev/null +++ b/changelogs/unreleased/ce-proj-settings-ok-mr-settings-only.yml @@ -0,0 +1,5 @@ +--- +title: Improve project merge request settings +merge_request: 26495 +author: +type: other diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 3bc48e8c5d2..f22b351ad78 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -351,6 +351,12 @@ msgstr "" msgid "A member of GitLab's abuse team will review your report as soon as possible." msgstr "" +msgid "A merge commit is created for every merge, and merging is allowed as long as there are no conflicts." +msgstr "" + +msgid "A merge commit is created for every merge, but merging is only allowed if fast-forward merge is possible. This way you could make sure that if this merge request would build, after merging to target branch it would also build." +msgstr "" + msgid "A new branch will be created in your fork and a new merge request will be started." msgstr "" @@ -1068,6 +1074,9 @@ msgstr "" msgid "Automatically marked as default internal user" msgstr "" +msgid "Automatically resolve merge request diff discussions when they become outdated" +msgstr "" + msgid "Automatically resolved" msgstr "" @@ -3643,6 +3652,9 @@ msgstr "" msgid "Failure" msgstr "" +msgid "Fast-forward merge" +msgstr "" + msgid "Fast-forward merge without a merge commit" msgstr "" @@ -5016,9 +5028,15 @@ msgstr "" msgid "Merge Requests" msgstr "" +msgid "Merge commit" +msgstr "" + msgid "Merge commit message" msgstr "" +msgid "Merge commit with semi-linear history" +msgstr "" + msgid "Merge events" msgstr "" @@ -5028,6 +5046,9 @@ msgstr "" msgid "Merge in progress" msgstr "" +msgid "Merge method" +msgstr "" + msgid "Merge request" msgstr "" @@ -5459,6 +5480,9 @@ msgstr "" msgid "No license. All rights reserved" msgstr "" +msgid "No merge commits are created and all merges are fast-forwarded, which means that merging is only allowed if the branch could be fast-forwarded. When fast-forward merge is not possible, the user is given the option to rebase." +msgstr "" + msgid "No merge requests found" msgstr "" @@ -5650,6 +5674,12 @@ msgstr "" msgid "Only admins" msgstr "" +msgid "Only allow merge requests to be merged if all discussions are resolved" +msgstr "" + +msgid "Only allow merge requests to be merged if the pipeline succeeds" +msgstr "" + msgid "Only mirror protected branches" msgstr "" @@ -5905,6 +5935,9 @@ msgstr "" msgid "Pipelines for last year" msgstr "" +msgid "Pipelines need to be configured to enable this feature." +msgstr "" + msgid "Pipelines settings for '%{project_name}' were successfully updated." msgstr "" @@ -7409,6 +7442,9 @@ msgstr "" msgid "Show latest version" msgstr "" +msgid "Show link to create/view merge request when pushing from the command line" +msgstr "" + msgid "Show parent pages" msgstr "" @@ -9247,6 +9283,9 @@ msgstr "" msgid "When enabled, users cannot use GitLab until the terms have been accepted." msgstr "" +msgid "When fast-forward merge is not possible, the user is given the option to rebase." +msgstr "" + msgid "When this merge request is accepted" msgid_plural "When these merge requests are accepted" msgstr[0] "" diff --git a/spec/features/projects/settings/user_manages_merge_requests_settings_spec.rb b/spec/features/projects/settings/user_manages_merge_requests_settings_spec.rb index 84de6858d5f..b1c2bab08c0 100644 --- a/spec/features/projects/settings/user_manages_merge_requests_settings_spec.rb +++ b/spec/features/projects/settings/user_manages_merge_requests_settings_spec.rb @@ -93,11 +93,13 @@ describe 'Projects > Settings > User manages merge request settings' do it 'when unchecked sets :printing_merge_request_link_enabled to false' do uncheck('project_printing_merge_request_link_enabled') within('.merge-request-settings-form') do + find('.qa-save-merge-request-changes') click_on('Save changes') end - # Wait for save to complete and page to reload + find('.flash-notice') checkbox = find_field('project_printing_merge_request_link_enabled') + expect(checkbox).not_to be_checked project.reload |