Skip to content

Conversation

@silverwind
Copy link
Member

  • 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.

Before:
image
image
image

After:
image
image
image

Fixes: #9182
Fixes: #8974
Fixes: #8953

- 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
@mrsdizzie
Copy link
Member

👀 did we just write and submit the same pr?!?

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 9, 2020
@silverwind
Copy link
Member Author

silverwind commented Apr 9, 2020

BTW for anyone wondering why the drometary turned a camel in those screenshots. From the data, which also matches GitHub's behaviour, meaning previous :camel: was incorrect:

  "dromedary_camel": "🐪",
  "camel": "🐫",

@silverwind
Copy link
Member Author

@mrsdizzie oh damn 🤣

@mrsdizzie
Copy link
Member

Let me know if you want to collaborate or what you think -- I kind of like doing it in go better but would love opinions from anybody who has spent time with emojis recently

@silverwind
Copy link
Member Author

silverwind commented Apr 9, 2020

@mrsdizzie so your approach does it on the backend rendering? I think that's generally the better approach of the two because JS replacement always sucks because of wrong content flashes. I will investigate your PR.

@silverwind
Copy link
Member Author

Closing for #11032. Will repurpose some code from here there.

@silverwind silverwind closed this Apr 9, 2020
@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

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace emojify.js with openmoji set [UI] emoji.js ToDo List [BUG] [UI] emoji dont work in markdown list

3 participants