Closed lanitochka17 closed 4 weeks ago
Triggered auto assignment to @blimpich (DeployBlockerCash
), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
@blimpich FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
We think that this bug might be related to #vip-vsp
This bug seems to come from https://github.com/Expensify/App/pull/43255
It seems like we're not triggering onSelectionChange to update the selection
⚠️ Looks like this issue was linked to a Deploy Blocker here
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
Job added to Upwork: https://www.upwork.com/jobs/~01888989e2a7176967
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (External
)
Upwork job price has been updated to $500
When a user opens the in-app emoji picker and selects an emoji, the emoji is inserted in front of the entered text instead of after it. This issue is reproducible in the staging environment but not in production.
The root cause appears to be related to the handling of the cursor position and text buffer management in the code responsible for emoji insertion. There may be differences between the staging and production code that affect this functionality.
Alright, it seems coming from my PR here: https://github.com/Expensify/react-native-live-markdown/pull/370, so I would like to take on this issue and fix this
The emoji is inserted in front of the entered text. This is a regression created by https://github.com/Expensify/react-native-live-markdown/pull/370.
The history is a bit complex. Here's the concise version:
react-native-live-markdown
repo, including this change to address that specific issue: https://github.com/Expensify/react-native-live-markdown/pull/357/files#diff-ec487e4a4ccb9c4ffd7ead6ff0a585595aa8d9e9b7d5167d0a2444d70d2001e1R563. The solution's main idea is to use the contentSelection
ref to restore the cursor instead of using blur() and focus()
mechanism, which will avoid the main issue #41137, i.e: the keyboard being popping down and up again.
The root cause and suggested solution has been identified here: https://github.com/Expensify/App/issues/41137#issuecomment-2153777091.
In summary, the contentSelection
ref is out-of-date during text change event, so one way to fix is to update the contentSelection
value after updating the text, which is the purpose of this PR https://github.com/Expensify/react-native-live-markdown/pull/370
contentSelection
ref is being updated in the handleOnTextChange
event will cause the cursor to jump around funny, leading to these 2 regression (which are deploy blockers)
It seems to me that react-native-live-markdown
and its way of working shouldn't be touched since it's extremely difficult to alter the core flow without causing regression in one way or another, i.e, if I'm trying to figure out the root cause and fix this issue based on the current code, I'll push myself down the black hole. Another factor we need to consider is that this issue is a deploy blocker, so the best course of action will be:
Revert these 2: https://github.com/Expensify/react-native-live-markdown/pull/370, and https://github.com/Expensify/react-native-live-markdown/pull/357/files#diff-ec487e4a4ccb9c4ffd7ead6ff0a585595aa8d9e9b7d5167d0a2444d70d2001e1R563 (for this PR, we only need to revert the specific change that used the contentSelection
ref to set the cursor of the new text change in the hook, let's keep the setBaseAndExtent
function as it is proved not to cause any issues so far).
By taking 2 reverts above, the issue https://github.com/Expensify/App/issues/41137#issuecomment-2122076927 will rise again, and this is my proposed solution to resolve this issue without touching the contentSelection
ref and causing bunch of regression, and it's well tested on both the main issue and both regression issues mentioned above.
I can open PR immediately for (1), which will unblock the blockers, and for (2) will be handled exclusively in this issue: https://github.com/Expensify/App/issues/41137
N/A
⚠️ Looks like this issue was linked to a Deploy Blocker here
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
Reverted the offending PR, proper fix will be handled in the original issue, we just need to get the deploy out https://github.com/Expensify/react-native-live-markdown/pull/377
fixed in the -17 version https://github.com/Expensify/App/assets/36083550/3e715225-ed27-4c0e-8284-db96b68d5699
I think we can close this one out, consolidating the payment here https://github.com/Expensify/App/issues/43332
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.81-11 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-18. :confetti_ball:
For reference, here are some details about the assignees on this issue:
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.82-4 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-20. :confetti_ball:
For reference, here are some details about the assignees on this issue:
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: 1.4.80-14 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team
Issue found when executing PR https://github.com/Expensify/App/issues/42523
Action Performed:
Expected Result:
The emoji is inserted after the entered text
Actual Result:
The emoji is inserted in front of the entered text
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/78819774/aa9188a5-1907-4cf4-83a4-511a353fa15e
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @sobitneupane