HomePhabricator
Diffusion Comm b400d0b364f6

[native] introudce selectMultipleEmojis and alreadySelectedEmojis to…

Description

[native] introudce selectMultipleEmojis and alreadySelectedEmojis to EmojiKeyboard component

Summary:
This diff is the first part to highlight the already selected emojis to indicate on the emoji keyboard what emojis the user has already selected. This diff handles the case when selectMultipleEmojis is equal to false and the next diff will handle the case when selectMultipleEmojis is equal to true

The big obstacle I had to overcome to build this was that the selectedEmojis prop needs to be an array of emoji names and we only store the actual emoji in our database. To overcome this obstacle I index the emojiData by the emoji so that we can easily grab the correct emoji name and pass it into the selectedEmojis prop.

Here is a link to an example to the docs that helped me with this implementation:
https://thewidlarzgroup.github.io/rn-emoji-keyboard/docs/documentation/Examples/selected_emojis

Linear Task: https://linear.app/comm/issue/ENG-3794/mobile-emoji-keyboard-highlight-emojis-that-a-user-has-already

Depends on D8282

Test Plan:
Please watch the demo video below:

Reviewers: atul, kamil

Reviewed By: kamil

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D8284

Details

Provenance
ginsuAuthored on Jun 23 2023, 1:10 PM
Reviewer
kamil
Differential Revision
D8284: [native] introudce selectMultipleEmojis and alreadySelectedEmojis to EmojiKeyboard component
Parents
rCOMMbb40eafe9fd8: [native] persist recently used emojis
Branches
Unknown
Tags
Unknown