-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Awaiting Checklist] [$500] Cursor freeze on paste emoji in edit message #29128
Comments
Triggered auto assignment to @twisterdotcom ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~0157837cc3b2f27ed2 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Cursor freeze on paste emoji in edit message What is the root cause of that problem?In the current approach, we utilized the functional form of setState, a method that accepts a function returning the new state. Within this function, the cursor's position was calculated based on prevDraft (the prior state). The crux of the problem is that this functional form of setState doesn't always have immediate access to the most recent state. The asynchronous nature of React's state updates means that prevDraft could potentially reflect an outdated draft version by the time the cursor's position was calculated. This misalignment, wherein the cursor position was determined using potentially outdated information, was causing the observed erratic cursor movement. What changes do you think we should make in order to solve the problem?By directly setting the draft state with Current Implementation: App/src/pages/home/report/ReportActionItemMessageEdit.js Lines 214 to 223 in 0bc4876
Updated:
We also use the same approach in App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js Lines 203 to 258 in 964ddb8
ResultScreen.Recording.2023-10-10.at.3.41.31.AM.mp4 |
Current assignee @twisterdotcom is eligible for the Bug assigner, not assigning anyone new. |
Bug0 Triage Checklist (Main S/O)
|
@Krishna2323 Thanks for your proposal! The text is a bit dense, so I'd appreciate a bit more of a clear & concise RCA. I also would prefer if you broke down what changes you are making and where. Could you update your proposal with these changes? |
@jjcoffee, proposal updated. |
Thanks! @Krishna2323's proposal LGTM. 🎀👀🎀 C+ reviewed |
Triggered auto assignment to @Beamanator, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @jjcoffee 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
📣 @dhanashree-sawant 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app! |
@jjcoffee, PR ready for review. |
🎯 ⚡️ Woah @jjcoffee / @Krishna2323, great job pushing this forwards! ⚡️ The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉
On to the next one 🚀 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.85-4 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-10-24. 🎊 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.
For reference, here are some details about the assignees on this issue:
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:
|
Payment summary: |
Bump on the checklist @jjcoffee. |
Regression test proposal
Do we agree 👍 or 👎 |
@twisterdotcom Sorry, missed this one - added the checklist now! |
Sorted. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.3.79-3
Reproducible in staging?: Yes
Reproducible in production?: Yes
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
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696835638613239
Action Performed:
Expected Result:
App should not freeze cursor position on paste of emoji
Actual Result:
App freezes cursor position on paste of emoji in edit message
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
android.chrome.paste.edit.message.freeze.cursor.mp4
iOS: Native
iOS: mWeb Safari
ios.native.safari.paste.edit.mesage.freeze.cursor.mov
MacOS: Chrome / Safari
mac.chrome.paste.edit.mesage.freeze.cursor.mov
emoji.mp4
MacOS: Desktop
mac.desktop.paste.edit.mesage.freeze.cursor.mov
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @jjcoffeeThe text was updated successfully, but these errors were encountered: