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
a8f2168e
Commit
a8f2168e
authored
Jul 23, 2021
by
mgandres
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up feature flag for pipeline editor branch switcher
Changelog: other
parent
298dd854
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
2 additions
and
58 deletions
+2
-58
app/assets/javascripts/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue
...e_editor/components/file_nav/pipeline_editor_file_nav.vue
+1
-8
app/assets/javascripts/pipeline_editor/components/ui/pipeline_editor_empty_state.vue
...line_editor/components/ui/pipeline_editor_empty_state.vue
+1
-4
app/controllers/projects/ci/pipeline_editor_controller.rb
app/controllers/projects/ci/pipeline_editor_controller.rb
+0
-1
config/feature_flags/development/pipeline_editor_branch_switcher.yml
...ure_flags/development/pipeline_editor_branch_switcher.yml
+0
-8
qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_editor_branch_switcher_spec.rb
...4_verify/pipeline/pipeline_editor_branch_switcher_spec.rb
+0
-2
spec/features/projects/ci/editor_spec.rb
spec/features/projects/ci/editor_spec.rb
+0
-4
spec/frontend/pipeline_editor/components/file-nav/pipeline_editor_file_nav_spec.js
...itor/components/file-nav/pipeline_editor_file_nav_spec.js
+0
-18
spec/frontend/pipeline_editor/components/ui/pipeline_editor_empty_state_spec.js
..._editor/components/ui/pipeline_editor_empty_state_spec.js
+0
-13
No files found.
app/assets/javascripts/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue
View file @
a8f2168e
<
script
>
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
BranchSwitcher
from
'
./branch_switcher.vue
'
;
export
default
{
components
:
{
BranchSwitcher
,
},
mixins
:
[
glFeatureFlagsMixin
()],
computed
:
{
showBranchSwitcher
()
{
return
this
.
glFeatures
.
pipelineEditorBranchSwitcher
;
},
},
};
</
script
>
<
template
>
<div
class=
"gl-mb-4"
>
<branch-switcher
v-
if=
"showBranchSwitcher"
v-
on=
"$listeners"
/>
<branch-switcher
v-on=
"$listeners"
/>
</div>
</
template
>
app/assets/javascripts/pipeline_editor/components/ui/pipeline_editor_empty_state.vue
View file @
a8f2168e
...
...
@@ -24,9 +24,6 @@ export default {
},
},
computed
:
{
showFileNav
()
{
return
this
.
glFeatures
.
pipelineEditorBranchSwitcher
;
},
showCTAButton
()
{
return
this
.
glFeatures
.
pipelineEditorEmptyStateAction
;
},
...
...
@@ -40,7 +37,7 @@ export default {
</
script
>
<
template
>
<div>
<pipeline-editor-file-nav
v-
if=
"showFileNav"
v-
on=
"$listeners"
/>
<pipeline-editor-file-nav
v-on=
"$listeners"
/>
<div
class=
"gl-display-flex gl-flex-direction-column gl-align-items-center gl-mt-11"
>
<img
:src=
"emptyStateIllustrationPath"
/>
<h1
class=
"gl-font-size-h1"
>
{{
$options
.
i18n
.
title
}}
</h1>
...
...
app/controllers/projects/ci/pipeline_editor_controller.rb
View file @
a8f2168e
...
...
@@ -4,7 +4,6 @@ class Projects::Ci::PipelineEditorController < Projects::ApplicationController
before_action
:check_can_collaborate!
before_action
do
push_frontend_feature_flag
(
:pipeline_editor_empty_state_action
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:pipeline_editor_branch_switcher
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:pipeline_editor_drawer
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:schema_linting
,
@project
,
default_enabled: :yaml
)
end
...
...
config/feature_flags/development/pipeline_editor_branch_switcher.yml
deleted
100644 → 0
View file @
298dd854
---
name
:
pipeline_editor_branch_switcher
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57562
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/326189
milestone
:
'
13.11'
type
:
development
group
:
group::pipeline authoring
default_enabled
:
true
qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_editor_branch_switcher_spec.rb
View file @
a8f2168e
...
...
@@ -58,14 +58,12 @@ module QA
end
before
do
Runtime
::
Feature
.
enable
(
:pipeline_editor_branch_switcher
)
Flow
::
Login
.
sign_in
project
.
visit!
Page
::
Project
::
Menu
.
perform
(
&
:go_to_pipeline_editor
)
end
after
do
Runtime
::
Feature
.
disable
(
:pipeline_editor_branch_switcher
)
project
.
remove_via_api!
Page
::
Main
::
Menu
.
perform
(
&
:sign_out
)
end
...
...
spec/features/projects/ci/editor_spec.rb
View file @
a8f2168e
...
...
@@ -27,10 +27,6 @@ RSpec.describe 'Pipeline Editor', :js do
end
context
'branch switcher'
do
before
do
stub_feature_flags
(
pipeline_editor_branch_switcher:
true
)
end
def
switch_to_branch
(
branch
)
find
(
'[data-testid="branch-selector"]'
).
click
...
...
spec/frontend/pipeline_editor/components/file-nav/pipeline_editor_file_nav_spec.js
View file @
a8f2168e
...
...
@@ -4,16 +4,10 @@ import PipelineEditorFileNav from '~/pipeline_editor/components/file_nav/pipelin
describe
(
'
Pipeline editor file nav
'
,
()
=>
{
let
wrapper
;
const
mockProvide
=
{
glFeatures
:
{
pipelineEditorBranchSwitcher
:
true
,
},
};
const
createComponent
=
({
provide
=
{}
}
=
{})
=>
{
wrapper
=
shallowMount
(
PipelineEditorFileNav
,
{
provide
:
{
...
mockProvide
,
...
provide
,
},
});
...
...
@@ -34,16 +28,4 @@ describe('Pipeline editor file nav', () => {
expect
(
findBranchSwitcher
().
exists
()).
toBe
(
true
);
});
});
describe
(
'
with branch switcher feature flag OFF
'
,
()
=>
{
it
(
'
does not render the branch switcher
'
,
()
=>
{
createComponent
({
provide
:
{
glFeatures
:
{
pipelineEditorBranchSwitcher
:
false
},
},
});
expect
(
findBranchSwitcher
().
exists
()).
toBe
(
false
);
});
});
});
spec/frontend/pipeline_editor/components/ui/pipeline_editor_empty_state_spec.js
View file @
a8f2168e
...
...
@@ -7,7 +7,6 @@ describe('Pipeline editor empty state', () => {
let
wrapper
;
const
defaultProvide
=
{
glFeatures
:
{
pipelineEditorBranchSwitcher
:
true
,
pipelineEditorEmptyStateAction
:
false
,
},
emptyStateIllustrationPath
:
'
my/svg/path
'
,
...
...
@@ -82,17 +81,5 @@ describe('Pipeline editor empty state', () => {
await
findConfirmButton
().
vm
.
$emit
(
'
click
'
);
expect
(
wrapper
.
emitted
(
expectedEvent
)).
toHaveLength
(
1
);
});
describe
(
'
with branch switcher feature flag OFF
'
,
()
=>
{
it
(
'
does not render the file nav
'
,
()
=>
{
createComponent
({
provide
:
{
glFeatures
:
{
pipelineEditorBranchSwitcher
:
false
},
},
});
expect
(
findFileNav
().
exists
()).
toBe
(
false
);
});
});
});
});
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