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

[$1000] iPhone - Save changes and cancel button is hidden behind keyboard when Editing a quote message #15303

Closed
1 task
kavimuru opened this issue Feb 20, 2023 · 54 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@kavimuru
Copy link

kavimuru commented Feb 20, 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. Open any chat
  2. Send a quote message (e.g. > hi)
  3. long press quote message and press edit comment
  4. Edit input open but cancel and save buttons is hidden behind keyboard

Expected Result:

Scroll should be work like any other messages's edit comment press and it should display cancel and save changes button

Actual Result:

Cancel and save changes button is hidden behind keyboard

Workaround:

unknown

Platforms:

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

  • iOS / native

Version Number: 1.2.74-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
Notes/Photos/Videos:

edit-comment.mp4

Expensify/Expensify Issue URL:
Issue reported by: @harshad2711
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1676359015899439

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01699d5e0a18346650
  • Upwork Job ID: 1627715852713861120
  • Last Price Increase: 2023-02-27
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 20, 2023
@MelvinBot
Copy link

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

@melvin-bot melvin-bot bot locked and limited conversation to collaborators Feb 20, 2023
@MelvinBot
Copy link

MelvinBot commented Feb 20, 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

@puneetlath
Copy link
Contributor

I'm able to reproduce this on my iPhone SE as well.

@puneetlath puneetlath added the External Added to denote the issue can be worked on by a contributor label Feb 20, 2023
@melvin-bot melvin-bot bot unlocked this conversation Feb 20, 2023
@melvin-bot melvin-bot bot changed the title iPhone 13 pro - Save changes and cancel button is hidden behind keyboard when Editing a quote message [$1000] iPhone 13 pro - Save changes and cancel button is hidden behind keyboard when Editing a quote message Feb 20, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

@puneetlath puneetlath changed the title [$1000] iPhone 13 pro - Save changes and cancel button is hidden behind keyboard when Editing a quote message iPhone - Save changes and cancel button is hidden behind keyboard when Editing a quote message Feb 20, 2023
@MelvinBot
Copy link

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

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

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

@TopDeveloper1015
Copy link

Hi
I am Evgeniy.
I have strong experience in android app and mobile app
my emailaddress:manik@growthguide.co.in
please join our Slack channel

@puneetlath
Copy link
Contributor

Hi Evgeniy. Please email contributors@expensify.com if you'd like to be added to the slack channel. Thanks!

@appnwebdeveloper
Copy link

PROPOSAL

About me

Hello,

I am Bhautik Chheta and I have 4 years of experience in React native. I can fix this issue for any iOS device.

Steps that can resolve this issue:

  1. Scrollview can be used.
  2. We can enable persist tap of Scrollview

Another solution :

  1. We can add the property TouchableWithoutFeedback:
  2. Manage visibility based on Keyboard open/close
  3. When the keyboard opens we can hide by tapping outside of Keyboard using dismiss() method.

Hope it will clarify and let me know if anything missing or if I am going the wrong way.

Thanks

@Litande
Copy link

Litande commented Feb 20, 2023

Proposal

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

Save changes and cancel button are hidden partialy when editing quote and long messages

What is the root cause of that problem?

The root of the issue is due to layout change of the FlatList wile the the focus event is happening on the TextEdit the following action is called.
ReportScrollManager.scrollToIndex({animated: true, index: this.props.index}, false);
those the scrolling is executed to a wrong location in many cases to the previous positions of the item (before it resized).

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

while the focus must as it seems to happen imidiatly, the scroll can be called upon resize of the flatlist
I propose to add to ReportScrollManager an event that will be trigger upon layout change of flatlist
this event will then execute any pending scroll request which where registered using ReportScrollManager.scrollToIndex with async and not imidiate execution.

What alternative solutions did you explore? (Optional)

setTimeout, which sounds to as not so solid solution, also found comments mentioning that calling focus from inside setTimeout won't work in IOS. near this func focusTextInputAfterAnimation

@osofus
Copy link

osofus commented Feb 20, 2023

On the current main branch (commit 80890b9), it seems to work fine.

Issue.15303.mov

@tienifr
Copy link
Contributor

tienifr commented Feb 21, 2023

Same as @osofus, it's still working fine in my side with the latest code on an IOS emulator.

@Litande
Copy link

Litande commented Feb 21, 2023

@osofus @tienifr

