Commit babf17e2 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch '229848-feature-flag-enable-option-to-display-one-file-at-a-time-in-mrs' into 'master'

Remove `view_diffs_file_by_file` feature flag

See merge request gitlab-org/gitlab!48966
parents 6c107b90 26b8fea3
......@@ -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)
......
......@@ -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,
......
---
title: Remove `view_diffs_file_by_file` feature flag
merge_request: 48966
author:
type: other
---
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
......@@ -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.
......
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