Commit 9f35bf3a authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'patch-65' into 'master'

Apply tooltip on truncated commit title

See merge request gitlab-org/gitlab-ce!28865
parents e6b3176a 153a9aef
<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