-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Added frequently used emojis support #6498
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
Conversation
…requent-used-emojis
@stitesExpensify While my work is done, I've got a regression from the existing |
@stitesExpensify I've fixed the above padding issue with a small fix in |
@mananjadhav #6523 has fixed the padding issue so if this commit is no longer necessary please remove it |
@Jag96 yeah it won't be needed I'll take the latest pull of main and remove my commit. |
Commit removed and PR updated. @stitesExpensify Any updates for me on this one? |
@stitesExpensify is OOO, assigning pullerbear to get another reviewer on this one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well! A few requests, will let @stitesExpensify do a final review when he's back from OOO
src/libs/EmojiUtils.js
Outdated
@@ -67,9 +70,97 @@ function isSingleEmoji(message) { | |||
return matchedUnicode === currentMessageUnicode; | |||
} | |||
|
|||
/** | |||
* Get the header indices based on the max emojis per row | |||
* @param {Array} emojis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you specify the array type here? For example {Object[]}
or {String[]}
. Same for other usages of {Array}
src/ONYXKEYS.js
Outdated
@@ -133,6 +133,9 @@ export default { | |||
// Store preferred skintone for emoji | |||
PREFERRED_EMOJI_SKIN_TONE: 'preferredEmojiSkinTone', | |||
|
|||
// Store frequently used emojis user wise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nab - Store frequently used emojis for this user
src/libs/EmojiUtils.js
Outdated
import CONST from '../CONST'; | ||
import * as UserActions from './actions/User'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update UserActions
to User
to keep consistency with other usages
src/libs/EmojiUtils.js
Outdated
} | ||
|
||
/** | ||
* Get a merged array if frequently used emojis exist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of
instead of if
@Jag96 PR updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one missed usage, otherwise LGTM
src/libs/actions/User.js
Outdated
@@ -317,6 +321,15 @@ function setPreferredSkinTone(skinTone) { | |||
return NameValuePair.set(CONST.NVP.PREFERRED_EMOJI_SKIN_TONE, skinTone, ONYXKEYS.PREFERRED_EMOJI_SKIN_TONE); | |||
} | |||
|
|||
/** | |||
* Sync frequentlyUsedEmojis with Onyx and Server | |||
* @param {Array} frequentlyUsedEmojis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed an {Array}
usage here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that. Fixed and updated PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mananjadhav, this LGTM, @stitesExpensify when you get back from OOO feel free to leave a review if there are any follow-ups you'd like addressed.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🔥 I didn't review the code but I just tested it and it seems to work great! Thanks for the work @mananjadhav and thanks for taking over the review for me @Jag96 I appreciate it |
🚀 Deployed to production by @Julesssss in version: 1.1.21-1 🚀
|
Details
Fixed Issues
$ #4559
Tests
QA Steps
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android