Commit 153a9aef authored by Timofey Trofimov's avatar Timofey Trofimov Committed by Kushal Pandya

Apply tooltip on truncated commit title

parent e6b3176a
<script> <script>
import _ from 'underscore'; import _ from 'underscore';
import { GlTooltipDirective, GlLink } from '@gitlab/ui'; import { GlTooltipDirective, GlLink } from '@gitlab/ui';
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.vue';
import UserAvatarLink from './user_avatar/user_avatar_link.vue'; import UserAvatarLink from './user_avatar/user_avatar_link.vue';
import Icon from '../../vue_shared/components/icon.vue'; import Icon from '../../vue_shared/components/icon.vue';
...@@ -12,6 +13,7 @@ export default { ...@@ -12,6 +13,7 @@ export default {
UserAvatarLink, UserAvatarLink,
Icon, Icon,
GlLink, GlLink,
TooltipOnTruncate,
}, },
props: { props: {
/** /**
...@@ -165,7 +167,7 @@ export default { ...@@ -165,7 +167,7 @@ export default {
<gl-link :href="commitUrl" class="commit-sha mr-0"> {{ shortSha }} </gl-link> <gl-link :href="commitUrl" class="commit-sha mr-0"> {{ shortSha }} </gl-link>
<div class="commit-title flex-truncate-parent"> <div class="commit-title flex-truncate-parent">
<span v-if="title" class="flex-truncate-child"> <tooltip-on-truncate v-if="title" class="flex-truncate-child" :title="title">
<user-avatar-link <user-avatar-link
v-if="hasAuthor" v-if="hasAuthor"
:link-href="author.path" :link-href="author.path"
...@@ -174,8 +176,10 @@ export default { ...@@ -174,8 +176,10 @@ export default {
:tooltip-text="author.username" :tooltip-text="author.username"
class="avatar-image-container" class="avatar-image-container"
/> />
<gl-link :href="commitUrl" class="commit-row-message cgray"> {{ title }} </gl-link> <gl-link :href="commitUrl" class="commit-row-message cgray">
</span> {{ title }}
</gl-link>
</tooltip-on-truncate>
<span v-else> Can't find HEAD commit for this branch </span> <span v-else> Can't find HEAD commit for this branch </span>
</div> </div>
</div> </div>
......
---
title: Show tooltip on truncated commit title
merge_request: 28865
author: Timofey Trofimov
type: other
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