gogs icon indicating copy to clipboard operation
gogs copied to clipboard

Render emojis natively

Open unknwon opened this issue 5 years ago • 5 comments

emojify.js is archived and no longer maintained, we should render it natively, possible via https://github.com/kyokomi/emoji.

Would solve #3023.

unknwon avatar Jan 31 '20 13:01 unknwon

https://github.com/enescakir/emoji

unknwon avatar Mar 13 '20 15:03 unknwon

Under Debian GNU/Linux 10 (at least), Emojies are not working properly in Chrome and Chromium if the user uses the OS X emoji picker to insert an emoji into a PR comment.

image

Not sure the extent of this issue as we only started using Gogs today. The OS X one was only showing two black empty boxes prior to installing some additional fonts, but the second typed one in the picture always seems to work. Also, the issue doesn't exist in Firefox.

Is the problem related to this issue, or worth creating a new issue for?

FWIW, I don't have this issue when people use the OS X emoji picker in Slack and other web apps. Thanks.

boltronics avatar May 27 '20 08:05 boltronics

@boltronics thanks for the info! So if I understand correctly, using real images are actually better in your case?

unknwon avatar May 28 '20 05:05 unknwon

@unknwon No problem!

Sorry, so to clarify, this is what I see when I view source of the one that doesn't work properly (the top one added by the OS X emoji picker):

image

And this is the one that's working fine, which I just typed by hand (as I have no emoji picker tool on GNU/Linux set up, so this is what I usually do on GitHub and Slack):

image

To demonstrate on GitHub:

image

becomes (when previewed):

image

and this method works fine in Gogs too.

Then I looked for some emojis that someone would have posted to GitHub from OS X, and found an example:

image

Interestingly, when I view the page source, I see this:

image

I see the emoji in the source fine here, but not in the Gogs example. This leads me to think that maybe the issue is actually related to the way Gogs is saving emoji information in posts? I don't know much about this.

boltronics avatar May 28 '20 07:05 boltronics

@boltronics Thanks, will think about it!

unknwon avatar Jun 11 '20 08:06 unknwon