diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index db12dd526ed..69aec044863 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -102,7 +102,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo @issuable_sidebar = serializer.represent(@merge_request, serializer: 'sidebar') @current_user_data = UserSerializer.new(project: @project).represent(current_user, {}, MergeRequestCurrentUserEntity).to_json @show_whitespace_default = current_user.nil? || current_user.show_whitespace_in_diffs - @file_by_file_default = Feature.enabled?(:view_diffs_file_by_file, default_enabled: true) && current_user&.view_diffs_file_by_file + @file_by_file_default = current_user&.view_diffs_file_by_file @coverage_path = coverage_reports_project_merge_request_path(@project, @merge_request, format: :json) if @merge_request.has_coverage_reports? @endpoint_metadata_url = endpoint_metadata_url(@project, @merge_request) diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index ca5972f1b46..aeecb0c0d72 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -79,13 +79,12 @@ = f.check_box :show_whitespace_in_diffs, class: 'form-check-input' = f.label :show_whitespace_in_diffs, class: 'form-check-label' do = s_('Preferences|Show whitespace changes in diffs') - - if Feature.enabled?(:view_diffs_file_by_file, default_enabled: true) - .form-group.form-check - = f.check_box :view_diffs_file_by_file, class: 'form-check-input' - = f.label :view_diffs_file_by_file, class: 'form-check-label' do - = s_("Preferences|Show one file at a time on merge request's Changes tab") - .form-text.text-muted - = s_("Preferences|Instead of all the files changed, show only one file at a time. To switch between files, use the file browser.") + .form-group.form-check + = f.check_box :view_diffs_file_by_file, class: 'form-check-input' + = f.label :view_diffs_file_by_file, class: 'form-check-label' do + = s_("Preferences|Show one file at a time on merge request's Changes tab") + .form-text.text-muted + = s_("Preferences|Instead of all the files changed, show only one file at a time. To switch between files, use the file browser.") .form-group = f.label :tab_width, s_('Preferences|Tab width'), class: 'label-bold' = f.number_field :tab_width, diff --git a/changelogs/unreleased/229848-feature-flag-enable-option-to-display-one-file-at-a-time-in-mrs.yml b/changelogs/unreleased/229848-feature-flag-enable-option-to-display-one-file-at-a-time-in-mrs.yml new file mode 100644 index 00000000000..a3c34510950 --- /dev/null +++ b/changelogs/unreleased/229848-feature-flag-enable-option-to-display-one-file-at-a-time-in-mrs.yml @@ -0,0 +1,5 @@ +--- +title: Remove `view_diffs_file_by_file` feature flag +merge_request: 48966 +author: +type: other diff --git a/config/feature_flags/development/view_diffs_file_by_file.yml b/config/feature_flags/development/view_diffs_file_by_file.yml deleted file mode 100644 index f3cfc9f41f3..00000000000 --- a/config/feature_flags/development/view_diffs_file_by_file.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: view_diffs_file_by_file -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35223 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/229848 -milestone: '13.2' -type: development -group: group::code review -default_enabled: true diff --git a/doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md b/doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md index 6c114b1d89d..6dc5fe209a2 100644 --- a/doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md +++ b/doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md @@ -78,10 +78,7 @@ Click **Expand file** on any file to view the changes for that file. ### File-by-file diff navigation > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/222790) in GitLab 13.2. -> - It's deployed behind a feature flag, enabled by default. -> - It's recommended for production use. -> - It's enabled on GitLab.com. -> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-file-by-file-diff-navigation). +> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/229848) in GitLab 13.7. For larger merge requests it might sometimes be useful to review single files at a time. To enable, from your avatar on the top-right navigation bar, click **Settings**, and go to **Preferences** on the left @@ -103,27 +100,6 @@ merge request: This change overrides the choice you made in your user preferences and persists until you clear your browser's cookies or change this behavior again. -#### Enable or disable file-by-file diff navigation **(CORE ONLY)** - -File-by-file diff navigation is under development but ready for production use. It is -deployed behind a feature flag that is **enabled by default**. -[GitLab administrators with access to the GitLab Rails console](../../../administration/feature_flags.md) -can opt to disable it for your instance. - -To enable it: - -```ruby -# Instance-wide -Feature.enable(:view_diffs_file_by_file) -``` - -To disable it: - -```ruby -# Instance-wide -Feature.disable(:view_diffs_file_by_file>) -``` - ### Merge requests commit navigation > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/18140) in GitLab 13.0.