Commit f96ec3a7 authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch 'mg-remove-gl-dropdown-exports' into 'master'

Replace remaining GlDropdown usage

See merge request gitlab-org/gitlab!38516
parents 27d7f3d8 127c4b5a
<script> <script>
import { GlDropdown, GlDropdownItem } from '@gitlab/ui'; import { GlDeprecatedDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import allVersionsMixin from '../../mixins/all_versions'; import allVersionsMixin from '../../mixins/all_versions';
import { findVersionId } from '../../utils/design_management_utils'; import { findVersionId } from '../../utils/design_management_utils';
export default { export default {
components: { components: {
GlDropdown, GlDeprecatedDropdown,
GlDropdownItem, GlDeprecatedDropdownItem,
}, },
mixins: [allVersionsMixin], mixins: [allVersionsMixin],
computed: { computed: {
...@@ -50,8 +50,8 @@ export default { ...@@ -50,8 +50,8 @@ export default {
</script> </script>
<template> <template>
<gl-dropdown :text="dropdownText" variant="link" class="design-version-dropdown"> <gl-deprecated-dropdown :text="dropdownText" variant="link" class="design-version-dropdown">
<gl-dropdown-item v-for="(version, index) in allVersions" :key="version.node.id"> <gl-deprecated-dropdown-item v-for="(version, index) in allVersions" :key="version.node.id">
<router-link <router-link
class="d-flex js-version-link" class="d-flex js-version-link"
:to="{ path: $route.path, query: { version: findVersionId(version.node.id) } }" :to="{ path: $route.path, query: { version: findVersionId(version.node.id) } }"
...@@ -71,6 +71,6 @@ export default { ...@@ -71,6 +71,6 @@ export default {
class="fa fa-check float-right gl-mr-2" class="fa fa-check float-right gl-mr-2"
></i> ></i>
</router-link> </router-link>
</gl-dropdown-item> </gl-deprecated-dropdown-item>
</gl-dropdown> </gl-deprecated-dropdown>
</template> </template>
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Design management design version dropdown component renders design version dropdown button 1`] = ` exports[`Design management design version dropdown component renders design version dropdown button 1`] = `
<gl-dropdown-stub <gl-deprecated-dropdown-stub
class="design-version-dropdown" class="design-version-dropdown"
issueiid="" issueiid=""
projectpath="" projectpath=""
text="Showing Latest Version" text="Showing Latest Version"
variant="link" variant="link"
> >
<gl-dropdown-item-stub> <gl-deprecated-dropdown-item-stub>
<router-link-stub <router-link-stub
class="d-flex js-version-link" class="d-flex js-version-link"
to="[object Object]" to="[object Object]"
...@@ -31,8 +31,8 @@ exports[`Design management design version dropdown component renders design vers ...@@ -31,8 +31,8 @@ exports[`Design management design version dropdown component renders design vers
class="fa fa-check float-right gl-mr-2" class="fa fa-check float-right gl-mr-2"
/> />
</router-link-stub> </router-link-stub>
</gl-dropdown-item-stub> </gl-deprecated-dropdown-item-stub>
<gl-dropdown-item-stub> <gl-deprecated-dropdown-item-stub>
<router-link-stub <router-link-stub
class="d-flex js-version-link" class="d-flex js-version-link"
to="[object Object]" to="[object Object]"
...@@ -51,19 +51,19 @@ exports[`Design management design version dropdown component renders design vers ...@@ -51,19 +51,19 @@ exports[`Design management design version dropdown component renders design vers
<!----> <!---->
</router-link-stub> </router-link-stub>
</gl-dropdown-item-stub> </gl-deprecated-dropdown-item-stub>
</gl-dropdown-stub> </gl-deprecated-dropdown-stub>
`; `;
exports[`Design management design version dropdown component renders design version list 1`] = ` exports[`Design management design version dropdown component renders design version list 1`] = `
<gl-dropdown-stub <gl-deprecated-dropdown-stub
class="design-version-dropdown" class="design-version-dropdown"
issueiid="" issueiid=""
projectpath="" projectpath=""
text="Showing Latest Version" text="Showing Latest Version"
variant="link" variant="link"
> >
<gl-dropdown-item-stub> <gl-deprecated-dropdown-item-stub>
<router-link-stub <router-link-stub
class="d-flex js-version-link" class="d-flex js-version-link"
to="[object Object]" to="[object Object]"
...@@ -86,8 +86,8 @@ exports[`Design management design version dropdown component renders design vers ...@@ -86,8 +86,8 @@ exports[`Design management design version dropdown component renders design vers
class="fa fa-check float-right gl-mr-2" class="fa fa-check float-right gl-mr-2"
/> />
</router-link-stub> </router-link-stub>
</gl-dropdown-item-stub> </gl-deprecated-dropdown-item-stub>
<gl-dropdown-item-stub> <gl-deprecated-dropdown-item-stub>
<router-link-stub <router-link-stub
class="d-flex js-version-link" class="d-flex js-version-link"
to="[object Object]" to="[object Object]"
...@@ -106,6 +106,6 @@ exports[`Design management design version dropdown component renders design vers ...@@ -106,6 +106,6 @@ exports[`Design management design version dropdown component renders design vers
<!----> <!---->
</router-link-stub> </router-link-stub>
</gl-dropdown-item-stub> </gl-deprecated-dropdown-item-stub>
</gl-dropdown-stub> </gl-deprecated-dropdown-stub>
`; `;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment