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
cae19af9
Commit
cae19af9
authored
Jul 17, 2020
by
Phil Hughes
Committed by
Igor Drozdov
Jul 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enables diff file-by-file navigation by default
parent
a43489c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
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
+1
-1
doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md
...t/merge_requests/reviewing_and_managing_merge_requests.md
+5
-4
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
cae19af9
...
@@ -84,7 +84,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
...
@@ -84,7 +84,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
@issuable_sidebar
=
serializer
.
represent
(
@merge_request
,
serializer:
'sidebar'
)
@issuable_sidebar
=
serializer
.
represent
(
@merge_request
,
serializer:
'sidebar'
)
@current_user_data
=
UserSerializer
.
new
(
project:
@project
).
represent
(
current_user
,
{},
MergeRequestUserEntity
).
to_json
@current_user_data
=
UserSerializer
.
new
(
project:
@project
).
represent
(
current_user
,
{},
MergeRequestUserEntity
).
to_json
@show_whitespace_default
=
current_user
.
nil?
||
current_user
.
show_whitespace_in_diffs
@show_whitespace_default
=
current_user
.
nil?
||
current_user
.
show_whitespace_in_diffs
@file_by_file_default
=
Feature
.
enabled?
(
:view_diffs_file_by_file
)
&&
current_user
&
.
view_diffs_file_by_file
@file_by_file_default
=
Feature
.
enabled?
(
:view_diffs_file_by_file
,
default_enabled:
true
)
&&
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?
@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
)
@endpoint_metadata_url
=
endpoint_metadata_url
(
@project
,
@merge_request
)
...
...
app/views/profiles/preferences/show.html.haml
View file @
cae19af9
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
=
f
.
check_box
:show_whitespace_in_diffs
,
class:
'form-check-input'
=
f
.
check_box
:show_whitespace_in_diffs
,
class:
'form-check-input'
=
f
.
label
:show_whitespace_in_diffs
,
class:
'form-check-label'
do
=
f
.
label
:show_whitespace_in_diffs
,
class:
'form-check-label'
do
=
s_
(
'Preferences|Show whitespace changes in diffs'
)
=
s_
(
'Preferences|Show whitespace changes in diffs'
)
-
if
Feature
.
enabled?
(
:view_diffs_file_by_file
)
-
if
Feature
.
enabled?
(
:view_diffs_file_by_file
,
default_enabled:
true
)
.form-group.form-check
.form-group.form-check
=
f
.
check_box
:view_diffs_file_by_file
,
class:
'form-check-input'
=
f
.
check_box
:view_diffs_file_by_file
,
class:
'form-check-input'
=
f
.
label
:view_diffs_file_by_file
,
class:
'form-check-label'
do
=
f
.
label
:view_diffs_file_by_file
,
class:
'form-check-label'
do
...
...
doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md
View file @
cae19af9
...
@@ -67,9 +67,10 @@ list.
...
@@ -67,9 +67,10 @@ list.
### File-by-file diff navigation
### File-by-file diff navigation
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/222790) in GitLab 13.2.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/222790) in GitLab 13.2.
> - It's deployed behind a feature flag, disabled by default.
> - It's deployed behind a feature flag, enabled by default.
> - It's recommended for production use.
> - It's enabled on GitLab.com.
> - It's enabled on GitLab.com.
> -
To use it in GitLab self-managed instances, ask a GitLab administrator to [en
able it](#enable-or-disable-file-by-file-diff-navigation-core-only).
> -
For GitLab self-managed instances, GitLab administrators can opt to [dis
able it](#enable-or-disable-file-by-file-diff-navigation-core-only).
For larger merge requests it might sometimes be useful to review single files at a time. To enable,
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 navbar, click
**Settings**
, and go to
**Preferences**
on the left
from your avatar on the top-right navbar, click
**Settings**
, and go to
**Preferences**
on the left
...
@@ -83,9 +84,9 @@ From there, when reviewing merge requests' **Changes** tab, you will see only on
...
@@ -83,9 +84,9 @@ From there, when reviewing merge requests' **Changes** tab, you will see only on
#### Enable or disable file-by-file diff navigation **(CORE ONLY)**
#### 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
File-by-file diff navigation is under development but ready for production use. It is
deployed behind a feature flag that is
**
dis
abled by default**
.
deployed behind a feature flag that is
**
en
abled by default**
.
[
GitLab administrators with access to the GitLab Rails console
](
../../../administration/feature_flags.md
)
[
GitLab administrators with access to the GitLab Rails console
](
../../../administration/feature_flags.md
)
can
en
able it for your instance.
can
opt to dis
able it for your instance.
To enable it:
To enable it:
...
...
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