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

[waiting payment] [$500] Chat – Last message edit mode doesn’t open when Press ArrowUp in DM if delete previous message #30135

Closed
1 of 6 tasks
lanitochka17 opened this issue Oct 21, 2023 · 32 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 21, 2023

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: 1.3.88-3
Reproducible in staging?: Yes
Reproducible in production?: Yes
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: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Log in with any account
  3. Navigate to the conversation between user A and B in both devices
  4. Send two messages to user B
  5. As user B - send one message to user A
  6. Press ArrowUp in the DM. Verify that the last message user A sent in the chat enters edit mode
  7. Delete all the text while editing the comment and save
  8. Press ArrowUp in the DM

Expected Result:

The first message sent in step 4 enters edit mode

Actual Result:

Nothing happenes. Last message edit mode doesn’t open when Press ArrowUp in the DM if delete the previous message using keyboard

Workaround:

Unknown

Platforms:

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

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

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
Windows: Chrome
Bug6245674_1697908414343.ArrowUp.mp4
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f952d724c3a99419
  • Upwork Job ID: 1715844446371176448
  • Last Price Increase: 2023-10-28
  • Automatic offers:
    • situchan | Contributor | 27458813
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 21, 2023
@melvin-bot melvin-bot bot changed the title Chat – Last message edit mode doesn’t open when Press ArrowUp in DM if delete previous message [$500] Chat – Last message edit mode doesn’t open when Press ArrowUp in DM if delete previous message Oct 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 21, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 21, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 21, 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

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

melvin-bot bot commented Oct 21, 2023

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

@zukilover
Copy link
Contributor

Proposal

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

ArrowUp does not focus on previous message after deletion.

What is the root cause of that problem?

Composer will refocus when a modal has been opened then closed:

if (!(willBlurTextInputOnTapOutside && !isNextModalWillOpenRef.current && !modal.isVisible && isFocused && (prevIsModalVisible || !prevIsFocused))) {
return;
}

The problem is, when user is deleting a message on empty edit, modal did not trigger visibility state change via shouldSetModalVisibility:

ReportActionContextMenu.showDeleteModal(props.reportID, props.action, false, deleteDraft, () => InteractionManager.runAfterInteractions(() => textInputRef.current.focus()));
return;

Here, the third param is the shouldSetModalVisibility signal.

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

Change the line above to pass the correct true signal for shouldSetModalVisibility

to:

ReportActionContextMenu.showDeleteModal(props.reportID, props.action, true, deleteDraft, () => InteractionManager.runAfterInteractions(() => textInputRef.current.focus()));

What alternative solutions did you explore? (Optional)

N/A

@Santhosh-Sellavel
Copy link
Collaborator

@zukilover Where did this get broken, can you find a PR?

@zukilover
Copy link
Contributor

@Santhosh-Sellavel this goes way back to this PR: #7387, it has always been false from the first implementation.

@melvin-bot melvin-bot bot added the Overdue label Oct 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

@abekkala, @Santhosh-Sellavel Whoops! This issue is 2 days overdue. Let's get this updated quick!

@abekkala
Copy link
Contributor

@Santhosh-Sellavel is the proposal above sufficient? or are we still on the hunt for one?

@melvin-bot melvin-bot bot removed the Overdue label Oct 27, 2023
@situchan
Copy link
Contributor

@Santhosh-Sellavel is OOO for a few days.

I think this is composer focus issue. OP needs updated

Screen.Recording.2023-10-27.at.9.04.09.PM.mov

This is correct bug:
Composer doesn't get focused automatically after delete message in edit mode

@situchan
Copy link
Contributor

As seen in above video, once composer is focused, ArrowUp works

@situchan
Copy link
Contributor

@zukilover this should be recent regression. You pointed very old PR which is not related.

@zukilover
Copy link
Contributor

I think we agree that the arrowUp works when the composer is focused.

The problem is, composer failed to do so automatically.

Upon my investigation, this was due to incorrect falsy state that is passed to the delete modal.

@melvin-bot
Copy link

melvin-bot bot commented Oct 28, 2023

📣 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 Oct 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 31, 2023

@abekkala, @Santhosh-Sellavel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@abekkala
Copy link
Contributor

@situchan (or if @Santhosh-Sellavel is back from ooo) do you have an update or comment on the last message provided from @zukilover

@melvin-bot melvin-bot bot removed the Overdue label Oct 31, 2023
@situchan
Copy link
Contributor

@zukilover's proposal looks good to me.
🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Oct 31, 2023

Triggered auto assignment to @pecanoro, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@pecanoro
Copy link
Contributor

Assigning @zukilover to the issue!

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 31, 2023
Copy link

melvin-bot bot commented Oct 31, 2023

📣 @Santhosh-Sellavel Please request via NewDot manual requests for the Reviewer role ($500)

Copy link

melvin-bot bot commented Oct 31, 2023

📣 @zukilover 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 📖

@situchan
Copy link
Contributor

@pecanoro can you please assign me as well? Thanks

Copy link

melvin-bot bot commented Oct 31, 2023

📣 @Santhosh-Sellavel Please request via NewDot manual requests for the Reviewer role ($500)

Copy link

melvin-bot bot commented Oct 31, 2023

📣 @situchan 🎉 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 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 31, 2023
@zukilover
Copy link
Contributor

PR is now ready #30669

@abekkala
Copy link
Contributor

Deployed to Prod 3 days ago!

@abekkala
Copy link
Contributor

PAYMENTS:

@abekkala
Copy link
Contributor

abekkala commented Nov 22, 2023

@situchan
Can you complete checklist:

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:

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

@situchan
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR: Show delete confirmation for the action when saving empty comment #7387
  • 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: https://github.com/Expensify/App/pull/7387/files#r1402348750
  • 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: N/A
  • Determine if we should create a regression test for this bug.
  • 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.

This was caught by Applause team and super minor issue. So no need regression test

@abekkala
Copy link
Contributor

@zukilover waiting for you to accept Upwork offer - I'll be back in office on Monday 11/27 to process payment

@situchan payment made and contract ended - thank you! 🎉

@abekkala abekkala changed the title [$500] Chat – Last message edit mode doesn’t open when Press ArrowUp in DM if delete previous message [waiting payment] [$500] Chat – Last message edit mode doesn’t open when Press ArrowUp in DM if delete previous message Nov 22, 2023
@zukilover
Copy link
Contributor

@abekkala offer accepted, thank you.

@abekkala
Copy link
Contributor

@zukilover you caught me before I left! ❤️
Payment sent and contract ended - thank you! 🎉

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 Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants