Closed m-natarajan closed 1 week ago
Triggered auto assignment to @jliexpensify (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.
Triggered auto assignment to @youssef-lr (AutoAssignerNewDotQuality
)
Can this issue be assigned to me ? Looks like something i can contribute to
π£ @BreakTos! π£ Hey, it seems we donβt have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: parthseth2004@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~0158b590a3a6ca253f
β Contributor details stored successfully. Thank you for contributing to Expensify!
In the video shared, the Delete key is erasing characters to the right of the cursor, which I also tested and found to be true. I believe this is the expected behavior. As the Backspace key is meant to delete characters to the left of the cursor, while the Delete key should erase characters to the right. Given this, it seems like the Delete key is working as it should.
The video is recorded on Windows, not MacOS.
I'm not sure we've established that this is unexpected behavior here
The bug description is incorrect. It is not deleting the character before the cursor, which would be unexpected for forward delete. It is deleting the character after (expected), but then advancing the cursor one position to the left (unexpected). The expected behavior is that the cursor remains where it is after the character to the right is deleted. Reported here for macOS too.
Happy to take over this issue @youssef-lr, I will be joining the NewDot Quality and ECM chores very soon.
@tgolen, @youssef-lr, @jliexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
Per conversation here, I'm taking this over and will solicit proposal for it. I'll also update the OP to correctly state the bug. Not sure if this should be a NewDot Quality issue or not, so discussing that in that thread.
Job added to Upwork: https://www.upwork.com/jobs/~021834326245043110651
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (External
)
The caret is in the wrong position after deleting a character with the Delete key in Composer.
The line below from the live markdown library calculates the new caret position:
const newCursorPosition = Math.max(Math.max(contentSelection.current.end, 0) + (parsedText.length - previousText.length), 0);
In the case of this issue, parsedText.length - previousText.length
equals -1, which moves the caret one character backward before the selection end.
This behavior is correct when deleting backward or deleting forward with at least one character selected but incorrect when deleting forward with no characters selected.
Calculate the new caret position as below:
const newCursorPosition = (inputType === 'deleteContentForward' && contentSelection.current.start === contentSelection.current.end)
? Math.max(contentSelection.current.start, 0) // Don't move the caret when deleting forward with no characters selected.
: Math.max(Math.max(contentSelection.current.end, 0) + (parsedText.length - previousText.length), 0);
N/A
Proposal from @QichenZhu Looks good and works well
https://github.com/user-attachments/assets/9c188648-5399-4935-8624-37b13d59c869
π π π C+ reviewed
Triggered auto assignment to @Julesssss, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
I do the CME chore so not sure why Jules was assigned. Maybe the response to the C+ reviewed message looks at the team instead of the chore. I'll check it out.
Ah I was OOO on Friday, that's why π
@rafecolton Wdyt about the recomendation https://github.com/Expensify/App/issues/48797#issuecomment-2350376623
Was just looking at it. It looks great, and it worked when I tested it locally. Assigning them now.
π£ @ishpaul777 π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @QichenZhu π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
@ishpaul777 PR is up for review by react-native-live-markdown
maintainers.
cc: @rafecolton
Hello, we've merged the PR that fixes forward deleting in Live Markdown Input (version 0.1.154). I will bump the version of the library in E/App to 0.1.155
in my PR and add the test steps for this issue to the description. I need to do it since we have to include some bug fixes for my PR that were added after @QichenZhu's changes. Is that okay for you?
@Skalakid updated your PR body to add $ <issue link>
since that solves this issue too π
Thanks for the communication!
Not overdue Melvin
Confirmed @Skalakid's PR includes this fix, so now we'll wait for that to be merged and deployed.
When I hold down the fn
key and tap delete
to remove text in front of the cursor, it doesn't work. Will that bug be fixed here too?
When I hold down the
fn
key and tapdelete
to remove text in front of the cursor, it doesn't work. Will that bug be fixed here too?
Tested and it works after the fix.
https://github.com/user-attachments/assets/5893c193-f121-4ef7-826e-8e4bbdc909bd
Do you have a video @mallenexpensify? I bet if you take a closer look, you'll see it does work and just doesn't look like it worked because it moves the cursor position afterwards. But it does indeed delete the character after the cursor in my experience.
Your bug might also be a part of mine. The functionality of fn+delete
def isn't working correctly, which you might be able to see in the vid.
https://github.com/user-attachments/assets/50315d7c-f4e8-4ad5-836c-11b99d19b021
Thanks @QichenZhu for confirming!
@mallenexpensify in your video, the functionality is working correctly. If you look closely, you are in fact deleting the character to the right of the cursor. This is exactly the same as the bug that is being fixed here.
@rafecolton, @jliexpensify, @QichenZhu, @ishpaul777 Whoops! This issue is 2 days overdue. Let's get this updated quick!
Update for melving ^, E/react-native-live-markdown https://github.com/Expensify/react-native-live-markdown/pull/496 was merged, we are just waiting on the bump version to latest E/react-native-live-markdown version https://github.com/Expensify/App/issues/40181
I'm not 100% sure this is a quality bug, but it is nearly fixed anyway, so I'm going to remove it from the project to focus the scope there.
Sounds good, thanks Matt
@rafecolton, @jliexpensify, @QichenZhu, @ishpaul777 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
Not overdue. PR was recently merged, waiting for this change to be deployed.
Hi @rafecolton - just a heads up I'm OOO from 3rd to 14th, so I will prep a Payment Summary. If needed, feel free to reassign to another BZ for payment.
@jliexpensify you can assign to me for payment, if needed.
When you post payment summaries, can you use the below format? For auditing purposes we need to know where someone is being paid (Upwork vs NewDot) and also if they're due/owed funds are 'paid'. Thx
Will do in the future, thanks @mallenexpensify!
unfortunately, E/react-native-live-markdown version bump was reverted because of unrelated changes to our issue, we have new PR https://github.com/Expensify/App/pull/50047 for second try π€
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.49-2 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-10-24. :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:
whoohooo... it's fixed!! Thx
Hi @ishpaul777 - do we need a checklist here?
i could not find PR that introduce this bug, But i think we need regression tests for this.
Do we agree π or π
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: 9.0.31-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: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @tgolen Slack conversation: https://expensify.slack.com/archives/C05LX9D6E07/p1725900088874679
Action Performed:
Delete
button on the keyboardExpected Result:
Pressing the delete key should delete characters after the cursor, then the cursor should remain in its current opsition.
Actual Result:
~Pressing the delete key is deleting characters before the cursor~ After deleting the character after the cursor (expected), the cursor advances one character to the left (unexpected).
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/user-attachments/assets/6c40d39f-7823-4358-ba55-4e246b4e23f6
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mallenexpensify / @jliexpensify