Skip to content
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

[IMPROVE] Upgrade EmojiOne to JoyPixels 4.5.0 #13807

Merged
merged 67 commits into from
May 20, 2019
Merged
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
6d6f22c
Initial commit of EmojiOne 4.5.0
wreiske Mar 20, 2019
0ca4f7a
Removed stylelint check for sprites.css
wreiske Mar 20, 2019
4aa6564
Added "Emoji provided by JoyPixels" attribution to emojipicker
wreiske Mar 20, 2019
502e734
Fixed linting issue on emoji-footer
wreiske Mar 20, 2019
07ccb25
Temp fix for reactions so engelgabriel can test
wreiske Mar 20, 2019
1e6f074
Merge branch 'develop' of https://github.com/RocketChat/Rocket.Chat i…
wreiske Mar 22, 2019
4758361
EmojiOne 24x and 64x sprites
wreiske Mar 22, 2019
e4579cd
stylelint disable for emojione css
wreiske Mar 22, 2019
3cb1e20
fixed style lint issues...
wreiske Mar 22, 2019
f905542
Update reaction.css
wreiske Mar 22, 2019
ac44cf2
Removed commented out code to get ready for merge
wreiske Mar 22, 2019
2f2af2f
Merge branch 'emoji-upgrades' of https://github.com/wreiske/Rocket.Ch…
sampaiodiego Mar 22, 2019
ddce9a6
Merge branch 'develop' of https://github.com/RocketChat/Rocket.Chat i…
wreiske Mar 25, 2019
d93ac8e
Merge branch 'develop' into emoji-upgrades
wreiske Mar 25, 2019
f42ef89
Merge branch 'emoji-upgrades' of https://github.com/wreiske/Rocket.Ch…
wreiske Mar 25, 2019
21f8461
English i18n
wreiske Mar 25, 2019
a8ee935
More i18n for Emoji provided by JoyPixels
wreiske Mar 25, 2019
500c7fc
Added emojione-assets to dev dependencies + npm-postinstall
wreiske Mar 25, 2019
9af8ea5
Merge branch 'develop' into emoji-upgrades
wreiske Mar 25, 2019
5078fd2
Merge branch 'develop' into emoji-upgrades
wreiske Mar 26, 2019
d50774e
Merge branch 'develop' into emoji-upgrades
engelgabriel Apr 6, 2019
7e66981
Merge branch 'develop' into emoji-upgrades
sampaiodiego Apr 6, 2019
ce0d9aa
Merge branch 'emoji-upgrades' of https://github.com/wreiske/Rocket.Ch…
sampaiodiego Apr 6, 2019
a893e3c
Merge branch 'develop' into emoji-upgrades
wreiske Apr 6, 2019
45fc8c1
Finishing touches on emojione!
wreiske Apr 7, 2019
c618b13
Cleaned up the css generation
wreiske Apr 7, 2019
4f4350c
Fixed style lint issues
wreiske Apr 7, 2019
2cfd9aa
Merge branch 'develop' into emoji-upgrades
wreiske Apr 7, 2019
aead6f5
Removed old png sprites
wreiske Apr 7, 2019
592a4e8
Merge branch 'emoji-upgrades' of https://github.com/wreiske/Rocket.Ch…
wreiske Apr 7, 2019
690ad64
Fixed diversity (tones) for emojione
wreiske Apr 7, 2019
7479497
Merge branch 'develop' into emoji-upgrades
wreiske Apr 7, 2019
1fbb11d
EmojiOne is now JoyPixels
wreiske Apr 7, 2019
c4daf6a
Merge branch 'emoji-upgrades' of https://github.com/wreiske/Rocket.Ch…
sampaiodiego Apr 7, 2019
374bfc8
Fix emoji picker category order
sampaiodiego Apr 8, 2019
0d4aaf2
Merge branch 'develop' into emoji-upgrades
sampaiodiego Apr 8, 2019
a0dbdab
Shortened sprite path
wreiske Apr 8, 2019
0151712
Fixed generateEmojiIndex from Diego's changes.
wreiske Apr 8, 2019
42bb86a
Merge branch 'develop' into emoji-upgrades
wreiske Apr 8, 2019
606556c
Merge branch 'develop' into emoji-upgrades
wreiske Apr 9, 2019
e9f83bc
Fixed Performance issues, added scrolling to categories, etc...
wreiske Apr 9, 2019
1edc069
Some cleanup....
wreiske Apr 9, 2019
def38a0
More cleanup...
wreiske Apr 9, 2019
bba4409
UI polish
sampaiodiego Apr 9, 2019
1fe720f
Render picker after getting user's language
sampaiodiego Apr 9, 2019
db49b85
Fix render of emoji render of unicodes
sampaiodiego Apr 9, 2019
09d9f2c
Revert sizes
sampaiodiego Apr 9, 2019
cf2a898
Fix custom emoji and slow emoji picker search
sampaiodiego Apr 9, 2019
df3c608
Respect emoji order
sampaiodiego Apr 9, 2019
05f608b
Remove console.log
sampaiodiego Apr 9, 2019
44c637c
Merge branch 'develop' into wreiske-emoji-upgrades
sampaiodiego Apr 10, 2019
25aefa1
Add some reactivity back
sampaiodiego Apr 10, 2019
b45c676
Merge branch 'develop' into emoji-upgrades
wreiske Apr 10, 2019
9f4c9ac
Merge branch 'develop' into emoji-upgrades
wreiske Apr 16, 2019
dbc86ec
Merge branch 'develop' into emoji-upgrades
wreiske Apr 23, 2019
124a796
Merge branch 'develop' into emoji-upgrades
wreiske Apr 24, 2019
66034d0
Merge branch 'develop' into emoji-upgrades
sampaiodiego Apr 29, 2019
ee1f003
fix import
sampaiodiego Apr 29, 2019
4fcab89
Merge branch 'develop' into wreiske-emoji-upgrades
sampaiodiego May 14, 2019
6144dd1
Update category on scroll
sampaiodiego May 14, 2019
812467b
Add missing emojis
sampaiodiego May 14, 2019
0e3e2b5
Fix initial category
sampaiodiego May 14, 2019
d721598
Update package-lock.json
sampaiodiego May 14, 2019
a37ca9f
Merge branch 'develop' into emoji-upgrades
d-gubert May 15, 2019
a14ef32
Merge branch 'develop' into emoji-upgrades
sampaiodiego May 20, 2019
17cce85
Fix reviews
sampaiodiego May 20, 2019
754e3bd
Merge branch 'develop' into emoji-upgrades
d-gubert May 20, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ accounts-base
accounts-oauth
autoupdate
babel-compiler
emojione:emojione@2.2.6
google-oauth
htmljs
less
Expand Down
1 change: 0 additions & 1 deletion .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ ecmascript-runtime-server@0.7.1
edgee:slingshot@0.7.1
ejson@1.1.0
email@1.2.3
emojione:emojione@2.2.6
es5-shim@4.8.0
facebook-oauth@1.5.0
fastclick@1.0.13
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,9 @@ Thanks to our core team
[Sing Li](https://github.com/Sing-Li),
and to hundreds of awesome [contributors](https://github.com/RocketChat/Rocket.Chat/graphs/contributors).

![Emoji One](https://cloud.githubusercontent.com/assets/1986378/24772858/47290a70-1ae9-11e7-9a5a-2913d0002c94.png)
![JoyPixels](https://i.imgur.com/OrhYvLe.png)

Emoji provided free by [Emoji One](http://emojione.com)
Emoji provided graciously by [JoyPixels](https://www.joypixels.com/)

![BrowserStack](https://cloud.githubusercontent.com/assets/1986378/24772879/57d57b88-1ae9-11e7-98b4-4af824b47933.png)

Expand Down
58 changes: 31 additions & 27 deletions app/emoji-custom/client/lib/emojiCustom.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const deleteEmojiCustom = function(emojiData) {
}
}
}
EmojiPicker.updateRecent();
EmojiPicker.updateRecent('rocket');
};

export const updateEmojiCustom = function(emojiData) {
Expand Down Expand Up @@ -121,41 +121,45 @@ export const updateEmojiCustom = function(emojiData) {
}
}

EmojiPicker.updateRecent();
EmojiPicker.updateRecent('rocket');
};

emoji.packages.emojiCustom = {
emojiCategories: { rocket: 'Custom' },
toneList: {},
list: [],
_regexpSignature: null,
_regexp: null,
const customRender = (html) => {
const emojisMatchGroup = emoji.packages.emojiCustom.list.map(RegExp.escape).join('|');
if (emojisMatchGroup !== emoji.packages.emojiCustom._regexpSignature) {
emoji.packages.emojiCustom._regexpSignature = emojisMatchGroup;
emoji.packages.emojiCustom._regexp = new RegExp(`<object[^>]*>.*?<\/object>|<span[^>]*>.*?<\/span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|(${ emojisMatchGroup })`, 'gi');
}

render(html) {
const emojisMatchGroup = emoji.packages.emojiCustom.list.map(RegExp.escape).join('|');
if (emojisMatchGroup !== emoji.packages.emojiCustom._regexpSignature) {
emoji.packages.emojiCustom._regexpSignature = emojisMatchGroup;
emoji.packages.emojiCustom._regexp = new RegExp(`<object[^>]*>.*?<\/object>|<span[^>]*>.*?<\/span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|(${ emojisMatchGroup })`, 'gi');
html = html.replace(emoji.packages.emojiCustom._regexp, (shortname) => {
if ((typeof shortname === 'undefined') || (shortname === '') || (emoji.packages.emojiCustom.list.indexOf(shortname) === -1)) {
return shortname;
}

html = html.replace(emoji.packages.emojiCustom._regexp, (shortname) => {
if ((typeof shortname === 'undefined') || (shortname === '') || (emoji.packages.emojiCustom.list.indexOf(shortname) === -1)) {
return shortname;
}
let emojiAlias = shortname.replace(/:/g, '');

let dataCheck = emoji.list[shortname];
if (dataCheck.hasOwnProperty('aliasOf')) {
emojiAlias = dataCheck.aliasOf;
dataCheck = emoji.list[`:${ emojiAlias }:`];
}

let emojiAlias = shortname.replace(/:/g, '');
return `<span class="emoji" style="background-image:url(${ getEmojiUrlFromName(emojiAlias, dataCheck.extension) });" data-emoji="${ emojiAlias }" title="${ shortname }">${ shortname }</span>`;
});

let dataCheck = emoji.list[shortname];
if (dataCheck.hasOwnProperty('aliasOf')) {
emojiAlias = dataCheck.aliasOf;
dataCheck = emoji.list[`:${ emojiAlias }:`];
}
return html;
};

return `<span class="emoji" style="background-image:url(${ getEmojiUrlFromName(emojiAlias, dataCheck.extension) });" data-emoji="${ emojiAlias }" title="${ shortname }">${ shortname }</span>`;
});
emoji.packages.emojiCustom = {
emojiCategories: [{ key: 'rocket', i18n: 'Custom' }],
categoryIndex: 1,
toneList: {},
list: [],
_regexpSignature: null,
_regexp: null,

return html;
},
render: customRender,
renderPicker: customRender,
};

Meteor.startup(() =>
Expand Down
8 changes: 2 additions & 6 deletions app/emoji-emojione/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# Updating emojione

## Generate new category map variable for emojipicker
Create a file called `emoji.json` on this directory with the content of the file https://github.com/Ranks/emojione/blob/master/emoji.json

After that, run:
Run
```
node generateEmojiIndex.js
node --experimental-modules generateEmojiIndex.mjs
```

Grab the result and update the file `emojiPicker.js`.

## Generate new percentage sprite
Clone the repository https://github.com/Ranks/emojione/ and replace the file `assets/sprites/emojione.sprites.mustache` with the content
of [emojione.sprites.mustache](emojione.sprites.mustache), then run at `emojione` folder:
Expand Down
Loading