Emoji: Eliminate unused images, make sure panel clicks add emoji (#1849)

* Emoji: Ensure that all clicks work by using emoji data directly

* Eliminate a number of unused emoji images from final build

* Re-add the generic sheets directory, which we partially filter
This commit is contained in:
Scott Nonnenberg 2017-12-04 10:19:35 -08:00 committed by GitHub
parent 9c7ba87d6a
commit 2430ee00d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 3 deletions

View File

@ -974,7 +974,7 @@
this.updateMessageFieldSize({});
},
insertEmoji: function(e) {
var colons = ':' + emoji.data[e.unified.toLowerCase()][3][0] + ':';
var colons = ':' + emojiData[e.index].short_name + ':';
var textarea = this.$messageField[0];
if (textarea.selectionStart || textarea.selectionStart == '0') {

View File

@ -137,6 +137,9 @@
"fonts/*",
"build/assets",
"node_modules/**",
"!node_modules/emoji-datasource/*.png",
"!node_modules/emoji-datasource-apple/img/apple/{sheets-128,sheets-256}/*.png",
"!node_modules/emoji-datasource-apple/img/apple/sheets/{16,20,32}.png",
"!node_modules/spellchecker/vendor/hunspell/**/*",
"!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme,test,__tests__,tests,powered-test,example,examples,*.d.ts}",
"!**/node_modules/.bin",

View File

@ -53,6 +53,7 @@
}, 1000);
window.EmojiConvertor = require('emoji-js');
window.emojiData = require('emoji-datasource');
window.nodeFetch = require('node-fetch');
window.httpsAgent = require('https').Agent;
window.nodeBuffer = Buffer;

View File

@ -112,7 +112,7 @@ button.emoji {
.emoji-panel-container {
height: 0px;
.ep-e {
background-image: url('../node_modules/emoji-datasource/sheet_apple_64.png');
background-image: url('../node_modules/emoji-datasource-apple/img/apple/sheets/64.png');
background-size: 1734px;
}
.ep-slide {

View File

@ -5688,7 +5688,7 @@ button.emoji {
.emoji-panel-container {
height: 0px; }
.emoji-panel-container .ep-e {
background-image: url("../node_modules/emoji-datasource/sheet_apple_64.png");
background-image: url("../node_modules/emoji-datasource-apple/img/apple/sheets/64.png");
background-size: 1734px; }
.emoji-panel-container .ep-slide {
background-color: #2090ea; }