Add support for Latin characters in emoji suggestion#39805
Add support for Latin characters in emoji suggestion#39805iwiznia merged 11 commits intoExpensify:mainfrom
Conversation
|
@thesahindia Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
I think we cannot use |
|
|
||
| EMOJI_NAME: /:[\w+-]+:/g, | ||
| EMOJI_SUGGESTIONS: /:[a-zA-Z0-9_+-]{1,40}$/, | ||
| EMOJI_NAME: /:[\p{L}0-9_+-]+:/gu, |
There was a problem hiding this comment.
This is used when auto-completing the emoji (:emoji_name:).
iwiznia
left a comment
There was a problem hiding this comment.
I think we cannot use localeCompare here given the current implementation of Trie and localeCompare only shows us whether two strings are equal but sometimes we want to search for a substring.
Let's discuss this in the issue
@tienifr, can you look into this? |
|
On it. |
|
Bump @tienifr |
|
@thesahindia I'm sorry this got out of my radar for a while. The problem is that we did not add the accent-normalized version when directly adding to the trie: Line 74 in e8ae3c5 We also need to add this logic while updating the trie: Line 41 in e8ae3c5 Line 76 in e8ae3c5 |
src/libs/StringUtils.ts
Outdated
| * Remove accents/diacritics | ||
| * @param text - The input string | ||
| * @returns The string with all accents/diacritics removed | ||
| */ |
Reviewer Checklist
Screenshots/Videos |
|
Gonna duck out of this review since @iwiznia is reviewing and participated in the linked issue more than me. |
|
🚀 Deployed to staging by https://github.com/iwiznia in version: 1.4.77-11 🚀
|
|
🚀 Deployed to staging by https://github.com/iwiznia in version: 1.4.77-11 🚀
|
|
🚀 Deployed to staging by https://github.com/iwiznia in version: 1.4.78-0 🚀
|
1 similar comment
|
🚀 Deployed to staging by https://github.com/iwiznia in version: 1.4.78-0 🚀
|
|
🚀 Deployed to staging by https://github.com/iwiznia in version: 1.4.78-2 🚀
|
1 similar comment
|
🚀 Deployed to staging by https://github.com/iwiznia in version: 1.4.78-2 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.78-5 🚀
|








Details
Composer does not auto complete or show suggestion and no results found in emoji picker when type emoji name with Latin characters. This PR fixes that.
Fixed Issues
$ #38549
PROPOSAL: #38549 (comment)
Tests
corazón):emoji_name(without closing:) in the main composer to suggest a Latin emoji (e.g.,corazón):emoji_name(without closing:) in the main composer to suggest the above emoji with its base characters (e.g.,corazon):(e.g.,:corazón:)Offline tests
NA
QA Steps
corazón):emoji_name(without closing:) in the main composer to suggest a Latin emoji (e.g.,corazón):emoji_name(without closing:) in the main composer to suggest the above emoji with its base characters (e.g.,corazon):(e.g.,:corazón:)PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2024-04-08.at.17.49.40-compressed.mov
Android: mWeb Chrome
Screen.Recording.2024-04-08.at.17.48.05-compressed.mov
iOS: Native
Screen.Recording.2024-04-08.at.17.38.03-compressed.mov
iOS: mWeb Safari
Screen.Recording.2024-04-08.at.17.40.21-compressed.mov
MacOS: Chrome / Safari
Screen.Recording.2024-04-08.at.17.34.44-compressed.mov
MacOS: Desktop
Screen.Recording.2024-04-08.at.17.39.43-compressed.mov