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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
3b158409
Commit
3b158409
authored
Mar 26, 2019
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove expand diff to full file feature flag
parent
19010942
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
12 deletions
+2
-12
app/assets/javascripts/diffs/components/diff_file_header.vue
app/assets/javascripts/diffs/components/diff_file_header.vue
+1
-4
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+0
-4
app/serializers/diff_file_entity.rb
app/serializers/diff_file_entity.rb
+1
-1
spec/javascripts/diffs/components/diff_file_header_spec.js
spec/javascripts/diffs/components/diff_file_header_spec.js
+0
-3
No files found.
app/assets/javascripts/diffs/components/diff_file_header.vue
View file @
3b158409
...
@@ -128,9 +128,6 @@ export default {
...
@@ -128,9 +128,6 @@ export default {
isModeChanged
()
{
isModeChanged
()
{
return
this
.
diffFile
.
viewer
.
name
===
diffViewerModes
.
mode_changed
;
return
this
.
diffFile
.
viewer
.
name
===
diffViewerModes
.
mode_changed
;
},
},
showExpandDiffToFullFileEnabled
()
{
return
gon
.
features
.
expandDiffFullFile
&&
!
this
.
diffFile
.
is_fully_expanded
;
},
},
},
mounted
()
{
mounted
()
{
polyfillSticky
(
this
.
$refs
.
header
);
polyfillSticky
(
this
.
$refs
.
header
);
...
@@ -258,7 +255,7 @@ export default {
...
@@ -258,7 +255,7 @@ export default {
<icon
name=
"external-link"
/>
<icon
name=
"external-link"
/>
</gl-button>
</gl-button>
<gl-button
<gl-button
v-if=
"
showExpandDiffToFullFileEnabl
ed"
v-if=
"
!diffFile.is_fully_expand
ed"
class=
"expand-file js-expand-file"
class=
"expand-file js-expand-file"
@
click=
"toggleFullDiff(diffFile.file_path)"
@
click=
"toggleFullDiff(diffFile.file_path)"
>
>
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
3b158409
...
@@ -16,10 +16,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
...
@@ -16,10 +16,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
before_action
:authenticate_user!
,
only:
[
:assign_related_issues
]
before_action
:authenticate_user!
,
only:
[
:assign_related_issues
]
before_action
:check_user_can_push_to_source_branch!
,
only:
[
:rebase
]
before_action
:check_user_can_push_to_source_branch!
,
only:
[
:rebase
]
before_action
only:
[
:show
]
do
push_frontend_feature_flag
(
:expand_diff_full_file
)
end
def
index
def
index
@merge_requests
=
@issuables
@merge_requests
=
@issuables
...
...
app/serializers/diff_file_entity.rb
View file @
3b158409
...
@@ -57,7 +57,7 @@ class DiffFileEntity < DiffFileBaseEntity
...
@@ -57,7 +57,7 @@ class DiffFileEntity < DiffFileBaseEntity
diff_file
.
diff_lines_for_serializer
diff_file
.
diff_lines_for_serializer
end
end
expose
:is_fully_expanded
,
if:
->
(
diff_file
,
_
)
{
Feature
.
enabled?
(
:expand_diff_full_file
,
default_enabled:
true
)
&&
diff_file
.
text?
}
do
|
diff_file
|
expose
:is_fully_expanded
,
if:
->
(
diff_file
,
_
)
{
diff_file
.
text?
}
do
|
diff_file
|
diff_file
.
fully_expanded?
diff_file
.
fully_expanded?
end
end
...
...
spec/javascripts/diffs/components/diff_file_header_spec.js
View file @
3b158409
...
@@ -23,9 +23,6 @@ describe('diff_file_header', () => {
...
@@ -23,9 +23,6 @@ describe('diff_file_header', () => {
});
});
beforeEach
(()
=>
{
beforeEach
(()
=>
{
gon
.
features
=
{
expandDiffFullFile
:
true
,
};
const
diffFile
=
diffDiscussionMock
.
diff_file
;
const
diffFile
=
diffDiscussionMock
.
diff_file
;
diffFile
.
added_lines
=
2
;
diffFile
.
added_lines
=
2
;
...
...
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