Emojis
GitLab supports native Emojis through the tanuki_emoji
gem.
NOTE:
tanuki_emoji
gem has replaced gemojione
. See more information here.
How to update Emojis
- Update the
tanuki_emoji
gem. - Update
fixtures/emojis/index.json
from Gemojione. In the future, we could grab the file directly from the gem. We should probably make a PR on the Gemojione project to get access to all emojis after being parsed or just a raw path to thejson
file itself. - Ensure
emoji-unicode-version
is up to date with the latest version. - Use the
tanuki_emoji
gem's Rake tasks to update aliases, digests, and sprites:- Run
bundle exec rake tanuki_emoji:aliases
- Run
bundle exec rake tanuki_emoji:digests
- Run
bundle exec rake tanuki_emoji:sprite
- Run
- Ensure new sprite sheets generated for 1x and 2x
app/assets/images/emoji.png
app/assets/images/emoji@2x.png
- Update
fixtures/emojis/intents.json
with any new emoji that we would like to highlight as having positive or negative intent.- Positive intent should be set to
0.5
. - Neutral intent can be set to
1
. This is applied to all emoji automatically so there is no need to set this explicitly. - Negative intent should be set to
1.5
.
- Positive intent should be set to
- Ensure you see new individual images copied into
app/assets/images/emoji/
- Ensure you can see the new emojis and their aliases in the GitLab Flavored Markdown (GLFM) Autocomplete
- Ensure you can see the new emojis and their aliases in the emoji reactions menu
- You might need to add new emoji Unicode support checks and rules for platforms
that do not support a certain emoji and we need to fallback to an image.
See
app/assets/javascripts/emoji/support/is_emoji_unicode_supported.js
andapp/assets/javascripts/emoji/support/unicode_support_map.js