Commit cac04fbd authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'emoji-button-titles' into 'master'

Added emoji description title to award emoji buttons

Closes #29971

See merge request !10881
parents 50f5f4e4 a7a3c48b
...@@ -62,6 +62,7 @@ function glEmojiTag(inputName, options) { ...@@ -62,6 +62,7 @@ function glEmojiTag(inputName, options) {
data-fallback-src="${fallbackImageSrc}" data-fallback-src="${fallbackImageSrc}"
${fallbackSpriteAttribute} ${fallbackSpriteAttribute}
data-unicode-version="${emojiInfo.unicodeVersion}" data-unicode-version="${emojiInfo.unicodeVersion}"
title="${emojiInfo.description}"
> >
${contents} ${contents}
</gl-emoji> </gl-emoji>
......
---
title: Added title to award emoji buttons
merge_request:
author:
This diff is collapsed.
...@@ -54,7 +54,7 @@ module Gitlab ...@@ -54,7 +54,7 @@ module Gitlab
unicode_version: emoji_unicode_version(emoji_name) unicode_version: emoji_unicode_version(emoji_name)
} }
ActionController::Base.helpers.content_tag('gl-emoji', emoji_info['moji'], data: data) ActionController::Base.helpers.content_tag('gl-emoji', emoji_info['moji'], title: emoji_info['description'], data: data)
end end
end end
end end
...@@ -19,6 +19,7 @@ namespace :gemojione do ...@@ -19,6 +19,7 @@ namespace :gemojione do
entry = { entry = {
category: emoji_hash['category'], category: emoji_hash['category'],
moji: emoji_hash['moji'], moji: emoji_hash['moji'],
description: emoji_hash['description'],
unicodeVersion: Gitlab::Emoji.emoji_unicode_version(name), unicodeVersion: Gitlab::Emoji.emoji_unicode_version(name),
digest: hash_digest, digest: hash_digest,
} }
......
...@@ -111,7 +111,7 @@ describe MarkupHelper do ...@@ -111,7 +111,7 @@ describe MarkupHelper do
it 'replaces commit message with emoji to link' do it 'replaces commit message with emoji to link' do
actual = link_to_gfm(':book: Book', '/foo') actual = link_to_gfm(':book: Book', '/foo')
expect(actual). expect(actual).
to eq '<gl-emoji data-name="book" data-unicode-version="6.0">📖</gl-emoji><a href="/foo"> Book</a>' to eq '<gl-emoji title="open book" data-name="book" data-unicode-version="6.0">📖</gl-emoji><a href="/foo"> Book</a>'
end end
end end
......
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