Commit Graph

11 Commits

Author SHA1 Message Date
Phil Hughes 13f7ba059e Removed usage of normilizeEmojiName method
Fixed some Ruby based on feedback
2016-04-22 21:53:26 +01:00
Phil Hughes 319c936055 Fixes issue with emoji comments not showing correct emoji image
Previously it would look for the unicode character inside the award menu. But this menu might not always be there.

Now, the unicode characters are loaded onto the page in an array which the award emoji that looks in to get the correct emoji unicode character

Fixes #15512
2016-04-22 17:01:53 +01:00
Valery Sizov 6ae2680ce7 Emoji categories fix 2016-04-14 20:45:55 +03:00
Yorick Peterse 5830d80b8d Pre-calculate Emoji digests
By pre-calculating the digests we can manually construct the emoji URLs,
removing the need for using Rails' asset URL helpers. The reason we
don't want to use these helpers for Emojis is two-fold:

1. Rails' image_url() method is slow, really slow. For one it _might_
   have to calculate digests but it also performs a lot of other
   intensive operations (judging by the source code and based on
   measuring timings).

2. We have a lot of Emoji which coupled with the above can result in it
   taking minutes to load Emoji autocomplete data.

Using this pre-calculation setup generating the digests takes around 7
seconds (including the time it takes to start Rails/Rake), and only
around 600 milliseconds to load _all_ the autocomplete data of a project
(measured locally).

This commit _does_ change the Emoji URLs from absolute to relative URLs
as these are much easier to generate.

To update the Emoji data simply run:

    rake gemojione:digests

Then commit any changes.

Fixes gitlab-org/gitlab-ce#14009
2016-03-30 19:29:17 +02:00
Valery Sizov b6de0d2830 Emoji picker: better alias handling 2015-12-24 11:28:55 +02:00
Valery Sizov e5eb700d5e emoji picker: minor fixes 2015-12-22 23:12:23 +02:00
Valery Sizov a48dd40a92 base implementation of emoji picker [ci skip] 2015-12-22 23:12:23 +02:00
Valery Sizov 72b7d1f59d emoji aliases problem 2015-12-11 13:17:12 +02:00
Valery Sizov a2912074be satisfy rubocop 2015-11-19 01:31:15 +02:00
Valery Sizov 23df515fd0 Emoji: fix image of emoji when it is submitted via comment 2015-11-19 01:26:00 +02:00
Valery Sizov 2d1fcd802a Emoji: refactoring 2015-11-19 01:25:59 +02:00