Merge branch 'emoji-button-titles' into 'master'
Added emoji description title to award emoji buttons Closes #29971 See merge request !10881
This commit is contained in:
commit
cac04fbd77
6 changed files with 1799 additions and 2 deletions
|
@ -62,6 +62,7 @@ function glEmojiTag(inputName, options) {
|
|||
data-fallback-src="${fallbackImageSrc}"
|
||||
${fallbackSpriteAttribute}
|
||||
data-unicode-version="${emojiInfo.unicodeVersion}"
|
||||
title="${emojiInfo.description}"
|
||||
>
|
||||
${contents}
|
||||
</gl-emoji>
|
||||
|
|
4
changelogs/unreleased/emoji-button-titles.yml
Normal file
4
changelogs/unreleased/emoji-button-titles.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Added title to award emoji buttons
|
||||
merge_request:
|
||||
author:
|
File diff suppressed because it is too large
Load diff
|
@ -54,7 +54,7 @@ module Gitlab
|
|||
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
|
||||
|
|
|
@ -19,6 +19,7 @@ namespace :gemojione do
|
|||
entry = {
|
||||
category: emoji_hash['category'],
|
||||
moji: emoji_hash['moji'],
|
||||
description: emoji_hash['description'],
|
||||
unicodeVersion: Gitlab::Emoji.emoji_unicode_version(name),
|
||||
digest: hash_digest,
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ describe MarkupHelper do
|
|||
it 'replaces commit message with emoji to link' do
|
||||
actual = link_to_gfm(':book: Book', '/foo')
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue