Skip to content

Replace emojify.js with openmoji set #9182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sapk opened this issue Nov 27, 2019 · 39 comments · Fixed by #9533 or #11032
Closed

Replace emojify.js with openmoji set #9182

sapk opened this issue Nov 27, 2019 · 39 comments · Fixed by #9533 or #11032
Labels
topic/ui Change the appearance of the Gitea UI type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@sapk
Copy link
Member

sapk commented Nov 27, 2019

emojify.js is not maintained anymore.

At some point we would need to switch to another lib to manage emoji (or maintain a fork).
The lib emojify.js does two think :

  • replace :emoji: with tag
  • provide a set of emoji

I suggest to move to openmoji for the emoji set.

It seems to be a large choice with good quality : https://openmoji.org/library/

@sapk sapk added type/proposal The new feature has not been accepted yet but needs to be discussed first. topic/ui Change the appearance of the Gitea UI labels Nov 27, 2019
@6543
Copy link
Member

6543 commented Nov 27, 2019

Not bad, but we ned to write own code - openmoji is no drop in place solution it is only a colection of emojis

@sapk
Copy link
Member Author

sapk commented Nov 27, 2019

@6543 Yes, that why I distinguish the two roles of emojify.

I wanted to let the first point up to discussion as I don't know if there is a lib that do it. Otherwise, I would plan on forking emojify based on openmoji set + capacity to add specific emoji like the gitea one at "runtime".

@silverwind
Copy link
Member

silverwind commented Nov 27, 2019

I think a custom implementation is the way to go, backed by a minimal name-to-unicode map like https://github.com/muan/emojilib. Most modern browser support unicode emoji so we could get away with just supporting unicode (+custom graphics).

If image fallbacks are still desirable, maybe https://github.com/iamcal/js-emoji.

@silverwind
Copy link
Member

silverwind commented Nov 27, 2019

On a sidenote, emojilib is probably too big to be included:

https://bundlephobia.com/result?p=emojilib@2.4.0

I guess we'd need something more trimmed down with just name to unicode maps without the extra fluff.

@lafriks
Copy link
Member

lafriks commented Nov 27, 2019

I don't think we can use openmoji as it is licensed under cc-by-sa 4.0 that is compatible only with GPLv3 if I understand it correctly :(

@sapk
Copy link
Member Author

sapk commented Nov 27, 2019

@lafriks They mention that it just need a mention somewhere https://github.com/hfg-gmuend/openmoji/blob/master/README.md#attribution-requirements
But I understand that it is not compatible on code-source with MIT but it would be compatible with distributing along. It just don't have to be under the MIT license and in gitea code.

@guillep2k
Copy link
Member

I don't have any opinions about which emoji library to use, but regarding how to implement it, I'd advise against parsing the emoji on the server (when comments are submitted or when the comments are rendered), i.e. I'm in favor of on-the-fly emoji detection that the user can control and nullify (e.g. using backspace). My reasons:

  • I never hit the right name for an emoji except the most basic 😁. Relying on the submitted message to check whether I've typed in the right name will be very frustrating and lead to a lot of editions.
  • The user will have to be extra careful to avoid typing anything that will become an emoji without realizing it. Furthermore, as we won't have control on the actual names for the emojis (they will come from a lib), we'll be hacking awfully to circunvent some annoying case.
  • The escaping to avoid emojization (e.g. \:flags: vs. :flags:) is yet one more syntax to learn and it's not really Markdown. We should support escaping if we force emojization.

@silverwind
Copy link
Member

Another question we have to ask is whether we want to store emoji as unicode in the database. I think GitHub does it that way and it would make data more portable at the expense of requiring the user to have Unicode support in the DB which may not be given on older MySQL installations.

@6543
Copy link
Member

6543 commented Nov 28, 2019

@silverwind I would prevere the :keyword: being stored in the DB as it is now

@sapk
Copy link
Member Author

sapk commented Nov 28, 2019

We could support both if we used the openmoji font (or any other emoji font) and replace in ui :keyword: with unicode. The :keyword: format is also used in commit message generally. This will also assure backward compat. This could also be implemented in the markdown rendering.

@lafriks
Copy link
Member

lafriks commented Dec 31, 2019

Sorry I linked wrong issue

@raucao
Copy link

