summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-11-15 18:08:25 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-11-15 18:08:25 +0000
commit0f5faea404ab514917adf06768f1a0991482b5b5 (patch)
tree6d90e4791404fda0cf1b44732eed45d0f00b6bdc /doc
parent69953fae36560773a06bbc426747e3dac6aa1ae1 (diff)
parentce1a1aa1f67d0438fd534920c9aef4e068ea4ddd (diff)
downloadgitlab-ce-0f5faea404ab514917adf06768f1a0991482b5b5.tar.gz
Merge branch 'update-emoji-digests-with-latest-from-gemojione' into 'master'
Update Emoji digests and assets with latest from Gemojione v3.3.0 Closes #32634 See merge request gitlab-org/gitlab-ce!15390
Diffstat (limited to 'doc')
-rw-r--r--doc/development/README.md1
-rw-r--r--doc/development/fe_guide/emojis.md27
-rw-r--r--doc/development/rake_tasks.md10
3 files changed, 38 insertions, 0 deletions
diff --git a/doc/development/README.md b/doc/development/README.md
index 5690ae68e00..9b43170236f 100644
--- a/doc/development/README.md
+++ b/doc/development/README.md
@@ -22,6 +22,7 @@ comments: false
- [UX guide](ux_guide/index.md) for building GitLab with existing CSS styles and elements
- [Frontend guidelines](fe_guide/index.md)
+- [Emoji guide](fe_guide/emojis.md)
## Backend guides
diff --git a/doc/development/fe_guide/emojis.md b/doc/development/fe_guide/emojis.md
new file mode 100644
index 00000000000..38794c47965
--- /dev/null
+++ b/doc/development/fe_guide/emojis.md
@@ -0,0 +1,27 @@
+# Emojis
+
+GitLab supports native unicode emojis and fallsback to image-based emojis selectively
+when your platform does not support it.
+
+# How to update Emojis
+
+ 1. Update the `gemojione` gem
+ 1. Update `fixtures/emojis/index.json` from [Gemojione](https://github.com/jonathanwiesel/gemojione/blob/master/config/index.json).
+ 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 the `json` file itself.
+ 1. Ensure [`emoji-unicode-version`](https://www.npmjs.com/package/emoji-unicode-version)
+ is up to date with the latest version.
+ 1. Run `bundle exec rake gemojione:aliases`
+ 1. Run `bundle exec rake gemojione:digests`
+ 1. Run `bundle exec rake gemojione:sprite`
+ 1. Ensure new sprite sheets generated for 1x and 2x
+ - `app/assets/images/emoji.png`
+ - `app/assets/images/emoji@2x.png`
+ 1. Ensure you see new individual images copied into `app/assets/images/emoji/`
+ 1. Ensure you can see the new emojis and their aliases in the GFM Autocomplete
+ 1. Ensure you can see the new emojis and their aliases in the award emoji menu
+ 1. 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`
+ and `app/assets/javascripts/emoji/support/unicode_support_map.js`
diff --git a/doc/development/rake_tasks.md b/doc/development/rake_tasks.md
index bfd80aab6a4..4773b6773e8 100644
--- a/doc/development/rake_tasks.md
+++ b/doc/development/rake_tasks.md
@@ -122,6 +122,15 @@ they can be easily inspected.
bundle exec rake services:doc
```
+## Updating Emoji Aliases
+
+To update the Emoji aliases file (used for Emoji autocomplete) you must run the
+following:
+
+```
+bundle exec rake gemojione:aliases
+```
+
## Updating Emoji Digests
To update the Emoji digests file (used for Emoji autocomplete) you must run the
@@ -131,6 +140,7 @@ following:
bundle exec rake gemojione:digests
```
+
This will update the file `fixtures/emojis/digests.json` based on the currently
available Emoji.