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

[HOLD for payment 2024-04-25] [$500] Composer - Pointer returns to previous line when adding new line #39836

Closed
3 of 6 tasks
kbecciv opened this issue Apr 8, 2024 · 34 comments · Fixed by #39934
Closed
3 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Apr 8, 2024

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.60-1
Reproducible in staging?: y
Reproducible in production?: n
Issue reported by: Applause - Internal Team

Action Performed:

  1. Navigate to any report
  2. Write some text > 'Shift + Enter' to add new line
  3. Write some test > 'Shift + Enter' to add new line

Expected Result:

New line should remain created and pointer shouldn't return to the second link

Actual Result:

New line disappears after creation and pointer is return to the second link

Workaround:

n/a

Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos

Add any screenshot/video evidence

Bug6442296_1712582446951.Screen_Recording_2024-04-08_at_4.20.19_in_the_afternoon.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0126b896f5a0cd6841
  • Upwork Job ID: 1777441390901157888
  • Last Price Increase: 2024-04-09
  • Automatic offers:
    • akinwale | Reviewer | 0
Issue OwnerCurrent Issue Owner: @bfitzexpensify
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Apr 8, 2024
Copy link

melvin-bot bot commented Apr 8, 2024

Triggered auto assignment to @deetergp (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link
Contributor

github-actions bot commented Apr 8, 2024

👋 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:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@kbecciv
Copy link
Author

kbecciv commented Apr 8, 2024

We think that this bug might be related to #vip-vsb

@mountiny
Copy link
Contributor

mountiny commented Apr 8, 2024

I believe this is same as the bug @mallenexpensify raised where leaving a whitespace at the end of the text goes back

Screen.Recording.2024-04-08.at.17.34.16.mov

@deetergp
Copy link
Contributor

deetergp commented Apr 8, 2024

Sounds like Software Mansion is being asked to investigate this https://expensify.slack.com/archives/C06SNCPJCLT/p1712346760326019

@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Apr 8, 2024
@melvin-bot melvin-bot bot changed the title Composer - Pointer returns to previous line when adding new line [$250] Composer - Pointer returns to previous line when adding new line Apr 8, 2024
Copy link

melvin-bot bot commented Apr 8, 2024

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

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

melvin-bot bot commented Apr 8, 2024

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

@mountiny mountiny changed the title [$250] Composer - Pointer returns to previous line when adding new line [$50] Composer - Pointer returns to previous line when adding new line Apr 8, 2024
@mountiny mountiny changed the title [$50] Composer - Pointer returns to previous line when adding new line [$500] Composer - Pointer returns to previous line when adding new line Apr 8, 2024
Copy link

melvin-bot bot commented Apr 8, 2024

Upwork job price has been updated to $50

@melvin-bot melvin-bot bot changed the title [$500] Composer - Pointer returns to previous line when adding new line [$50] Composer - Pointer returns to previous line when adding new line Apr 8, 2024
@mountiny
Copy link
Contributor

mountiny commented Apr 8, 2024

Out of the deploy blockers, this is major QOL detriment as its happening constantly as one types.

We cannot deploy until this is fixed so exporting for $500

@arjun-dureja
Copy link

Proposal

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

While composing a chat, the cursor returns to the last character when adding spaces or new lines

What is the root cause of that problem?

The problem lies within the prepareDraftComment function and SilentCommentUpdater component. The value of the comment saved to Onyx has leading and trailing whitespaces trimmed, so when SilentCommentUpdater updates it using the stored value, all the whitespace stored in React state are removed.

Another way to reproduce this issue would be to type a comment with lots of whitespace (i.e. hello ), then refresh the page. You'll notice that the whitespace is gone

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

We should consider removing the .trim() in prepareDraftComment.

If comments should be trimmed, then we should adjust the logic in SilentCommentUpdater so that it includes the whitespace while the user is typing

What alternative solutions did you explore? (Optional)

N/A

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

Copy link

melvin-bot bot commented Apr 9, 2024

📣 @arjun-dureja! 📣
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>

@arjun-dureja
Copy link

Contributor details
Your Expensify account email: arjun.dureja1000@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01cdd44c2f746cc4d0

Copy link

melvin-bot bot commented Apr 9, 2024

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

@akinwale
Copy link
Contributor

akinwale commented Apr 9, 2024

Reviewing.

@akinwale
Copy link
Contributor

akinwale commented Apr 9, 2024

We can move forward with @arjun-dureja's proposal here since the root cause is correctly identified and the fix is adequate.

@arjun-dureja Since you're a first-time contributor, a couple of quick tips to get started:

  • Read through the contributing guidelines.
  • You can create a PR after you have been assigned to the issue.
  • Before creating the PR, make sure to have your commits GPG signed.

If you have any questions, please do not hesitate to ask. Thanks.

🎀👀🎀 C+ reviewed.

Copy link

melvin-bot bot commented Apr 9, 2024

Current assignee @deetergp is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@mountiny mountiny changed the title [$50] Composer - Pointer returns to previous line when adding new line [$500] Composer - Pointer returns to previous line when adding new line Apr 9, 2024
Copy link

melvin-bot bot commented Apr 9, 2024

⚠️ This issue has had its price increased by 4x or more. Please review the issue and ensure the price is correct.

Copy link

melvin-bot bot commented Apr 9, 2024

📣 @arjun-dureja 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 📖

@arjun-dureja
Copy link

Applied to the job

@mountiny mountiny added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Apr 9, 2024
Copy link

melvin-bot bot commented Apr 9, 2024

Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Apr 9, 2024
@mountiny
Copy link
Contributor

mountiny commented Apr 9, 2024

This needs to be paid out to @arjun-dureja for help identifying the root cause and fix

50% of the reward to @arjun-dureja so $250 cc @bfitzexpensify

Same would go to @akinwale for testing the PR and checklist there

@mountiny mountiny removed the DeployBlockerCash This issue or pull request should block deployment label Apr 9, 2024
@mountiny mountiny reopened this Apr 9, 2024
@bfitzexpensify
Copy link
Contributor

Payments complete.

@akinwale
Copy link
Contributor

50% of the reward to @arjun-dureja so $250 cc @bfitzexpensify

Same would go to @akinwale for testing the PR and checklist there

@mountiny Just wanted to confirm if the payment due for review here is $250 or $500 since the bounty was actually raised to $500.

Thanks.

cc @bfitzexpensify

@mountiny
Copy link
Contributor

@bfitzexpensify can we please issue bonus of $250 to @akinwale to make this $500 total, thanks!

@mountiny mountiny reopened this Apr 15, 2024
@mallenexpensify
Copy link
Contributor

Contributor: @arjun-dureja paid $250 via Upwork
Contributor+: @akinwale paid $500 via Upwork (an initial payment of $250 and bonus of $250)

Happened to be subscribed so I paid the $250 as a bonus.

@bfitzexpensify , when confirming payments in GH issues, can use the above format for all? I have a version of it saved as a TextExpander to make it easy to paste in each time. Thx

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Apr 18, 2024
@melvin-bot melvin-bot bot changed the title [$500] Composer - Pointer returns to previous line when adding new line [HOLD for payment 2024-04-25] [$500] Composer - Pointer returns to previous line when adding new line Apr 18, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 18, 2024
Copy link

melvin-bot bot commented Apr 18, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Apr 18, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.62-17 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 2024-04-25. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Apr 18, 2024

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:

  • [@akinwale] The PR that introduced the bug has been identified. Link to the PR:
  • [@akinwale] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@akinwale] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@akinwale] Determine if we should create a regression test for this bug.
  • [@akinwale] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@bfitzexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
9 participants