Closed izarutskaya closed 4 months ago
Triggered auto assignment to @trjExpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
We think this issue might be related to the #vip-vsb.
I can reproduce this. You have to add the emoji to the end of the text with no space for it to disappear.
Job added to Upwork: https://www.upwork.com/jobs/~01f96963f235e9c546
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 (External
)
When you enter some text (it can also be space in the end) and then insert an emoji in less than a second after finishing typing, the emoji is being removed. This also can be reproduced in any other platform, just be quick.
In "ComposerWithSuggestions" component "updateComment" function a comment update with regular text is saved with the debounced function, while comment update with emoji is not. So what happens is first the comment with the emoji is being saved and then the debounced function is being invoked with the old value, reverting the comment to the previous non-emoji state.
There are two way to solve this issue.
debouncedSaveReportComment.flush()
line of code when updating the comment with the emoji in "updateComment" function. This will invoke the debounced function before the emoji insertion.updateComment(ComposerUtils.insertText(commentRef.current, selection, text), true);
in "replaceSelectionWithText" function. This will update the debounced function and invoke it with the correct value.N/A
@trjExpensify, @hungvu193 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
I'll review it tmr
Thanks @roitman-g, your proposal makes sense to me, do you know which PR cause this issue?
Thanks @roitman-g, your proposal makes sense to me, do you know which PR cause this issue?
I am not sure, the bug was probably introduced the same time the emoji insertion functionality and debounced comment caching was first written. But it is very difficult to follow the commits back to that place, since these lines were overwritten by many different commits both for the debounced save draft and emoji insertion.
@roitman-g 's proposal here looks good to me. I'd prefer the first solution. π π π C+ reviewed
Triggered auto assignment to @iwiznia, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Hmmmm curious why you think first solution is better than the 2nd one @hungvu193, it seems to me like comment with or without emoji should be saved debounced so that any comment works the same way.... Also @roitman-g which one do you think is better and why?
Yeah, it's just my opinion because we can't enter many emojis at the same time so we don't need to debounce it like we did with comments
I would go with the second, it seems simpler. What if the app is changed so that many emojis can be inserted or any other feature with some other multiple selections is added.
You can paste a message with many emojis, no? But also I agree is simpler and makes it work the same no matter what you write. Let's go with the second one.
π£ @hungvu193 π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @roitman-g You have been assigned to this job! Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs! Keep in mind: Code of Conduct | Contributing π
You can paste a message with many emojis, no?
Yeah you can, but even you paste it, it will be debounced because it's treated as comment. But yeah, let go with 2 to make it consistent with comment.
@roitman-g Do you have any ETA for the PR?
@roitman-g Do you have any ETA for the PR?
I will do it by Sunday.
PR was approved, waiting for merge freeze over.
Same
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.78-5 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-06-11. :confetti_ball:
For reference, here are some details about the assignees on this 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:
Regression test:
Thanks, @hungvu193! I don't think we need a standalone regression test for this, it was caught while executing an existing one as per the OP link.
Payment summary as follows:
Hans is paid. @roitman-g, can you send me your Upwork profile please?
@trjExpensify can you check upwork again? I think contract was ended without payment
Thanks, @hungvu193! I don't think we need a standalone regression test for this, it was caught while executing an existing one as per the OP link.
Payment summary as follows:
- $250 to @hungvu193 for the C+ review
- $250 to @roitman-g for the fix
Hans is paid. @roitman-g, can you send me your Upwork profile please?
May I use this upwork account for this - https://www.upwork.com/freelancers/~0197cfa7f554b66970?
@hungvu193 looks paid to me:
May I use this upwork account for this - https://www.upwork.com/freelancers/~0197cfa7f554b66970?
Yeah @roitman-g, if that's your Upwork profile? π
Anything else to do here?
@roitman-g can you confirm on this?
Yeah @roitman-g, if that's your Upwork profile? π
@roitman-g can you confirm on this?
Yeah @roitman-g, if that's your Upwork profile? π
It is not mine, it is my brother's, I need to prepare my documents to verify my upwork. If it needs to be my upwork, can I send it in the next two weeks?
Sounds good, @roitman-g. I've sent an offer to that Upwork profile. Please accept and then I'll pay and close this issue out.
Paid, closing!
If you havenβt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: v1.4.71-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4544514 Email or phone of affected tester (no customers): vdargentotest+ios050724@gmail.com Logs: https://stackoverflow.com/c/expensify/questions/4856 Issue reported by: Applause-Internal team
Action Performed:
Pre-requisite: user must be logged in.
Expected Result:
The selected emoji should remain on the compose box.
Actual Result:
The selected emoji is displayed for a moment, but suddenly disappears.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/Expensify/App/assets/115492554/f3bb9143-dec2-4e32-98e8-1e3e1343bfbf
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @trjExpensify