-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2023-05-03] [$1000] Emoji suggestion doesn’t highlight the text in front of another emoji #16626
Comments
Triggered auto assignment to @laurenreidexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
@laurenreidexpensify Huh... This is 4 days overdue. Who can take care of this? |
Reproduced this on Mac OS Chrome too |
Job added to Upwork: https://www.upwork.com/jobs/~01317ca88636cf5943 |
Current assignee @laurenreidexpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel ( |
Triggered auto assignment to @PauloGasparSv ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Emoji suggestion doesn’t highlight the text in front of another emoji What is the root cause of that problem? (Original Bug)We are using this logic to get the prefix
Note: We are getting the prefix by getting all characters between the colon index and the first space index So that in this case the prefix will be What is the root cause of that problem? (Bug is mentioned here)We are splitting the leftText by space or new line App/src/pages/home/report/ReportActionCompose.js Lines 431 to 434 in 71b6b1a
So that, if the before of the cursor is emoji, it will not be splitted What changes do you think we should make in order to solve the problem? (Original Bug)We should replace the logic to get the prefix by getting all characters between the colon index and the cursor index like this
What changes do you think we should make in order to solve the problem? (Bug is mentioned here)We should use new regex to check all space, new line and emoji like that: And use it replace the old regex My solution will make behavior similar to slack: What alternative solutions did you explore? (Optional)NA |
ProposalPlease re-state the problem that we are trying to solve in this issue.Emoji suggestion matched string is not highlighting if it is getting added before the emoji What is the root cause of that problem?The
What changes do you think we should make in order to solve the problem?
Bcoz we only need to consider lastColonIndex before the cursor position till cursor position index to show emoji suggestions. So we can take out extra logic which is to ResultScreen.Recording.2023-04-10.at.9.39.15.PM.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.emoji text is not highlighted in emoji suggestion popup if is following with onther one without whitespace. What is the root cause of that problem?case 1 text before emojiprefix format depond on whitespace
case 2 text after emoji
isEmojiCode(str, pos) {
const leftWords = str.slice(0, pos).split(CONST.REGEX.NEW_LINE_OR_WHITE_SPACE);
// return ["😄:smi"] not [":smi"]
const leftWord = _.last(leftWords);
// return "😄:smi" not ":smi"
//CONST.REGEX.HAS_COLON_ONLY_AT_THE_BEGINNING will failed becauze text not start with ":"
return CONST.REGEX.HAS_COLON_ONLY_AT_THE_BEGINNING.test(leftWord) && leftWord.length > 2;
} What changes do you think we should make in order to solve the problem?case 1 text before emojisplit text with Any non-word character // split using Any non-word character [^a-zA-Z0-9_]
prefix={this.state.value.slice(this.state.colonIndex + 1).split(/[^\w]/)[0]} case 2 text after emoji isEmojiCode(str, pos) {
// split using Any non-word character expect ":" [^a-zA-Z0-9_:]
const leftWords = str.slice(0, pos).split(/[^\w:]/);
const leftWord = _.last(leftWords);
return CONST.REGEX.HAS_COLON_ONLY_AT_THE_BEGINNING.test(leftWord) && leftWord.length > 2;
} What alternative solutions did you explore? (Optional) |
Will check this tomorrow |
@Santhosh-Sellavel bump ^^ |
Ah missed this one will get it today, thanks for the bump! |
Emoji suggestions are not shown if typed shorthand immediately after the emoji or between Emojis Screen.Recording.2023-04-07.at.11.47.10.PM.movNone of the proposals address all the cases here. |
Hi @Santhosh-Sellavel @PauloGasparSv The PR is ready for review |
@dukenv0307 can you confirm you've also applied to the job on Upwork? If so, can you confirm you name so I hire the correct person :) ? Thanks |
@laurenreidexpensify I've applied, here's my profile https://www.upwork.com/freelancers/~01f5cbe690701118a2 |
@Santhosh-Sellavel @PauloGasparSv just to confirm a point, are we following fully Slack/GitHub emoji suggestions feature? asking bcoz there we don't see suggestions if the selection/cursor position changes. It only shows the suggestions on input text changes. |
if the selection goes out the minimum length for the suggestion list or we are hiding the list, So I don't see any problem here when moving within the keyword IMO find it useful here. cc: @PauloGasparSv your thoughts here? |
I also think that's ok! We usually use Slack and other tools to base ourselves and check how we should implement the feature but I also think it works fine the way it was proposed so IMO we should try that : ) Reviewing the P.R. here |
Thanks for confirming. :) |
thanks @dukenv0307 = hired! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.5-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-05-03. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Everyone has been paid - waiting on @Santhosh-Sellavel summary for next steps re: regression testing :) |
cc: @PauloGasparSv if you differ let me know. |
Regression steps From the PR itself looks good to me
👍 or 👎 |
Sounds good to me @Santhosh-Sellavel! I also think we should mention how to type the emoji directly in the composer box so people don't confuse the steps with opening the Emoji picker. What do you think of the following?
|
Much better Sorry I missed that, seems @dukenv0307 missed adding our suggestion here. |
All yours @laurenreidexpensify! |
Great, all steps complete, closing. Nice job everyone! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
The emoji text should be highlighted.
Actual Result:
The emoji text is not highlighted in emoji suggestion popup.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.90-7
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
RPReplay_Final1679987714.MP4
HYDV7758.1.MP4
Expensify/Expensify Issue URL:
Issue reported by: @hungvu193
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1679990049275629
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: