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
16e1b439
Commit
16e1b439
authored
Mar 18, 2019
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove diff tree filtering feature flag
parent
a52d7dfa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
38 deletions
+18
-38
app/assets/javascripts/diffs/components/tree_list.vue
app/assets/javascripts/diffs/components/tree_list.vue
+18
-34
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+0
-1
locale/gitlab.pot
locale/gitlab.pot
+0
-3
No files found.
app/assets/javascripts/diffs/components/tree_list.vue
View file @
16e1b439
...
@@ -30,8 +30,9 @@ export default {
...
@@ -30,8 +30,9 @@ export default {
filteredTreeList
()
{
filteredTreeList
()
{
const
search
=
this
.
search
.
toLowerCase
().
trim
();
const
search
=
this
.
search
.
toLowerCase
().
trim
();
if
(
search
===
''
||
this
.
$options
.
fuzzyFileFinderEnabled
)
if
(
search
===
''
)
{
return
this
.
renderTreeList
?
this
.
tree
:
this
.
allBlobs
;
return
this
.
renderTreeList
?
this
.
tree
:
this
.
allBlobs
;
}
return
this
.
allBlobs
.
reduce
((
acc
,
folder
)
=>
{
return
this
.
allBlobs
.
reduce
((
acc
,
folder
)
=>
{
const
tree
=
folder
.
tree
.
filter
(
f
=>
f
.
path
.
toLowerCase
().
indexOf
(
search
)
>=
0
);
const
tree
=
folder
.
tree
.
filter
(
f
=>
f
.
path
.
toLowerCase
().
indexOf
(
search
)
>=
0
);
...
@@ -51,13 +52,11 @@ export default {
...
@@ -51,13 +52,11 @@ export default {
},
},
},
},
methods
:
{
methods
:
{
...
mapActions
(
'
diffs
'
,
[
'
toggleTreeOpen
'
,
'
scrollToFile
'
,
'
toggleFileFinder
'
]),
...
mapActions
(
'
diffs
'
,
[
'
toggleTreeOpen
'
,
'
scrollToFile
'
]),
clearSearch
()
{
clearSearch
()
{
this
.
search
=
''
;
this
.
search
=
''
;
},
},
},
},
shortcutKeyCharacter
:
`
${
/
Mac
/
i
.
test
(
navigator
.
userAgent
)
?
'
⌘
'
:
'
Ctrl
'
}
+P`
,
diffTreeFiltering
:
gon
.
features
&&
gon
.
features
.
diffTreeFiltering
,
};
};
</
script
>
</
script
>
...
@@ -66,36 +65,21 @@ export default {
...
@@ -66,36 +65,21 @@ export default {
<div
class=
"append-bottom-8 position-relative tree-list-search d-flex"
>
<div
class=
"append-bottom-8 position-relative tree-list-search d-flex"
>
<div
class=
"flex-fill d-flex"
>
<div
class=
"flex-fill d-flex"
>
<icon
name=
"search"
class=
"position-absolute tree-list-icon"
/>
<icon
name=
"search"
class=
"position-absolute tree-list-icon"
/>
<template
v-if=
"$options.diffTreeFiltering"
>
<input
<input
v-model=
"search"
v-model=
"search"
:placeholder=
"s__('MergeRequest|Filter files')"
:placeholder=
"s__('MergeRequest|Filter files')"
type=
"search"
type=
"search"
class=
"form-control"
class=
"form-control"
/>
/>
<button
<button
v-show=
"search"
v-show=
"search"
:aria-label=
"__('Clear search')"
:aria-label=
"__('Clear search')"
type=
"button"
type=
"button"
class=
"position-absolute bg-transparent tree-list-icon tree-list-clear-icon border-0 p-0"
class=
"position-absolute bg-transparent tree-list-icon tree-list-clear-icon border-0 p-0"
@
click=
"clearSearch"
@
click=
"clearSearch"
>
>
<icon
name=
"close"
/>
<icon
name=
"close"
/>
</button>
</button>
</
template
>
<
template
v-else
>
<button
type=
"button"
class=
"form-control text-left text-secondary"
@
click=
"toggleFileFinder(true)"
>
{{
s__
(
'
MergeRequest|Search files
'
)
}}
</button>
<span
class=
"position-absolute text-secondary diff-tree-search-shortcut"
v-html=
"$options.shortcutKeyCharacter"
></span>
</
template
>
</div>
</div>
</div>
</div>
<div
:class=
"
{ 'pt-0 tree-list-blobs': !renderTreeList }" class="tree-list-scroll">
<div
:class=
"
{ 'pt-0 tree-list-blobs': !renderTreeList }" class="tree-list-scroll">
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
16e1b439
...
@@ -17,7 +17,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
...
@@ -17,7 +17,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
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
before_action
only:
[
:show
]
do
push_frontend_feature_flag
(
:diff_tree_filtering
,
default_enabled:
true
)
push_frontend_feature_flag
(
:expand_diff_full_file
)
push_frontend_feature_flag
(
:expand_diff_full_file
)
end
end
...
...
locale/gitlab.pot
View file @
16e1b439
...
@@ -4872,9 +4872,6 @@ msgstr ""
...
@@ -4872,9 +4872,6 @@ msgstr ""
msgid "MergeRequest|No files found"
msgid "MergeRequest|No files found"
msgstr ""
msgstr ""
msgid "MergeRequest|Search files"
msgstr ""
msgid "Merged"
msgid "Merged"
msgstr ""
msgstr ""
...
...
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