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
47ff178f
Commit
47ff178f
authored
Aug 11, 2020
by
mnichols1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update feature flag form buttons to gl-button
parent
f6e53638
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
15 deletions
+18
-15
changelogs/unreleased/219899-replace-gl-deprecated-button-with-gl-button-in-ee-app-assets-javas.yml
...precated-button-with-gl-button-in-ee-app-assets-javas.yml
+5
-0
ee/app/assets/javascripts/feature_flags/components/form.vue
ee/app/assets/javascripts/feature_flags/components/form.vue
+11
-13
ee/spec/frontend/feature_flags/components/form_spec.js
ee/spec/frontend/feature_flags/components/form_spec.js
+2
-2
No files found.
changelogs/unreleased/219899-replace-gl-deprecated-button-with-gl-button-in-ee-app-assets-javas.yml
0 → 100644
View file @
47ff178f
---
title
:
Update feature flag form buttons to gl-button
merge_request
:
39220
author
:
type
:
changed
ee/app/assets/javascripts/feature_flags/components/form.vue
View file @
47ff178f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
{
memoize
,
isString
,
cloneDeep
,
isNumber
,
uniqueId
}
from
'
lodash
'
;
import
{
memoize
,
isString
,
cloneDeep
,
isNumber
,
uniqueId
}
from
'
lodash
'
;
import
{
import
{
Gl
Deprecated
Button
,
GlButton
,
GlDeprecatedBadge
as
GlBadge
,
GlDeprecatedBadge
as
GlBadge
,
GlTooltip
,
GlTooltip
,
GlTooltipDirective
,
GlTooltipDirective
,
...
@@ -32,7 +32,7 @@ import RelatedIssuesRoot from 'ee/related_issues/components/related_issues_root.
...
@@ -32,7 +32,7 @@ import RelatedIssuesRoot from 'ee/related_issues/components/related_issues_root.
export
default
{
export
default
{
components
:
{
components
:
{
Gl
Deprecated
Button
,
GlButton
,
GlBadge
,
GlBadge
,
GlFormTextarea
,
GlFormTextarea
,
GlFormCheckbox
,
GlFormCheckbox
,
...
@@ -340,9 +340,9 @@ export default {
...
@@ -340,9 +340,9 @@ export default {
<h4>
{{
s__
(
'
FeatureFlags|Strategies
'
)
}}
</h4>
<h4>
{{
s__
(
'
FeatureFlags|Strategies
'
)
}}
</h4>
<div
class=
"flex align-items-baseline justify-content-between"
>
<div
class=
"flex align-items-baseline justify-content-between"
>
<p
class=
"mr-3"
>
{{
$options
.
translations
.
newHelpText
}}
</p>
<p
class=
"mr-3"
>
{{
$options
.
translations
.
newHelpText
}}
</p>
<gl-
deprecated-
button
variant=
"success"
category=
"secondary"
@
click=
"addStrategy"
>
<gl-button
variant=
"success"
category=
"secondary"
@
click=
"addStrategy"
>
{{
s__
(
'
FeatureFlags|Add strategy
'
)
}}
{{
s__
(
'
FeatureFlags|Add strategy
'
)
}}
</gl-
deprecated-
button>
</gl-button>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -523,15 +523,14 @@ export default {
...
@@ -523,15 +523,14 @@ export default {
{{ s__('FeatureFlags|Remove') }}
{{ s__('FeatureFlags|Remove') }}
</div>
</div>
<div
class=
"table-mobile-content js-feature-flag-delete"
>
<div
class=
"table-mobile-content js-feature-flag-delete"
>
<gl-
deprecated-
button
<gl-button
v-if=
"!isAllEnvironment(scope.environmentScope) && canUpdateScope(scope)"
v-if=
"!isAllEnvironment(scope.environmentScope) && canUpdateScope(scope)"
v-gl-tooltip
v-gl-tooltip
:title=
"s__('FeatureFlags|Remove')"
:title=
"s__('FeatureFlags|Remove')"
class=
"js-delete-scope btn-transparent pr-3 pl-3"
class=
"js-delete-scope btn-transparent pr-3 pl-3"
icon=
"clear"
@
click=
"removeScope(scope)"
@
click=
"removeScope(scope)"
>
/>
<icon
name=
"clear"
/>
</gl-deprecated-button>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -592,7 +591,7 @@ export default {
...
@@ -592,7 +591,7 @@ export default {
</fieldset>
</fieldset>
<div
class=
"form-actions"
>
<div
class=
"form-actions"
>
<gl-
deprecated-
button
<gl-button
ref=
"submitButton"
ref=
"submitButton"
:disabled=
"readOnly"
:disabled=
"readOnly"
type=
"button"
type=
"button"
...
@@ -601,14 +600,13 @@ export default {
...
@@ -601,14 +600,13 @@ export default {
@
click=
"handleSubmit"
@
click=
"handleSubmit"
>
>
{{ submitText }}
{{ submitText }}
</gl-
deprecated-
button>
</gl-button>
<gl-
deprecated-
button
<gl-button
:href=
"cancelPath"
:href=
"cancelPath"
variant=
"secondary"
class=
"js-ff-cancel col-xs-12 float-right"
class=
"js-ff-cancel col-xs-12 float-right"
>
>
{{ __('Cancel') }}
{{ __('Cancel') }}
</gl-
deprecated-
button>
</gl-button>
</div>
</div>
</form>
</form>
</template>
</template>
ee/spec/frontend/feature_flags/components/form_spec.js
View file @
47ff178f
import
{
uniqueId
}
from
'
lodash
'
;
import
{
uniqueId
}
from
'
lodash
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlFormTextarea
,
GlFormCheckbox
,
Gl
Deprecated
Button
}
from
'
@gitlab/ui
'
;
import
{
GlFormTextarea
,
GlFormCheckbox
,
GlButton
}
from
'
@gitlab/ui
'
;
import
Api
from
'
ee/api
'
;
import
Api
from
'
ee/api
'
;
import
Form
from
'
ee/feature_flags/components/form.vue
'
;
import
Form
from
'
ee/feature_flags/components/form.vue
'
;
import
EnvironmentsDropdown
from
'
ee/feature_flags/components/environments_dropdown.vue
'
;
import
EnvironmentsDropdown
from
'
ee/feature_flags/components/environments_dropdown.vue
'
;
...
@@ -455,7 +455,7 @@ describe('feature flag form', () => {
...
@@ -455,7 +455,7 @@ describe('feature flag form', () => {
});
});
it
(
'
adds an all users strategy when clicking the Add button
'
,
()
=>
{
it
(
'
adds an all users strategy when clicking the Add button
'
,
()
=>
{
wrapper
.
find
(
Gl
Deprecated
Button
).
vm
.
$emit
(
'
click
'
);
wrapper
.
find
(
GlButton
).
vm
.
$emit
(
'
click
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
const
strategies
=
wrapper
.
findAll
(
Strategy
);
const
strategies
=
wrapper
.
findAll
(
Strategy
);
...
...
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