raucao commented Jan 30, 2020

Just a note: there's also https://twemoji.twitter.com/ which I find much prettier than openmoji. The current emoji set is definitely not very attractive IMO. Would be great to upgrade to a nice new set eventually.

@lafriks
Copy link
Member

lafriks commented Jan 30, 2020

I would actually prefer Google Noto Color Emoji - https://emojipedia.org/google/ https://github.com/googlefonts/noto-emoji
And it's Apache 2.0 licensed

@sapk
Copy link
Member Author

sapk commented Jan 31, 2020

We could maybe use (or develop if not existing) a lib that replace :smile: to the corresponding char when posting. That way the administor can import what emoji font it wants (or use the default OS one).

@silverwind
Copy link
Member

silverwind commented Jan 31, 2020

@sapk I already proposed to use something like https://github.com/muan/emojilib to convert tokens to unicode.

I think we should just use the system-provided emoji font as modern OS come with a emoji font. GitHub for example just uses Apple Color Emoji,Segoe UI Emoji (which may exempt Linux, thought).

@raucao
Copy link

raucao commented Jan 31, 2020

I think we should just use the system-provided emoji font as modern OS come with a emoji font. GitHub for example just uses Apple Color Emoji,Segoe UI Emoji (which may exempt Linux, thought).

Yes, Linux needs a custom font.

@silverwind
Copy link
Member

silverwind commented Jan 31, 2020

It looks like Ubuntu comes with Noto Color Emoji according to this so a font stack of Apple Color Emoji,Segoe UI Emoji,Noto Color Emoji might cover all major platforms.

System fonts are the way to go in my opinion. Loading a custom web font just for emoji would impact performance and I guess users will expected to see the emojis in their platform-native form.

@raucao
Copy link

raucao commented Jan 31, 2020

System fonts are the way to go in my opinion. Loading a custom web font just for emoji would impact performance and I guess users will expected to see the emojis in their platform-native form.

Then why does every major website provide custom fonts? I think there are many cases for a decent fallback, not just Linux that isn't Ubuntu (which, by the way, isn't a vast majority of Linux users either).

@silverwind
Copy link
Member

every major website

I'd strongly doubt that. Github for example does not rely on a single web font for emoji or regular text which is ideal for performance and eliminates issues like FOUT.

@raucao
Copy link

raucao commented Jan 31, 2020

Yes, GitHub is using PNG images instead. I didn't mean that it has to be a webfont, but that you don't want to rely on native emoji fonts only.

@silverwind
Copy link
Member

silverwind commented Feb 1, 2020

GitHub is using PNG

They use Unicode like they should. PNG is only a fallback used on legacy Platforms (I think Windows XP and earlier):

<g-emoji alias="+1" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png" class="emoji mr-1">👍</g-emoji>

I'm thinking we just need a config option like USE_WEBFONTS which would enable webfonts for both text and emojis. When disabled, fall back to a system font stack like this one.

@6543
Copy link
Member

6543 commented Feb 1, 2020

thinking about a implementing a function and register it to the router ...
so you could exec it in the template and it produce an html like @silverwind menitioned?

{{emojihtml $reaction}} -> {{emojihtml +1}} -> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png" class="emoji mr-1">👍</g-emoji> ?

EDIt: o right - this only solve reaction emojis ... but in generel what do you think of an go solution as plugin to goldmark ...?

@silverwind
Copy link
Member

what do you think

If it can be done server-side, that would be ideal. No flashes of wrong content and best performance. I guess you only need a module to map tokens to unicode codepoints.

@6543
Copy link
Member

6543 commented Feb 1, 2020

@6543
Copy link
Member

6543 commented Feb 1, 2020

@silverwind but we cant change all emojis to utf8? -> 🚀 , :gitea:, ...

@silverwind
Copy link
Member

Yeah, custom ones would need a image. Also have to keep in mind that there are places outside of Markdown that have them, so the replacement would need to run at a higher level, maybe as some sort of post-processing step after template rendering.

@raucao
Copy link

raucao commented Feb 1, 2020

They use Unicode like they should. PNG is only a fallback used on legacy Platforms (I think Windows XP and earlier):

I'm on the very latest Arch Linux release with modern GNOME 3, which also has a native emoji font. I'm getting PNG images on GitHub and basically every other major website. And I also find them nicer to look at than my system's own font.

Edit: custom emojis are also a great use case for providing the fallback. Check out e.g. the custom emoji feature in Mastodon to see what I mean. Would be awesome to be able to configure your own additional emojis on every Gitea instance.

@silverwind
Copy link
Member

I think GitHub does User-Agent sniffing for the decision on whether they serve unicode emoji or fallback images. Try changing to a recent Windows/Mac UA and see if you get Unicode.

A major benefit of unicode is that one can copy-paste the text with emojis included (sometimes, they are important to the actual discussion).

@raucao
Copy link

raucao commented Feb 6, 2020

Try changing to a recent Windows/Mac UA and see if you get Unicode.

I do not have any other machine with me (while traveling) that would run those operating systems and I also wouldn't buy a Windows license just to test if GitHub delivers emojis in a different way to Windows users.

@raucao
Copy link

raucao commented Feb 6, 2020

I just checked what Twitter does, and they're using SVG images with the unicode emoji as alt attribute, which I can also copy and paste as unicode emoji.

Example: This tweet contains emoji 🤯 with image https://abs-0.twimg.com/emoji/v2/svg/1f92f.svg

Edit: for inline emojis (as opposed to comment reactions e.g.), GitHub uses a Twemoji webfont.

@sapk
Copy link
Member Author

sapk commented Feb 6, 2020

@silverwind was talking about changing your User-Agent which is a value send by your browser that can be changed to be seen as a different os, browser, architecture, ... and not your computer.

@raucao
Copy link

raucao commented Feb 6, 2020

Ah, stupid me. Didn't have coffee yet. :)

@sapk
Copy link
Member Author

sapk commented Feb 6, 2020

The alt attribute also permit screen reader to understand the emojis.

@raucao
Copy link

raucao commented Feb 6, 2020

Facebook uses PNG images with no alt attribute, but a hidden plaintext fallback:

<span class="_47e3 _5mfr" title="unsure emoticon">
  <img class="img" role="presentation" src="https://static.xx.fbcdn.net/images/emoji.php/v9/t83/1.5/30/1f615.png" alt="" width="30" height="30">
  <span aria-hidden="true" class="_7oe">:/</span>
</span>

Edit: they also use an actual unicode fallback for other emojis, so they're not all the same:

