Commit c35964bb authored by Sarah Groff Hennigh-Palermo's avatar Sarah Groff Hennigh-Palermo

Merge branch 'marcel-update-deprecated-button-1' into 'master'

Update gldeprecatedbutton to glbutton in CI Variables list

Closes #219762

See merge request gitlab-org/gitlab!38757
parents fa711cfd d92e3759
<script> <script>
import { GlPopover, GlIcon, GlDeprecatedButton, GlTooltipDirective } from '@gitlab/ui'; import { GlPopover, GlButton, GlTooltipDirective } from '@gitlab/ui';
export default { export default {
maxTextLength: 95, maxTextLength: 95,
components: { components: {
GlPopover, GlPopover,
GlIcon, GlButton,
GlDeprecatedButton,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -39,16 +38,18 @@ export default { ...@@ -39,16 +38,18 @@ export default {
<template> <template>
<div id="popover-container"> <div id="popover-container">
<gl-popover :target="target" triggers="hover" placement="top" container="popover-container"> <gl-popover :target="target" triggers="hover" placement="top" container="popover-container">
<div class="d-flex justify-content-between position-relative"> <div class="gl-display-flex gl-justify-content-space-between gl-align-items-center">
<div class="pr-5 w-100 ci-popover-value">{{ displayValue }}</div> <div class="ci-popover-value gl-pr-3">
<gl-deprecated-button {{ displayValue }}
</div>
<gl-button
v-gl-tooltip v-gl-tooltip
class="btn-transparent btn-clipboard position-absolute position-top-0 position-right-0" category="tertiary"
icon="copy-to-clipboard"
:title="tooltipText" :title="tooltipText"
:data-clipboard-text="value" :data-clipboard-text="value"
> :aria-label="__('Copy to clipboard')"
<gl-icon name="copy-to-clipboard" /> />
</gl-deprecated-button>
</div> </div>
</gl-popover> </gl-popover>
</div> </div>
......
---
title: Change to glbutton component in CI variables list
merge_request: 38757
author:
type: other
...@@ -6931,6 +6931,9 @@ msgstr "" ...@@ -6931,6 +6931,9 @@ msgstr ""
msgid "Copy the code below to implement tracking in your application:" msgid "Copy the code below to implement tracking in your application:"
msgstr "" msgstr ""
msgid "Copy to clipboard"
msgstr ""
msgid "Copy token" msgid "Copy token"
msgstr "" msgstr ""
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import CiVariablePopover from '~/ci_variable_list/components/ci_variable_popover.vue'; import CiVariablePopover from '~/ci_variable_list/components/ci_variable_popover.vue';
import mockData from '../services/mock_data'; import mockData from '../services/mock_data';
...@@ -18,7 +18,7 @@ describe('Ci Variable Popover', () => { ...@@ -18,7 +18,7 @@ describe('Ci Variable Popover', () => {
}); });
}; };
const findButton = () => wrapper.find(GlDeprecatedButton); const findButton = () => wrapper.find(GlButton);
beforeEach(() => { beforeEach(() => {
createComponent(); createComponent();
......
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