diff options
author | Timofey Trofimov <tumoxep@gmail.com> | 2019-06-12 06:50:05 +0000 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-06-12 06:50:05 +0000 |
commit | 153a9aef8b80364714bd13660e59bb1bb8c2a051 (patch) | |
tree | ba2cb4ee7a5cf1a72c69e1c3b00151f231729a7b | |
parent | e6b3176a906b46c47806869b2260f7c28245b35f (diff) | |
download | gitlab-ce-153a9aef8b80364714bd13660e59bb1bb8c2a051.tar.gz |
Apply tooltip on truncated commit title
-rw-r--r-- | app/assets/javascripts/vue_shared/components/commit.vue | 10 | ||||
-rw-r--r-- | changelogs/unreleased/patch-65.yml | 5 |
2 files changed, 12 insertions, 3 deletions
diff --git a/app/assets/javascripts/vue_shared/components/commit.vue b/app/assets/javascripts/vue_shared/components/commit.vue index 3ba946e6447..a1168fa0f1e 100644 --- a/app/assets/javascripts/vue_shared/components/commit.vue +++ b/app/assets/javascripts/vue_shared/components/commit.vue @@ -1,6 +1,7 @@ <script> import _ from 'underscore'; 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 Icon from '../../vue_shared/components/icon.vue'; @@ -12,6 +13,7 @@ export default { UserAvatarLink, Icon, GlLink, + TooltipOnTruncate, }, props: { /** @@ -165,7 +167,7 @@ export default { <gl-link :href="commitUrl" class="commit-sha mr-0"> {{ shortSha }} </gl-link> <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 v-if="hasAuthor" :link-href="author.path" @@ -174,8 +176,10 @@ export default { :tooltip-text="author.username" class="avatar-image-container" /> - <gl-link :href="commitUrl" class="commit-row-message cgray"> {{ title }} </gl-link> - </span> + <gl-link :href="commitUrl" class="commit-row-message cgray"> + {{ title }} + </gl-link> + </tooltip-on-truncate> <span v-else> Can't find HEAD commit for this branch </span> </div> </div> diff --git a/changelogs/unreleased/patch-65.yml b/changelogs/unreleased/patch-65.yml new file mode 100644 index 00000000000..9ce628a6541 --- /dev/null +++ b/changelogs/unreleased/patch-65.yml @@ -0,0 +1,5 @@ +--- +title: Show tooltip on truncated commit title +merge_request: 28865 +author: Timofey Trofimov +type: other |