Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
26b8fea3
Commit
26b8fea3
authored
Dec 06, 2020
by
Thomas Randolph
Committed by
Vitaly Slobodin
Dec 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove view_diffs_file_by_file feature flag
This extended commit message satisfies Dangerbot.
parent
9b516b9c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
41 deletions
+13
-41
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-1
app/views/profiles/preferences/show.html.haml
app/views/profiles/preferences/show.html.haml
+6
-7
changelogs/unreleased/229848-feature-flag-enable-option-to-display-one-file-at-a-time-in-mrs.yml
...ag-enable-option-to-display-one-file-at-a-time-in-mrs.yml
+5
-0
config/feature_flags/development/view_diffs_file_by_file.yml
config/feature_flags/development/view_diffs_file_by_file.yml
+0
-8
doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md
...t/merge_requests/reviewing_and_managing_merge_requests.md
+1
-25
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
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
)
...
...
app/views/profiles/preferences/show.html.haml
View file @
26b8fea3
...
...
@@ -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
,
...
...
changelogs/unreleased/229848-feature-flag-enable-option-to-display-one-file-at-a-time-in-mrs.yml
0 → 100644
View file @
26b8fea3
---
title
:
Remove `view_diffs_file_by_file` feature flag
merge_request
:
48966
author
:
type
:
other
config/feature_flags/development/view_diffs_file_by_file.yml
deleted
100644 → 0
View file @
9b516b9c
---
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
doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md
View file @
26b8fea3
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment