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 2023-09-21] [$1000] Compose box - Cursor at left instead of right side while editing the comment #24157

Closed
1 of 6 tasks
lanitochka17 opened this issue Aug 4, 2023 · 75 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 4, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Launch app
  2. Tap on a conversation
  3. Paste a message in compose box
  4. Send the message
  5. Long press the message sent
  6. Tap edit comment to note the position of cursor in edit compose box

Expected Result:

The cursor in edit compose box should be placed in right side after the message and not on the left at the starting of the message

Actual Result:

The cursor in edit compose box is placed on the left at the starting of the message instead on the right after the message

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.50.0

Reproducible in staging?: Yes

Reproducible in production?: No

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

Notes/Photos/Videos: Any additional supporting documentation

Bug6152782_cursor_at_left.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d175f62c52a7511d
  • Upwork Job ID: 1688551971217133568
  • Last Price Increase: 2023-08-14
  • Automatic offers:
    • jeet-dhandha | Contributor | 26161899
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Aug 4, 2023
@OSBotify
Copy link
Contributor

OSBotify commented Aug 4, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 4, 2023

Triggered auto assignment to @cristipaval (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@Beamanator
Copy link
Contributor

I don't think the full steps are needed, I think you just have to edit a comment you previously sent

I reproduced on Android with:

  1. Sent message in web (cuz i was testing there)
  2. Opened app with Android, went to the message I just sent
  3. Log-pressed, then clicked "Edit"
  4. Saw cursor appear on left side

@jeet-dhandha
Copy link
Contributor

Proposal

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

  • For android when editing a message cursor is placed at the starting of the message.

What is the root cause of that problem?

  • The root cause of the problem is that selection state has {start: 0, end: 0} when the composer is focused. As a result the cursor is placed at the starting of the message.

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

  • We should set the selection state to {start: finalDraft.length, end: finalDraft.length} when we set draft message. So that the cursor is placed at the end of the message.

Code Changes:

  • In ReportActionItemMessageEdit.js add a common updateSelection function which set's selection based on given message.
  • Modify useState of draft to call updateSelection function before returning the finalDraft.
  • Update setSelection in 2nd useEffect of ReportActionItemMessageEdit.js to call updateSelection function with the prevDraft variable.

Note:

  • I tested on Mobile Safari this is working as expected.

What alternative solutions did you explore? (Optional)

  • N/A

@melvin-bot melvin-bot bot added Daily KSv2 and removed Hourly KSv2 labels Aug 4, 2023
@s-alves10
Copy link
Contributor

This solution can solve the issue. I think This is NAB and need to hold until #21654 is solved

@cristipaval
Copy link
Contributor

Since it happens on Android only and it's a corner case, I'll remove the deploy blocker for this one.

@cristipaval cristipaval removed the DeployBlockerCash This issue or pull request should block deployment label Aug 7, 2023
@melvin-bot melvin-bot bot removed the Overdue label Aug 7, 2023
@cristipaval cristipaval added the Bug Something is broken. Auto assigns a BugZero manager. label Aug 7, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 7, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 7, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@cristipaval cristipaval added the External Added to denote the issue can be worked on by a contributor label Aug 7, 2023
@melvin-bot melvin-bot bot changed the title Compose box - Cursor at left instead of right side while editing the comment [$1000] Compose box - Cursor at left instead of right side while editing the comment Aug 7, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 7, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 7, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 7, 2023

Current assignee @twisterdotcom is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Aug 7, 2023

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

@work70727
Copy link

How can I apply for this?

@melvin-bot
Copy link

melvin-bot bot commented Aug 7, 2023

📣 @mykhailoananiev23! 📣
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. 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.
  2. 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.
  3. 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>

@cristipaval
Copy link
Contributor

@jeet-dhandha friendly bump.

@johncschuster
Copy link
Contributor

Bumped in Slack

@robertKozik
Copy link
Contributor

@johncschuster, the PR was already approved yesterday. However, I requested to delay the merging until today as I already had multiple PRs merged off hold.

@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @jeet-dhandha got assigned: 2023-08-16 18:43:18 Z
  • when the PR got merged: 2023-09-12 21:38:07 UTC
  • days elapsed: 19

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Sep 14, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Compose box - Cursor at left instead of right side while editing the comment [HOLD for payment 2023-09-21] [$1000] Compose box - Cursor at left instead of right side while editing the comment Sep 14, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Sep 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.69-2 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-09-21. 🎊

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.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

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:

  • [@robertKozik] The PR that introduced the bug has been identified. Link to the PR:
  • [@robertKozik] 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:
  • [@robertKozik] 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:
  • [@robertKozik] Determine if we should create a regression test for this bug.
  • [@robertKozik] 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.
  • [@johncschuster / @twisterdotcom] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Sep 21, 2023
@cristipaval
Copy link
Contributor

@johncschuster the only payment due here is the contributor payment, as the issue was reported by Applause and reviewed by a C+ from an agency.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 25, 2023
@cristipaval
Copy link
Contributor

What's the payment status here @johncschuster? Can we close the issue?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 28, 2023
@cristipaval
Copy link
Contributor

Can we close this issue?

@melvin-bot melvin-bot bot removed the Overdue label Oct 2, 2023
@twisterdotcom
Copy link
Contributor

jeet-dhandha has already been paid $1000 here: https://www.upwork.com/nx/wm/workroom/34700035/overview.

I think we can close yes.

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. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests