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
692c1767
Commit
692c1767
authored
Mar 23, 2022
by
Jacques
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove new_dir_modal feature flag
Removed the new_dir_modal feature flag Changelog: removed
parent
ee710197
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
67 deletions
+24
-67
app/assets/javascripts/repository/components/breadcrumbs.vue
app/assets/javascripts/repository/components/breadcrumbs.vue
+9
-25
app/controllers/projects/tree_controller.rb
app/controllers/projects/tree_controller.rb
+0
-1
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+0
-1
app/views/projects/_files.html.haml
app/views/projects/_files.html.haml
+1
-1
config/feature_flags/development/new_dir_modal.yml
config/feature_flags/development/new_dir_modal.yml
+0
-8
spec/frontend/repository/components/breadcrumbs_spec.js
spec/frontend/repository/components/breadcrumbs_spec.js
+14
-31
No files found.
app/assets/javascripts/repository/components/breadcrumbs.vue
View file @
692c1767
...
...
@@ -9,7 +9,6 @@ import {
}
from
'
@gitlab/ui
'
;
import
permissionsQuery
from
'
shared_queries/repository/permissions.query.graphql
'
;
import
{
joinPaths
,
escapeFileUrl
}
from
'
~/lib/utils/url_utility
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
{
__
}
from
'
../../locale
'
;
import
getRefMixin
from
'
../mixins/get_ref
'
;
import
projectPathQuery
from
'
../queries/project_path.query.graphql
'
;
...
...
@@ -58,7 +57,7 @@ export default {
directives
:
{
GlModal
:
GlModalDirective
,
},
mixins
:
[
getRefMixin
,
glFeatureFlagsMixin
()
],
mixins
:
[
getRefMixin
],
props
:
{
currentPath
:
{
type
:
String
,
...
...
@@ -176,11 +175,7 @@ export default {
return
this
.
canEditTree
&&
!
this
.
$apollo
.
queries
.
userPermissions
.
loading
;
},
showNewDirectoryModal
()
{
return
(
this
.
glFeatures
.
newDirModal
&&
this
.
canEditTree
&&
!
this
.
$apollo
.
queries
.
userPermissions
.
loading
);
return
this
.
canEditTree
&&
!
this
.
$apollo
.
queries
.
userPermissions
.
loading
;
},
dropdownItems
()
{
const
items
=
[];
...
...
@@ -209,24 +204,13 @@ export default {
},
);
if
(
this
.
glFeatures
.
newDirModal
)
{
items
.
push
({
attrs
:
{
href
:
'
#modal-create-new-dir
'
,
},
text
:
__
(
'
New directory
'
),
modalId
:
NEW_DIRECTORY_MODAL_ID
,
});
}
else
{
items
.
push
({
attrs
:
{
href
:
'
#modal-create-new-dir
'
,
'
data-target
'
:
'
#modal-create-new-dir
'
,
'
data-toggle
'
:
'
modal
'
,
},
text
:
__
(
'
New directory
'
),
});
}
items
.
push
({
attrs
:
{
href
:
'
#modal-create-new-dir
'
,
},
text
:
__
(
'
New directory
'
),
modalId
:
NEW_DIRECTORY_MODAL_ID
,
});
}
else
if
(
this
.
canCreateMrFromFork
)
{
items
.
push
(
{
...
...
app/controllers/projects/tree_controller.rb
View file @
692c1767
...
...
@@ -18,7 +18,6 @@ class Projects::TreeController < Projects::ApplicationController
before_action
do
push_frontend_feature_flag
(
:lazy_load_commits
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:new_dir_modal
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:refactor_blob_viewer
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:highlight_js
,
@project
,
default_enabled: :yaml
)
push_licensed_feature
(
:file_locks
)
if
@project
.
licensed_feature_available?
(
:file_locks
)
...
...
app/controllers/projects_controller.rb
View file @
692c1767
...
...
@@ -39,7 +39,6 @@ class ProjectsController < Projects::ApplicationController
push_frontend_feature_flag
(
:refactor_blob_viewer
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:highlight_js
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:increase_page_size_exponentially
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:new_dir_modal
,
@project
,
default_enabled: :yaml
)
push_licensed_feature
(
:file_locks
)
if
@project
.
present?
&&
@project
.
licensed_feature_available?
(
:file_locks
)
push_frontend_feature_flag
(
:work_items
,
@project
,
default_enabled: :yaml
)
end
...
...
app/views/projects/_files.html.haml
View file @
692c1767
...
...
@@ -20,6 +20,6 @@
=
render
'stat_anchor_list'
,
anchors:
@project
.
statistics_buttons
(
show_auto_devops_callout:
show_auto_devops_callout
),
project_buttons:
true
#js-tree-list
{
data:
vue_file_list_data
(
project
,
ref
)
}
-
if
!
Feature
.
enabled?
(
:new_dir_modal
,
default_enabled: :yaml
)
&&
can_edit_tree?
-
if
can_edit_tree?
=
render
'projects/blob/new_dir'
config/feature_flags/development/new_dir_modal.yml
deleted
100644 → 0
View file @
ee710197
---
name
:
new_dir_modal
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/71154
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/341675
milestone
:
'
14.4'
type
:
development
group
:
group::source code
default_enabled
:
true
spec/frontend/repository/components/breadcrumbs_spec.js
View file @
692c1767
...
...
@@ -12,7 +12,7 @@ const defaultMockRoute = {
describe
(
'
Repository breadcrumbs component
'
,
()
=>
{
let
wrapper
;
const
factory
=
(
currentPath
,
extraProps
=
{},
mockRoute
=
{}
,
newDirModal
=
true
)
=>
{
const
factory
=
(
currentPath
,
extraProps
=
{},
mockRoute
=
{})
=>
{
const
$apollo
=
{
queries
:
{
userPermissions
:
{
...
...
@@ -36,7 +36,6 @@ describe('Repository breadcrumbs component', () => {
},
$apollo
,
},
provide
:
{
glFeatures
:
{
newDirModal
}
},
});
};
...
...
@@ -147,37 +146,21 @@ describe('Repository breadcrumbs component', () => {
});
describe
(
'
renders the new directory modal
'
,
()
=>
{
describe
(
'
with the feature flag enabled
'
,
()
=>
{
beforeEach
(()
=>
{
window
.
gon
.
features
=
{
newDirModal
:
true
,
};
factory
(
'
/
'
,
{
canEditTree
:
true
});
});
it
(
'
does not render the modal while loading
'
,
()
=>
{
expect
(
findNewDirectoryModal
().
exists
()).
toBe
(
false
);
});
it
(
'
renders the modal once loaded
'
,
async
()
=>
{
// setData usage is discouraged. See https://gitlab.com/groups/gitlab-org/-/epics/7330 for details
// eslint-disable-next-line no-restricted-syntax
wrapper
.
setData
({
$apollo
:
{
queries
:
{
userPermissions
:
{
loading
:
false
}
}
}
});
await
nextTick
();
expect
(
findNewDirectoryModal
().
exists
()).
toBe
(
true
);
});
beforeEach
(()
=>
{
factory
(
'
/
'
,
{
canEditTree
:
true
});
});
it
(
'
does not render the modal while loading
'
,
()
=>
{
expect
(
findNewDirectoryModal
().
exists
()).
toBe
(
false
);
});
describe
(
'
with the feature flag disabled
'
,
()
=>
{
it
(
'
does not render the modal
'
,
()
=>
{
window
.
gon
.
features
=
{
newDirModal
:
false
,
};
factory
(
'
/
'
,
{
canEditTree
:
true
},
{},
{},
false
);
expect
(
findNewDirectoryModal
().
exists
()).
toBe
(
false
);
}
);
it
(
'
renders the modal once loaded
'
,
async
()
=>
{
// setData usage is discouraged. See https://gitlab.com/groups/gitlab-org/-/epics/7330 for details
// eslint-disable-next-line no-restricted-syntax
wrapper
.
setData
({
$apollo
:
{
queries
:
{
userPermissions
:
{
loading
:
false
}
}
}
});
await
nextTick
(
);
expect
(
findNewDirectoryModal
().
exists
()).
toBe
(
true
);
});
});
});
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