Commit 361eda43 authored by David's avatar David

Update action component css

Here we edit the legacy CSS for the
job items inside the dropdown
graph badge HAML file
parent 0949c003
<script> <script>
import { GlTooltipDirective, GlDeprecatedButton, GlLoadingIcon } from '@gitlab/ui'; import { GlTooltipDirective, GlButton, GlLoadingIcon } from '@gitlab/ui';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { dasherize } from '~/lib/utils/text_utility'; import { dasherize } from '~/lib/utils/text_utility';
import { __ } from '~/locale'; import { __ } from '~/locale';
...@@ -19,7 +19,7 @@ import Icon from '~/vue_shared/components/icon.vue'; ...@@ -19,7 +19,7 @@ import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
Icon, Icon,
GlDeprecatedButton, GlButton,
GlLoadingIcon, GlLoadingIcon,
}, },
directives: { directives: {
...@@ -82,16 +82,16 @@ export default { ...@@ -82,16 +82,16 @@ export default {
}; };
</script> </script>
<template> <template>
<gl-deprecated-button <gl-button
:id="`js-ci-action-${link}`" :id="`js-ci-action-${link}`"
v-gl-tooltip="{ boundary: 'viewport' }" v-gl-tooltip="{ boundary: 'viewport' }"
:title="tooltipText" :title="tooltipText"
:class="cssClass" :class="cssClass"
:disabled="isDisabled" :disabled="isDisabled"
class="js-ci-action btn btn-blank btn-transparent ci-action-icon-container ci-action-icon-wrapper d-flex align-items-center justify-content-center" class="js-ci-action ci-action-icon-container ci-action-icon-wrapper gl-display-flex gl-align-items-center gl-justify-content-center"
@click="onClickAction" @click="onClickAction"
> >
<gl-loading-icon v-if="isLoading" class="js-action-icon-loading" /> <gl-loading-icon v-if="isLoading" class="js-action-icon-loading" />
<icon v-else :name="actionIcon" /> <icon v-else :name="actionIcon" />
</gl-deprecated-button> </gl-button>
</template> </template>
...@@ -669,24 +669,14 @@ ...@@ -669,24 +669,14 @@
&.ci-action-icon-wrapper { &.ci-action-icon-wrapper {
height: 30px; height: 30px;
width: 30px; width: 30px;
background: $white;
border: 1px solid $border-color;
border-radius: 100%; border-radius: 100%;
display: block; display: block;
padding: 0;
&:hover { line-height: initial;
background-color: $gray-darker;
border: 1px solid $dropdown-toggle-active-border-color;
svg {
fill: $gl-text-color;
}
}
svg { svg {
fill: $gl-text-color-secondary; fill: $gl-text-color-secondary;
position: relative; vertical-align: initial;
top: -1px;
} }
.spinner { .spinner {
...@@ -695,7 +685,8 @@ ...@@ -695,7 +685,8 @@
&.play { &.play {
svg { svg {
left: 2px; left: 1px;
top: 1px;
} }
} }
} }
...@@ -845,15 +836,12 @@ button.mini-pipeline-graph-dropdown-toggle { ...@@ -845,15 +836,12 @@ button.mini-pipeline-graph-dropdown-toggle {
&.ci-action-icon-wrapper { &.ci-action-icon-wrapper {
height: $ci-action-dropdown-button-size; height: $ci-action-dropdown-button-size;
width: $ci-action-dropdown-button-size; width: $ci-action-dropdown-button-size;
background: $white;
border: 1px solid $border-color;
border-radius: 50%; border-radius: 50%;
display: block; display: block;
&:hover { &:hover {
box-shadow: inset 0 0 0 0.0625rem $dropdown-toggle-active-border-color;
background-color: $gray-darker; background-color: $gray-darker;
border: 1px solid $dropdown-toggle-active-border-color;
svg { svg {
fill: $gl-text-color; fill: $gl-text-color;
...@@ -866,7 +854,7 @@ button.mini-pipeline-graph-dropdown-toggle { ...@@ -866,7 +854,7 @@ button.mini-pipeline-graph-dropdown-toggle {
height: $ci-action-dropdown-svg-size; height: $ci-action-dropdown-svg-size;
fill: $gl-text-color-secondary; fill: $gl-text-color-secondary;
position: relative; position: relative;
top: auto; top: 1px;
vertical-align: initial; vertical-align: initial;
} }
} }
...@@ -874,7 +862,7 @@ button.mini-pipeline-graph-dropdown-toggle { ...@@ -874,7 +862,7 @@ button.mini-pipeline-graph-dropdown-toggle {
// SVGs in the commit widget and mr widget // SVGs in the commit widget and mr widget
a.ci-action-icon-container.ci-action-icon-wrapper svg { a.ci-action-icon-container.ci-action-icon-wrapper svg {
top: 4px; top: 5px;
} }
.scrollable-menu { .scrollable-menu {
......
...@@ -16,5 +16,5 @@ ...@@ -16,5 +16,5 @@
%span.ci-build-text.text-truncate.mw-70p.gl-pl-1-deprecated-no-really-do-not-use-me= subject.name %span.ci-build-text.text-truncate.mw-70p.gl-pl-1-deprecated-no-really-do-not-use-me= subject.name
- if status.has_action? - if status.has_action?
= link_to status.action_path, class: "ci-action-icon-container ci-action-icon-wrapper js-ci-action-icon", method: status.action_method, data: { toggle: 'tooltip', title: status.action_title, container: 'body' } do = link_to status.action_path, class: "gl-button ci-action-icon-container ci-action-icon-wrapper js-ci-action-icon", method: status.action_method, data: { toggle: 'tooltip', title: status.action_title, container: 'body' } do
= sprite_icon(status.action_icon, css_class: "icon-action-#{status.action_icon}") = sprite_icon(status.action_icon, css_class: "icon-action-#{status.action_icon}")
---
title: Replace <gl-deprecated-button> with <gl-button> in app/assets/javascripts/pipelines/components/graph/action_component.vue
merge_request: 38923
author:
type: changed
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import { GlButton } from '@gitlab/ui';
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import waitForPromises from 'helpers/wait_for_promises'; import waitForPromises from 'helpers/wait_for_promises';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
...@@ -7,7 +8,7 @@ import ActionComponent from '~/pipelines/components/graph/action_component.vue'; ...@@ -7,7 +8,7 @@ import ActionComponent from '~/pipelines/components/graph/action_component.vue';
describe('pipeline graph action component', () => { describe('pipeline graph action component', () => {
let wrapper; let wrapper;
let mock; let mock;
const findButton = () => wrapper.find('button'); const findButton = () => wrapper.find(GlButton);
beforeEach(() => { beforeEach(() => {
mock = new MockAdapter(axios); mock = new MockAdapter(axios);
......
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