<span style="height: 32px; width: 32px; font-size: 32px;
  background-image: url(https://static.xx.fbcdn.net/images/emoji.php/v9/tf9/1.5/32/2764.png);"
  class="_6qdm">
  ❤️
</span>

@silverwind
Copy link
Member

The alt attribute also permit screen reader

That could be solved by a wrapper tag <span alt="camel">🐪</span>, ideally done in the template code. Thought I guess screen readers ought to have some brains to recognize the code points.

I still think we can do Unicode without fallbacks (except for custom images). Checking http://caniemoji.com/, the only relevant browser targets lost when not serving fallbacks are:

  • Chrome on Windows 8 or earlier
  • Edge on Windows 8 or earlier

@sapk
Copy link
Member Author

sapk commented Feb 6, 2020

From what I know screen reader understand unicode in alt attr (even if it make weird definition/translation) and that why twitter put it there.

@raucao
Copy link

raucao commented Feb 6, 2020

I still think we can do Unicode without fallbacks (except for custom images). Checking http://caniemoji.com/, the only relevant browser targets lost when not serving fallbacks are:

Sure, but at least ship an emoji webfont then, like GitHub does.

@silverwind
Copy link
Member

ship an emoji webfont then, like GitHub

GitHub does not ship any webfonts. Where are you getting this from?

@raucao
Copy link

raucao commented Feb 6, 2020

Ah, sorry. I hadn't inspected it well enough. Mozilla is shipping the Twemoji font with Firefox apparently.

silverwind added a commit to silverwind/gitea that referenced this issue Apr 9, 2020
- remove emojify and replace it with custom name-to-unicode replacement
- move tribute code to own file as it depends on emoji data

This depends on simplemap.json that emojilib publishes which is a 40kB
JSON file containing name-to-unicode mappings. It supports 1571 emoji
compared to the previous 881 of emojify.

Fixes: go-gitea#9182
Fixes: go-gitea#8974
Fixes: go-gitea#8953
silverwind pushed a commit to mrsdizzie/gitea that referenced this issue Apr 13, 2020
This PR replaces all use of emojify.js and adds unicode emoji support to various areas of gitea.

This works in a few ways:

First it adds emoji parsing support into gitea itself. This allows us to

 * Render emojis from valid alias (:smile:)
 * Detect unicode emojis and let us put them in their own class with proper aria-labels and styling
 * Easily allow for custom "emoji"
 * Support all emoji rendering and features without javascript
 * Uses plain unicode and lets the system render in appropriate emoji font
 * Doesn't leave us relying on external sources for updates/fixes/features

That same list of emoji is also used to create a json file which replaces the part of emojify.js that populates the emoji search tribute. This file is about 35KB with GZIP turned on and I've set it to load after the page renders to not hinder page load time (and this removes loading emojify.js also)

For custom "emoji" it uses a pretty simple scheme of just looking for /emojis/img/name.png where name is something a user has put in the "allowed reactions" setting we already have. The gitea reaction that was previously hard coded into a forked copy of emojify.js is included and works as a custom reaction under this method.

The emoji data sourced here is from https://github.com/github/gemoji which is the gem library Github uses for their emoji rendering (and a data source for other sites). So we should be able to easily render any emoji and :alias: that Github can, removing any errors from migrated content. They also update it as well, so we can sync when there are new unicode emoji lists released.

I've included a slimmed down and slightly modified forked copy of https://github.com/knq/emoji to make up our own emoji module. The code is pretty straight forward and again allows us to have a lot of flexibility in what happens.

I had seen a few comments about performance in some of the other threads if we render this ourselves, but there doesn't seem to be any issue here. In a test it can parse, convert, and render 1,000 emojis inside of a large markdown table in about 100ms on my laptop (which is many more emojis than will ever be in any normal issue). This also prevents any flickering and other weirdness from using javascript to render some things while using go for others.

Not included here are image fall back URLS. I don't really think they are necessary for anything new being written in 2020. However, managing the emoji ourselves would allow us to add these as a feature later on if it seems necessary.

Fixes: go-gitea#9182
Fixes: go-gitea#8974
Fixes: go-gitea#8953
Fixes: go-gitea#6628
Fixes: go-gitea#5130
silverwind pushed a commit to mrsdizzie/gitea that referenced this issue Apr 18, 2020
This PR replaces all use of emojify.js and adds unicode emoji support to various areas of gitea.

This works in a few ways:

First it adds emoji parsing support into gitea itself. This allows us to

 * Render emojis from valid alias (:smile:)
 * Detect unicode emojis and let us put them in their own class with proper aria-labels and styling
 * Easily allow for custom "emoji"
 * Support all emoji rendering and features without javascript
 * Uses plain unicode and lets the system render in appropriate emoji font
 * Doesn't leave us relying on external sources for updates/fixes/features

That same list of emoji is also used to create a json file which replaces the part of emojify.js that populates the emoji search tribute. This file is about 35KB with GZIP turned on and I've set it to load after the page renders to not hinder page load time (and this removes loading emojify.js also)

For custom "emoji" it uses a pretty simple scheme of just looking for /emojis/img/name.png where name is something a user has put in the "allowed reactions" setting we already have. The gitea reaction that was previously hard coded into a forked copy of emojify.js is included and works as a custom reaction under this method.

The emoji data sourced here is from https://github.com/github/gemoji which is the gem library Github uses for their emoji rendering (and a data source for other sites). So we should be able to easily render any emoji and :alias: that Github can, removing any errors from migrated content. They also update it as well, so we can sync when there are new unicode emoji lists released.

I've included a slimmed down and slightly modified forked copy of https://github.com/knq/emoji to make up our own emoji module. The code is pretty straight forward and again allows us to have a lot of flexibility in what happens.

I had seen a few comments about performance in some of the other threads if we render this ourselves, but there doesn't seem to be any issue here. In a test it can parse, convert, and render 1,000 emojis inside of a large markdown table in about 100ms on my laptop (which is many more emojis than will ever be in any normal issue). This also prevents any flickering and other weirdness from using javascript to render some things while using go for others.

Not included here are image fall back URLS. I don't really think they are necessary for anything new being written in 2020. However, managing the emoji ourselves would allow us to add these as a feature later on if it seems necessary.

Fixes: go-gitea#9182
Fixes: go-gitea#8974
Fixes: go-gitea#8953
Fixes: go-gitea#6628
Fixes: go-gitea#5130
mrsdizzie added a commit to mrsdizzie/gitea that referenced this issue Apr 21, 2020
This PR replaces all use of emojify.js and adds unicode emoji support to various areas of gitea.

This works in a few ways:

First it adds emoji parsing support into gitea itself. This allows us to

 * Render emojis from valid alias (:smile:)
 * Detect unicode emojis and let us put them in their own class with proper aria-labels and styling
 * Easily allow for custom "emoji"
 * Support all emoji rendering and features without javascript
 * Uses plain unicode and lets the system render in appropriate emoji font
 * Doesn't leave us relying on external sources for updates/fixes/features

That same list of emoji is also used to create a json file which replaces the part of emojify.js that populates the emoji search tribute. This file is about 35KB with GZIP turned on and I've set it to load after the page renders to not hinder page load time (and this removes loading emojify.js also)

For custom "emoji" it uses a pretty simple scheme of just looking for /emojis/img/name.png where name is something a user has put in the "allowed reactions" setting we already have. The gitea reaction that was previously hard coded into a forked copy of emojify.js is included and works as a custom reaction under this method.

The emoji data sourced here is from https://github.com/github/gemoji which is the gem library Github uses for their emoji rendering (and a data source for other sites). So we should be able to easily render any emoji and :alias: that Github can, removing any errors from migrated content. They also update it as well, so we can sync when there are new unicode emoji lists released.

I've included a slimmed down and slightly modified forked copy of https://github.com/knq/emoji to make up our own emoji module. The code is pretty straight forward and again allows us to have a lot of flexibility in what happens.

I had seen a few comments about performance in some of the other threads if we render this ourselves, but there doesn't seem to be any issue here. In a test it can parse, convert, and render 1,000 emojis inside of a large markdown table in about 100ms on my laptop (which is many more emojis than will ever be in any normal issue). This also prevents any flickering and other weirdness from using javascript to render some things while using go for others.

Not included here are image fall back URLS. I don't really think they are necessary for anything new being written in 2020. However, managing the emoji ourselves would allow us to add these as a feature later on if it seems necessary.

Fixes: go-gitea#9182
Fixes: go-gitea#8974
Fixes: go-gitea#8953
Fixes: go-gitea#6628
Fixes: go-gitea#5130
guillep2k added a commit that referenced this issue Apr 28, 2020
* Support unicode emojis and remove emojify.js

This PR replaces all use of emojify.js and adds unicode emoji support to various areas of gitea.

This works in a few ways:

First it adds emoji parsing support into gitea itself. This allows us to

 * Render emojis from valid alias (:smile:)
 * Detect unicode emojis and let us put them in their own class with proper aria-labels and styling
 * Easily allow for custom "emoji"
 * Support all emoji rendering and features without javascript
 * Uses plain unicode and lets the system render in appropriate emoji font
 * Doesn't leave us relying on external sources for updates/fixes/features

That same list of emoji is also used to create a json file which replaces the part of emojify.js that populates the emoji search tribute. This file is about 35KB with GZIP turned on and I've set it to load after the page renders to not hinder page load time (and this removes loading emojify.js also)

For custom "emoji" it uses a pretty simple scheme of just looking for /emojis/img/name.png where name is something a user has put in the "allowed reactions" setting we already have. The gitea reaction that was previously hard coded into a forked copy of emojify.js is included and works as a custom reaction under this method.

The emoji data sourced here is from https://github.com/github/gemoji which is the gem library Github uses for their emoji rendering (and a data source for other sites). So we should be able to easily render any emoji and :alias: that Github can, removing any errors from migrated content. They also update it as well, so we can sync when there are new unicode emoji lists released.

I've included a slimmed down and slightly modified forked copy of https://github.com/knq/emoji to make up our own emoji module. The code is pretty straight forward and again allows us to have a lot of flexibility in what happens.

I had seen a few comments about performance in some of the other threads if we render this ourselves, but there doesn't seem to be any issue here. In a test it can parse, convert, and render 1,000 emojis inside of a large markdown table in about 100ms on my laptop (which is many more emojis than will ever be in any normal issue). This also prevents any flickering and other weirdness from using javascript to render some things while using go for others.

Not included here are image fall back URLS. I don't really think they are necessary for anything new being written in 2020. However, managing the emoji ourselves would allow us to add these as a feature later on if it seems necessary.

Fixes: #9182
Fixes: #8974
Fixes: #8953
Fixes: #6628
Fixes: #5130

* add new shared function emojiHTML

* don't increase emoji size in issue title

* Update templates/repo/issue/view_content/add_reaction.tmpl

Co-Authored-By: 6543 <6543@obermui.de>

* Support for emoji rendering in various templates

* Render code and review comments as they should be

* Better way to handle mail subjects

* insert unicode from tribute selection

* Add template helper for plain text when needed

* Use existing replace function I forgot about

* Don't include emoji greater than Unicode Version 12

Only include emoji and aliases in JSON

* Update build/generate-emoji.go

* Tweak regex slightly to really match everything including random invisible characters. Run tests for every emoji we have

* final updates

* code review

* code review

* hard code gitea custom emoji to match previous behavior

* Update .eslintrc

Co-Authored-By: silverwind <me@silverwind.io>

* disable preempt

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
ydelafollye pushed a commit to ydelafollye/gitea that referenced this issue Jul 31, 2020
* Support unicode emojis and remove emojify.js

This PR replaces all use of emojify.js and adds unicode emoji support to various areas of gitea.

This works in a few ways:

First it adds emoji parsing support into gitea itself. This allows us to

 * Render emojis from valid alias (:smile:)
 * Detect unicode emojis and let us put them in their own class with proper aria-labels and styling
 * Easily allow for custom "emoji"
 * Support all emoji rendering and features without javascript
 * Uses plain unicode and lets the system render in appropriate emoji font
 * Doesn't leave us relying on external sources for updates/fixes/features

That same list of emoji is also used to create a json file which replaces the part of emojify.js that populates the emoji search tribute. This file is about 35KB with GZIP turned on and I've set it to load after the page renders to not hinder page load time (and this removes loading emojify.js also)

For custom "emoji" it uses a pretty simple scheme of just looking for /emojis/img/name.png where name is something a user has put in the "allowed reactions" setting we already have. The gitea reaction that was previously hard coded into a forked copy of emojify.js is included and works as a custom reaction under this method.

The emoji data sourced here is from https://github.com/github/gemoji which is the gem library Github uses for their emoji rendering (and a data source for other sites). So we should be able to easily render any emoji and :alias: that Github can, removing any errors from migrated content. They also update it as well, so we can sync when there are new unicode emoji lists released.

I've included a slimmed down and slightly modified forked copy of https://github.com/knq/emoji to make up our own emoji module. The code is pretty straight forward and again allows us to have a lot of flexibility in what happens.

I had seen a few comments about performance in some of the other threads if we render this ourselves, but there doesn't seem to be any issue here. In a test it can parse, convert, and render 1,000 emojis inside of a large markdown table in about 100ms on my laptop (which is many more emojis than will ever be in any normal issue). This also prevents any flickering and other weirdness from using javascript to render some things while using go for others.

Not included here are image fall back URLS. I don't really think they are necessary for anything new being written in 2020. However, managing the emoji ourselves would allow us to add these as a feature later on if it seems necessary.

Fixes: go-gitea#9182
Fixes: go-gitea#8974
Fixes: go-gitea#8953
Fixes: go-gitea#6628
Fixes: go-gitea#5130

* add new shared function emojiHTML

* don't increase emoji size in issue title

* Update templates/repo/issue/view_content/add_reaction.tmpl

Co-Authored-By: 6543 <6543@obermui.de>

* Support for emoji rendering in various templates

* Render code and review comments as they should be

* Better way to handle mail subjects

* insert unicode from tribute selection

* Add template helper for plain text when needed

* Use existing replace function I forgot about

* Don't include emoji greater than Unicode Version 12

Only include emoji and aliases in JSON

* Update build/generate-emoji.go

* Tweak regex slightly to really match everything including random invisible characters. Run tests for every emoji we have

* final updates

* code review

* code review

* hard code gitea custom emoji to match previous behavior

* Update .eslintrc

Co-Authored-By: silverwind <me@silverwind.io>

* disable preempt

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
6 participants