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-11-21] [$500] iOS - Chat - Lines disappear in edit composer when editing multiline text #29782

Closed
1 of 6 tasks
lanitochka17 opened this issue Oct 17, 2023 · 38 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 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 17, 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.85-0

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:
Issue found when executing PR #29575

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to any chat
  3. Send a text with 5 lines
  4. Long press on the text and select edit

Expected Result:

The text will not disappear in the edit field

Actual Result:

A few lines disappear and they only appear after moving the composer

Workaround:

Unknown

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

Android: Native
Android: mWeb Chrome
iOS: Native
Bug6240576_1697551403777.RPReplay_Final1697515620.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011ace229d623e9a65
  • Upwork Job ID: 1714288302935465984
  • Last Price Increase: 2023-10-24
  • Automatic offers:
    • tsa321 | Contributor | 27477936
@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 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 17, 2023

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

@melvin-bot melvin-bot bot changed the title iOS - Chat - Lines disappear in edit composer when editing multiline text [$500] iOS - Chat - Lines disappear in edit composer when editing multiline text Oct 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 17, 2023

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

@melvin-bot
Copy link

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

melvin-bot bot commented Oct 17, 2023

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

@dylanexpensify
Copy link
Contributor

reviewing today!

@anyongjitiger
Copy link
Contributor

Proposal

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

Many lines disappear in edit composer when editing multiline text

What is the root cause of that problem?

The TextInput here is not auto focused.

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

<Composer
multiline

We can add autoFocus to it:

<Composer
   multiline
   autoFocus
   …
 />

What alternative solutions did you explore? (Optional)

@anyongjitiger
Copy link
Contributor

Result:

Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2023-10-18.at.21.00.02.mp4

@narefyev91
Copy link
Contributor

Could not repro on latest main

Screen.Recording.2023-10-19.at.15.28.32.mov

@abdel-h66
Copy link
Contributor

I can not reproduce on the latest main.

@narefyev91
Copy link
Contributor

@dylanexpensify i think we good to close this one?

@anyongjitiger
Copy link
Contributor

I can reproduce on the latest main 1.3.87-6
This issue is related to the number of lines in the text. In my simulator (iPhone SE 3rd generation - iOS 17), if the number of lines exceeds 6, this issue will not occur; otherwise, it will occur.

Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2023-10-20.at.09.22.19.mp4

@melvin-bot melvin-bot bot added the Overdue label Oct 23, 2023
@narefyev91
Copy link
Contributor

I was able to reproduce on SE device - last line was not auto-scrolled for some reason

Screen.Recording.2023-10-20.at.14.19.40.mov

@melvin-bot melvin-bot bot removed the Overdue label Oct 23, 2023
@abdel-h66
Copy link
Contributor

abdel-h66 commented Oct 23, 2023

Proposal

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

Lines disappear in edit composer when editing multiline text

What is the root cause of that problem?

The issue seems to be coming from having the composer textarea being displayed as flex: 1.

style={[styles.textInputCompose, styles.flex1, styles.bgTransparent]}

I don't really see the point of making a textarea behave with a flex, maybe I'm missing something ?

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

But it seems that removing the style.flex1 from the composer styles fixes the issue for the reproducible device, iPhone SE. And does not have any effects on the other platforms.

Monosnap.screencast.2023-10-23.19-43-18.mp4

What alternative solutions did you explore? (Optional)

N/A

@narefyev91
Copy link
Contributor

I appreciated both proposals - but seems both of them are more like work around instead of fixing a root case
I also saw the same issue in mWeb - and proposed fixes did not make any effect

Screen.Recording.2023-10-24.at.16.28.30.mov

@melvin-bot
Copy link

melvin-bot bot commented Oct 24, 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 26, 2023
@tsa321
Copy link
Contributor

tsa321 commented Oct 30, 2023

Proposal

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

When user click edit message the text edit doesn't scroll to bottom / to the end of text in IOS and mweb

What is the root cause of that problem?

There is no scrolling to the bottom action in msafari and for the ios native we need to focus the text input to make it scroll to bottom when the text input is mounted / ready.

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

We could add this code:

const scrollToBottom = useCallback((el) => {
      el.focus();
      el.scrollTop = el.scrollHeight;
},[]);

in ReportActionItemMessageEdit.js and call it when the text input is ready, that is in:

textInputRef.current = el;

around that line. call it with scrollToBottom(el)

Result:
ios_d.mp4

@dylanexpensify
Copy link
Contributor

@narefyev91 mind reviewing above proposal? 🙇‍♂️

@melvin-bot melvin-bot bot removed the Overdue label Oct 30, 2023
@narefyev91
Copy link
Contributor

Proposal from @tsa321 looks good to me #29782 (comment)
Was waiting that someone will provide those idea - if platform could not automatically scroll to the last row - we need to help to do it in code
🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Nov 12, 2023

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@dylanexpensify
Copy link
Contributor

Seems we had a regression. @narefyev91 what's the latest here?

@narefyev91
Copy link
Contributor

@dylanexpensify regression linked here #31238 - but as i mentioned in that issue - it's not coming from current PR

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 14, 2023
@melvin-bot melvin-bot bot changed the title [$500] iOS - Chat - Lines disappear in edit composer when editing multiline text [HOLD for payment 2023-11-21] [$500] iOS - Chat - Lines disappear in edit composer when editing multiline text Nov 14, 2023
Copy link

melvin-bot bot commented Nov 14, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 14, 2023
Copy link

melvin-bot bot commented Nov 14, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.98-5 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-11-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:

Copy link

melvin-bot bot commented Nov 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:

  • [@narefyev91] The PR that introduced the bug has been identified. Link to the PR:
  • [@narefyev91] 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:
  • [@narefyev91] 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:
  • [@narefyev91] Determine if we should create a regression test for this bug.
  • [@narefyev91] 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.
  • [@dylanexpensify] 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 and removed Weekly KSv2 labels Nov 21, 2023
@dylanexpensify
Copy link
Contributor

@narefyev91 let's get steps done ^ and I'll prep payment!

@narefyev91
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR - initial issue/PR was not a regression - just missing functionality for IOS
  • 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 - N/A
  • 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 - N/A

@melvin-bot melvin-bot bot added the Overdue label Nov 24, 2023
Copy link

melvin-bot bot commented Nov 27, 2023

@tylerkaraszewski, @narefyev91, @dylanexpensify, @tsa321 Huh... This is 4 days overdue. Who can take care of this?

Copy link

melvin-bot bot commented Nov 29, 2023

@tylerkaraszewski, @narefyev91, @dylanexpensify, @tsa321 Still overdue 6 days?! Let's take care of this!

@tylerkaraszewski
Copy link
Contributor

@narefyev91 can you check off the items in the list?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Nov 29, 2023
Copy link

melvin-bot bot commented Dec 4, 2023

@tylerkaraszewski, @narefyev91, @dylanexpensify, @tsa321 Eep! 4 days overdue now. Issues have feelings too...

@dylanexpensify
Copy link
Contributor

payment summary:

please apply!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Dec 5, 2023
@melvin-bot melvin-bot bot removed the Overdue label Dec 11, 2023
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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants