Fix #4149, fix #1199 - Store emojis as unicode#4189
Conversation
413e2e5 to
d755f49
Compare
app/javascript/mastodon/emoji.js
Outdated
| @@ -11,31 +11,13 @@ function emojify(str) { | |||
| // The goal is to be the same as an emojione.regShortNames/regUnicode replacement, but faster. | |||
There was a problem hiding this comment.
The description is outdated.
|
I'm wondering, shouldn't we make the emoji picker insert unicode instead of shortcodes? I'm looking into tree shaking EmojiOne and if we take out the shortcode substitution in the compose form (which basically pull in the entire list of shortcodes), we can shrink it by ~90% (from |
@sorin-davidoi I did that in this PR. So the emoji picker inserts unicode, but if you type out the shortcode, it also gets converted to unicode server-side. |
|
Ah, missed that! Awesome, will follow this with the tree shaking! |
d755f49 to
555a43e
Compare
|
After this change, remote contents and also existing local contents which contains |
really old mastodon WebUI converts :shortcode: to Unicode emoji (but actually rendered by emojione), but this behaviour is removed in Mastodon 1.5.0rc1 (mastodon/mastodon#4189 that is 4 years ago omg), so we don't need compatible with this behaviour anymore. also this old-style emojify is only called in some minor points in now and not called in important point (like posts text), so users can't feel this change without notice.
Reference: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10647