Skip to content
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

[$250] Chat - Cursor moves several characters when deleting markdowns on multiline message #50687

Open
2 of 6 tasks
IuliiaHerets opened this issue Oct 12, 2024 · 38 comments
Open
2 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 12, 2024

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: 9.0.48-0
Reproducible in staging?: Y
Issue reported by: Applause Internal Team

Action Performed:

  1. Open the staging.new.expensify.com website.
  2. Open any chat.
  3. Write a multiline message with at least five line breaks and three markdowns and send it.
  4. Long tap over the sent message.
  5. Tap on "Edit Message"
  6. Delete the markdowns at the end of the message.
  7. Verify the cursor moves only one character everytime a markdown is deleted.

Expected Result:

The cursor should move only one character at the time while deleting markdowns at the end of a message.

Actual Result:

When deleting the markdowns at the end of a multiline message while editing, the cursor moves several characters at the time.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6632953_1728757165629.Delete_Markdown.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021847007161571207373
  • Upwork Job ID: 1847007161571207373
  • Last Price Increase: 2024-12-05
Issue OwnerCurrent Issue Owner: @thesahindia
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 12, 2024
Copy link

melvin-bot bot commented Oct 12, 2024

Triggered auto assignment to @OfstadC (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.

@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@IuliiaHerets
Copy link
Author

@OfstadC 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

@melvin-bot melvin-bot bot added the Overdue label Oct 14, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Oct 15, 2024

I did not experience this. I also think this is kind of an odd scenario that is unlikely to occur for a user (must have 5 line breaks and 3 markdowns seems like an odd equation ) - So going to close this out

@OfstadC OfstadC closed this as completed Oct 15, 2024
@melvin-bot melvin-bot bot removed the Overdue label Oct 15, 2024
@OfstadC OfstadC reopened this Oct 17, 2024
@OfstadC OfstadC added the External Added to denote the issue can be worked on by a contributor label Oct 17, 2024
@melvin-bot melvin-bot bot changed the title Chat - Cursor moves several characters when deleting markdowns on multiline message [$250] Chat - Cursor moves several characters when deleting markdowns on multiline message Oct 17, 2024
Copy link

melvin-bot bot commented Oct 17, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021847007161571207373

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 17, 2024
Copy link

melvin-bot bot commented Oct 17, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (External)

Copy link

melvin-bot bot commented Oct 21, 2024

@OfstadC, @thesahindia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Oct 21, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Oct 22, 2024

@thesahindia could you please review the available proposal by EOD? Thank you 😃

@thesahindia
Copy link
Member

thesahindia commented Oct 22, 2024

I couldn't repro it. I tested on the latest dev version.

Screen.Recording.2024-10-23.at.2.06.56.AM.mov

@melvin-bot melvin-bot bot removed the Overdue label Oct 22, 2024
Copy link

melvin-bot bot commented Oct 24, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@thesahindia
Copy link
Member

thesahindia commented Oct 25, 2024

I still can't repro it. @OfstadC, could you please look into it?

Copy link

melvin-bot bot commented Oct 26, 2024

@OfstadC @thesahindia this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@thesahindia
Copy link
Member

I was able to repro it on mWeb. @shahinyan11, could you repro it on native or is it just a mWeb issue?

Copy link

melvin-bot bot commented Oct 30, 2024

@OfstadC, @thesahindia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Oct 30, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Nov 5, 2024

Any update @thesahindia 😃

Copy link

melvin-bot bot commented Nov 7, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@OfstadC
Copy link
Contributor

OfstadC commented Nov 7, 2024

Bump @shahinyan11 Please update by EOD tomorrow 😃 Thanks!

Copy link

melvin-bot bot commented Nov 11, 2024

@OfstadC, @thesahindia 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

@muttmuure muttmuure moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Nov 12, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Nov 12, 2024

@thesahindia Looks like we have a new proposal to review 😃

Copy link

melvin-bot bot commented Nov 13, 2024

@OfstadC, @thesahindia 10 days overdue. Is anyone even seeing these? Hello?

Copy link

melvin-bot bot commented Nov 14, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@OfstadC
Copy link
Contributor

OfstadC commented Nov 14, 2024

Bump @thesahindia

Copy link

melvin-bot bot commented Nov 15, 2024

@OfstadC, @thesahindia 12 days overdue now... This issue's end is nigh!

@OfstadC
Copy link
Contributor

OfstadC commented Nov 15, 2024

Sorry for the confusion here! Looks like this is waiting for some more proposals 😃

@melvin-bot melvin-bot bot removed the Daily KSv2 label Nov 18, 2024
Copy link

melvin-bot bot commented Nov 18, 2024

This issue has not been updated in over 14 days. @OfstadC, @thesahindia eroding to Weekly issue.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Overdue labels Nov 18, 2024
@gev990
Copy link

gev990 commented Nov 18, 2024

Proposal

Note I noticed that another member had previously posted a proposal here, but since there are currently no proposals, I decided to post a new proposal that might be similar to the proposal that was there before.

Please re-state the problem that we are trying to solve in this issue.

Chat - Cursor moves several characters when deleting markdowns on multiline message

What is the root cause of that problem?

The problem with the react-native-live-markdown package lies in how it handles cursor management. The custom logic for the cursor works effectively but operates at a quicker pace compared to React’s default text updating mechanism. As a result, the cursor gets repositioned too early. When the slower React text update concludes, it overwrites the cursor position that was set manually. This mismatch in timing leads to the cursor appearing in an incorrect location, causing it to unexpectedly jump to a different point in the text.

What changes do you think we should make in order to solve the problem?

Move this code in callback of InteractionManager.runAfterInteractions

InteractionManager.runAfterInteractions(()=> {
  if (shouldForceDOMUpdate || targetElement.innerHTML !== dom.innerHTML) {
    const animationTimes = getAnimationCurrentTimes(targetElement);
    targetElement.innerHTML = '';
    targetElement.innerText = '';
    targetElement.innerHTML = dom.innerHTML;
    updateAnimationsTime(targetElement, animationTimes);
  }
  updateTreeElementRefs(tree, targetElement);
  targetElement.tree = tree;

  moveCursor(isFocused, alwaysMoveCursorToTheEnd, cursorPosition, targetElement, shouldScrollIntoView);
})

What alternative solutions did you explore? (Optional)

Copy link

melvin-bot bot commented Nov 18, 2024

📣 @gev1990! 📣
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:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@gev990
Copy link

gev990 commented Nov 18, 2024

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~0183b679e4e9629baa

Copy link

melvin-bot bot commented Nov 18, 2024

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

Copy link

melvin-bot bot commented Nov 21, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

Copy link

melvin-bot bot commented Nov 28, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Nov 28, 2024
Copy link

melvin-bot bot commented Dec 5, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Dec 11, 2024
Copy link

melvin-bot bot commented Dec 11, 2024

This issue has not been updated in over 15 days. @OfstadC, @thesahindia eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot removed the Overdue label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2
Projects
Status: Bugs and Follow Up Issues
Development

No branches or pull requests

5 participants