Commit 35cd92a6 authored by Filipa Lacerda's avatar Filipa Lacerda Committed by Phil Hughes

Adds a tooltip to the branch name

parent aacc6110
<script> <script>
import commitIconSvg from 'icons/_icon_commit.svg'; import commitIconSvg from 'icons/_icon_commit.svg';
import userAvatarLink from './user_avatar/user_avatar_link.vue'; import userAvatarLink from './user_avatar/user_avatar_link.vue';
import tooltip from '../directives/tooltip';
export default { export default {
props: { props: {
...@@ -100,17 +101,22 @@ ...@@ -100,17 +101,22 @@
this.author.username ? `${this.author.username}'s avatar` : null; this.author.username ? `${this.author.username}'s avatar` : null;
}, },
}, },
data() { directives: {
return { commitIconSvg }; tooltip,
}, },
components: { components: {
userAvatarLink, userAvatarLink,
}, },
created() {
this.commitIconSvg = commitIconSvg;
},
}; };
</script> </script>
<template> <template>
<div class="branch-commit"> <div class="branch-commit">
<div v-if="hasCommitRef" class="icon-container hidden-xs"> <div
v-if="hasCommitRef"
class="icon-container hidden-xs">
<i <i
v-if="tag" v-if="tag"
class="fa fa-tag" class="fa fa-tag"
...@@ -126,7 +132,10 @@ ...@@ -126,7 +132,10 @@
<a <a
v-if="hasCommitRef" v-if="hasCommitRef"
class="ref-name hidden-xs" class="ref-name hidden-xs"
:href="commitRef.ref_url"> :href="commitRef.ref_url"
v-tooltip
data-container="body"
:title="commitRef.name">
{{commitRef.name}} {{commitRef.name}}
</a> </a>
...@@ -153,7 +162,8 @@ ...@@ -153,7 +162,8 @@
:img-alt="userImageAltDescription" :img-alt="userImageAltDescription"
:tooltip-text="author.username" :tooltip-text="author.username"
/> />
<a class="commit-row-message" <a
class="commit-row-message"
:href="commitUrl"> :href="commitUrl">
{{title}} {{title}}
</a> </a>
......
---
title: Adds tooltip to the branch name and improves performance
merge_request:
author:
type: fixed
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