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
ab449502
Commit
ab449502
authored
Feb 10, 2020
by
Thomas Randolph
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default the `single_mr_diff_view` FF to true
parent
1438907f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-1
app/serializers/diff_file_entity.rb
app/serializers/diff_file_entity.rb
+2
-2
changelogs/unreleased/feature-enable-split-diffs-by-default.yml
...logs/unreleased/feature-enable-split-diffs-by-default.yml
+5
-0
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
ab449502
...
...
@@ -21,7 +21,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
before_action
only:
[
:show
]
do
push_frontend_feature_flag
(
:diffs_batch_load
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:deploy_from_footer
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:single_mr_diff_view
,
@project
)
push_frontend_feature_flag
(
:single_mr_diff_view
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:suggest_pipeline
)
if
experiment_enabled?
(
:suggest_pipeline
)
end
...
...
app/serializers/diff_file_entity.rb
View file @
ab449502
...
...
@@ -67,14 +67,14 @@ class DiffFileEntity < DiffFileBaseEntity
private
def
parallel_diff_view?
(
options
,
diff_file
)
return
true
unless
Feature
.
enabled?
(
:single_mr_diff_view
,
diff_file
.
repository
.
project
)
return
true
unless
Feature
.
enabled?
(
:single_mr_diff_view
,
diff_file
.
repository
.
project
,
default_enabled:
true
)
# If we're not rendering inline, we must be rendering parallel
!
inline_diff_view?
(
options
,
diff_file
)
end
def
inline_diff_view?
(
options
,
diff_file
)
return
true
unless
Feature
.
enabled?
(
:single_mr_diff_view
,
diff_file
.
repository
.
project
)
return
true
unless
Feature
.
enabled?
(
:single_mr_diff_view
,
diff_file
.
repository
.
project
,
default_enabled:
true
)
# If nothing is present, inline will be the default.
options
.
fetch
(
:diff_view
,
:inline
).
to_sym
==
:inline
...
...
changelogs/unreleased/feature-enable-split-diffs-by-default.yml
0 → 100644
View file @
ab449502
---
title
:
Diffs load each view style separately, on demand
merge_request
:
24821
author
:
type
:
performance
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