the issue is reproduced on main for me on the following way

  1. Go to any chat
  2. Write a few messages
  3. Write a multi line messages make it even five six rows
  4. Scroll in such a way up so you will see only half of it
  5. Make sure on simulator keyboard is enabled
  6. Long press the long message and select edit

@puneetlath
Copy link
Contributor

It's still happening for me on my iPhone SE on v1.2.74-0

IMG_350A808F44F2-1

@eVoloshchak
Copy link
Contributor

Hi, @appnwebdeveloper!
Please take a look at our contributing guides and post a proposal following the proposal template

@appnwebdeveloper
Copy link

Hi, @appnwebdeveloper! Please take a look at our contributing guides and post a proposal following the proposal template

Sure, I will follow these guidelines. So do I need to post again with this template or this time it will consider?

@MelvinBot
Copy link

📣 @eVoloshchak! 📣

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>

@eVoloshchak
Copy link
Contributor

I can't reproduce this with the latest main, both for quoted message and using the steps @Litande suggested

Screen.Recording.2023-02-22.at.21.24.10.mov

@MelvinBot
Copy link

📣 @appnwebdeveloper! 📣

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>

@MelvinBot
Copy link

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

@MelvinBot
Copy link

Upwork job price has been updated to $1000

@eVoloshchak
Copy link
Contributor

@Litande, is there something I'm doing differently? Still having a hard time reproducing this

Screen.Recording.2023-02-28.at.20.26.25.mov

@Litande
Copy link

Litande commented Feb 28, 2023

@eVoloshchak it seems you are doing exactly right try bigfer messages more lines

@eVoloshchak
Copy link
Contributor

Still the same with bigger messages, weird. I'll try to reproduce it on a physical device

@puneetlath
Copy link
Contributor

@eVoloshchak were you able to repro on a physical device? I'm still able to on my phone.

@eVoloshchak
Copy link
Contributor

@puneetlath, finally managed to reproduce it on a physical device! This must be a problem specific to iOS 16, since my simulator was running iOS 15.
@Litande's proposal looks good to me

I propose to add to ReportScrollManager an event that will be trigger upon layout change of flatlist
this event will then execute any pending scroll request which where registered using ReportScrollManager.scrollToIndex with async and not imidiate execution.

@puneetlath
Copy link
Contributor

Sounds good to me too. Let's do it @Litande.

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

📣 @Litande You have been assigned to this job by @puneetlath!
Please apply to this job in Upwork 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 📖

@Litande
Copy link

Litande commented Mar 2, 2023

@puneetlath thanks getting right to it

@Litande
Copy link

Litande commented Mar 4, 2023

@puneetlath hi i applied to the job in upwork but wasn't yet accepted should i wait with the pr till the ?

@eVoloshchak
Copy link
Contributor

@Litande, no, you can go ahead and create the PR

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Mar 4, 2023
@Litande
Copy link

Litande commented Mar 6, 2023

@eVoloshchak @puneetlath

PR ready for review.

@MelvinBot
Copy link

@puneetlath, @eVoloshchak, @Litande Whoops! This issue is 2 days overdue. Let's get this updated quick!

@eVoloshchak
Copy link
Contributor

Not overdue, PR is in review

@MelvinBot
Copy link

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

@eVoloshchak
Copy link
Contributor

We've encountered bit of old logic, so there's still discussion going on in #15662

@puneetlath
Copy link
Contributor

As discussed in the PR, we are going to open a new issue to tackle this in a more cross-platform way.

@Litande I've gone ahead and paid you out.

@eVoloshchak I've sent you a contract offer.

@Litande
Copy link

Litande commented Mar 28, 2023

@puneetlath Thanks. will be following the new issue.

@harshad2711
Copy link

@puneetlath I have reported this issue, and the GH issue is closed now, so I am not sure if I am going to be paid for the reporting bonus or not for this issue, as I am new to the process

@harshad2711
Copy link

@puneetlath I have reported this issue, and the GH issue is closed now, so I am not sure if I am going to be paid for the reporting bonus or not for this issue, as I am new to the process

@puneetlath sorry to bother you but Can you please help here?

@puneetlath
Copy link
Contributor

@harshad2711 my apologies and thanks for the bump. Can you apply to the job here? https://www.upwork.com/jobs/~01699d5e0a18346650

@harshad2711
Copy link

Thanks for the help @puneetlath , I have applied at the Upwork

@puneetlath
Copy link
Contributor

Paid!

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

No branches or pull requests

10 participants