Commit 6e24d965 authored by Tim Zallmann's avatar Tim Zallmann

Merge branch '5538-svg' into 'master'

Resolve "Use `long-arrow` icon in downstream pipeline instead of importing the svg into the vue component"

Closes #5538

See merge request gitlab-org/gitlab-ee!6132
parents 0e4ee261 1624d75e
<script> <script>
import arrowSvg from 'ee_icons/_arrow_mini_pipeline_graph.svg';
import icon from '~/vue_shared/components/icon.vue'; import icon from '~/vue_shared/components/icon.vue';
import ciStatus from '~/vue_shared/components/ci_icon.vue'; import ciStatus from '~/vue_shared/components/ci_icon.vue';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
...@@ -31,7 +30,6 @@ ...@@ -31,7 +30,6 @@
}, },
data() { data() {
return { return {
arrowSvg,
maxRenderedPipelines: 3, maxRenderedPipelines: 3,
}; };
}, },
...@@ -88,13 +86,11 @@ ...@@ -88,13 +86,11 @@
class="linked-pipeline-mini-list" class="linked-pipeline-mini-list"
> >
<span <icon
v-if="isDownstream" v-if="isDownstream"
class="arrow-icon" class="arrow-icon"
aria-hidden="true" name="long-arrow"
v-html="arrowSvg" />
>
</span>
<a <a
v-tooltip v-tooltip
...@@ -124,12 +120,10 @@ ...@@ -124,12 +120,10 @@
{{ counterLabel }} {{ counterLabel }}
</a> </a>
<span <icon
v-if="isUpstream" v-if="isUpstream"
class="arrow-icon" class="arrow-icon"
aria-hidden="true" name="long-arrow"
v-html="arrowSvg" />
>
</span>
</span> </span>
</template> </template>
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
svg { svg {
fill: $border-color; fill: $border-color;
position: relative;
top: 4px;
left: -1px;
} }
} }
......
<svg width="16" height="8" viewBox="0 0 16 8" xmlns="http://www.w3.org/2000/svg"><path d="M10 3H0v2h10v3l5.549-3.7c.251-.167.25-.435 0-.6L10 0v3z" fill-rule="nonzero"/></svg>
...@@ -36,7 +36,7 @@ describe('Linked pipeline mini list', function() { ...@@ -36,7 +36,7 @@ describe('Linked pipeline mini list', function() {
it('should render an arrow icon', () => { it('should render an arrow icon', () => {
const iconElement = this.component.$el.querySelector('.arrow-icon'); const iconElement = this.component.$el.querySelector('.arrow-icon');
expect(iconElement).not.toBeNull(); expect(iconElement).not.toBeNull();
expect(iconElement.innerHTML).toContain('<svg'); expect(iconElement.innerHTML).toContain('long-arrow');
}); });
it('should have an activated tooltip', () => { it('should have an activated tooltip', () => {
...@@ -88,7 +88,7 @@ describe('Linked pipeline mini list', function() { ...@@ -88,7 +88,7 @@ describe('Linked pipeline mini list', function() {
it('should render an arrow icon', () => { it('should render an arrow icon', () => {
const iconElement = this.component.$el.querySelector('.arrow-icon'); const iconElement = this.component.$el.querySelector('.arrow-icon');
expect(iconElement).not.toBeNull(); expect(iconElement).not.toBeNull();
expect(iconElement.innerHTML).toContain('<svg'); expect(iconElement.innerHTML).toContain('long-arrow');
}); });
it('should have prepped tooltips', () => { it('should have prepped tooltips', () => {
......
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