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

[Ready for Payment][$1000] iOS - Chat - "Edit comment" input field scrolls up when tap enter in 1st line of text #19507

Closed
1 of 6 tasks
kbecciv opened this issue May 24, 2023 · 184 comments
Assignees
Labels
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

@kbecciv
Copy link

kbecciv commented May 24, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

Precondition - User sent a text message in chat (e.g. 1 word or 1 line of text)

  1. Open IOS app
  2. Open chat from the precondition
  3. Long press the message
  4. Tap "Edit comment"
  5. Add 6 lines of text below the 1st line so there is a total of 7 lines
  6. Put the cursor at the end of 1st line
  7. Tap "Enter"
  8. Place cursor at the end of 7th line / on the 8th line
    9, Place cursor back at the end of the 1st line
  9. Tap "Enter"

Expected Result:

1st line of text hides above and cursor is focus on the next line of text and visible

Actual Result:

At step 7 the comment field scrolls slightly up and cursor also scrolls out of the view.
At step 10 field focus scrolls back to line 7/8

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

Notes/Photos/Videos: Any additional supporting documentation

https://platform.applause.com/services/links/v1/external/197b3277eef42e2b057288d9b61067c2fce3fc4a98ffe01c313143ea19511833

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/~0113571ce6c5a8b04e
  • Upwork Job ID: 1664050603930722304
  • Last Price Increase: 2024-08-08
  • 2023-07-19
  • Automatic offers:
    • | | 0
    • fabriziobertoglio1987 | Contributor | 25744429
Issue OwnerCurrent Issue Owner: @alexpensify
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 24, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 24, 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

@alexpensify
Copy link
Contributor

alexpensify commented May 24, 2023

I was assigned when I was offline, and I'm still catching up from being OOO. I'll test tomorrow.

@alexpensify
Copy link
Contributor

@kbecciv - to confirm, is this bug within the native app or when using Safari on the iPhone? These two points need to be clarified (see screenshot). I tried testing but need to confirm if I need to be using the iPhone application or the app via a mobile browser. Thanks!

image

@alexpensify
Copy link
Contributor

Waiting for the updated testing steps

@kbecciv
Copy link
Author

kbecciv commented May 29, 2023

@alexpensify Issue is occurring on only IOS native, updated the step 1. Sorry for confusion.

@melvin-bot melvin-bot bot added the Overdue label May 30, 2023
@alexpensify
Copy link
Contributor

Thanks for confirming @kbecciv - I'll test using iOS native.

@melvin-bot melvin-bot bot removed the Overdue label May 30, 2023
@alexpensify
Copy link
Contributor

I'm having trouble with BrowserStack, I'll try testing again soon.

@alexpensify
Copy link
Contributor

Tom helped me test on the native app and was able to replicate it.

@alexpensify alexpensify added the External Added to denote the issue can be worked on by a contributor label May 31, 2023
@melvin-bot melvin-bot bot changed the title iOS - Chat - "Edit comment" input field scrolls up when tap enter in 1st line of text [$1000] iOS - Chat - "Edit comment" input field scrolls up when tap enter in 1st line of text May 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 31, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0113571ce6c5a8b04e

@melvin-bot
Copy link

melvin-bot bot commented May 31, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 31, 2023

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 May 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 31, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

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

@alexpensify
Copy link
Contributor

Waiting for proposals

@alexpensify
Copy link
Contributor

@eVoloshchak - when you get a chance, please review the recent proposal. Thank you!

@alexpensify
Copy link
Contributor

@eVoloshchak - I realized that I bumped this GH over the weekend. Keep us posted if the proposal will work or if there are required edits.

@eVoloshchak
Copy link
Contributor

Huh, that is an interesting issue
Thanks for the bump, I did miss the one on the weekend!

@khaterdev's proposal looks promising, but I'm not 100% sure just yet and wanna do some testing. I'll get back with a review tomorrow

@melvin-bot
Copy link

melvin-bot bot commented Jun 7, 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
Copy link

melvin-bot bot commented Jun 7, 2023

@deetergp @alexpensify @eVoloshchak this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

Titozzz pushed a commit to facebook/react-native that referenced this issue Jun 18, 2024
…n prepending new lines to the text (#38679)

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

Multiline TextInput with a fixed height will scroll to the bottom of the screen when prepending new lines to the text.

### What is the root cause of that problem?

The issue is caused by iOS UITextView:
- The cursor moves to the end of the text when prepending new lines.
- Moving the cursor to the end of the text triggers the scroll to the bottom.

The behavior was reproduced on an iOS App (without react-native).
The example included below implements a Component RCTUITextView based on UITextView, which modifies the UITextView attributedText with the textViewDidChange callback (source code available in this [comment](Expensify/App#19507 (comment))).

Adding a new line on top of the UITextView on iOS results in:
Issue 1) The cursor moves to the end of TextInput text
Issue 2) The TextInput scrolls to the bottom

<details><summary>Reproducing the issue on an iOS App without react-native</summary>
<p>

<video src="https://user-images.githubusercontent.com/24992535/246601549-99f480f3-ce80-4678-9378-f71c8aa67e17.mp4" width="900" />

</p>
</details>

Issue 1) is already fixed in react-native, which restores the previous cursor position (on Fabric with  [_setAttributedString](https://github.com/fabriziobertoglio1987/react-native/blob/71e7bbbc2cf21abacf7009e300f5bba737e20d17/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm#L600-L610)) after changing the text.
Issue 2) needs to be fixed in react-native.

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

Setting the correct TextInput scroll position after re-setting the cursor.

## Changelog:

[IOS] [FIXED] - Fix Multiline TextInput with a fixed height scrolls to the bottom when changing AttributedText

Pull Request resolved: #38679

Test Plan:
Fabric (reproduces on controlled/not controlled TextInput example):

| Before    | After |
| ----------- | ----------- |
| <video src="https://github.com/facebook/react-native/assets/24992535/e06b31fe-407d-4897-b608-73e0cc0f224a" width="350" />      | <video src="https://github.com/facebook/react-native/assets/24992535/fa2eaa31-c616-43c5-9596-f84e7b70d80a" width="350" />       |

Paper (reproduces only on controlled TextInput example):

```javascript
function TextInputExample() {
  const [text, setText] = React.useState('');

  return (
    <View style={{marginTop: 200}}>
      <TextInput
        style={{height: 50, backgroundColor: 'white'}}
        multiline={true}
        value={text}
        onChangeText={text => {
          setText(text);
        }}
      />
    </View>
  );
}
```

| Before    | After |
| ----------- | ----------- |
| <video src="https://github.com/facebook/react-native/assets/24992535/6cb1f2de-717e-4dce-be0a-644f6a051c08" width="350" />      | <video src="https://github.com/facebook/react-native/assets/24992535/dee6edb6-76c6-48b0-b78f-99626235d30e" width="350" />       |

Reviewed By: sammy-SC, cipolleschi

Differential Revision: D48674090

Pulled By: NickGerleman

fbshipit-source-id: 349e7b0910e314ec94b45b68c38571fed41ef117
@dangrous
Copy link
Contributor

okay great! looks like we'll be in 0.75. Progress!

image

@fabOnReact
Copy link
Contributor

Update 13 June 2024

cc @dangrous

The commit was cherry picked in 0.74. Thanks

@dangrous
Copy link
Contributor

Oh okay awesome! So basically we're just waiting for our own upgrade to RN 0.74?

@fabOnReact
Copy link
Contributor

fabOnReact commented Jun 25, 2024

@dangrous Yes. It was picked in 0.74.3. https://github.com/orgs/reactwg/projects/5/views/3?filterQuery=Multiline.
The changes are in the branch 0.74.3

@alexpensify
Copy link
Contributor

Monthly Update: I think we are still waiting for 0.74

@dangrous
Copy link
Contributor

dangrous commented Aug 6, 2024

Looks like the 0.74 upgrade is nearly ready to merge!

@dangrous dangrous changed the title [HOLD FB #38679] [$1000] iOS - Chat - "Edit comment" input field scrolls up when tap enter in 1st line of text [$1000] iOS - Chat - "Edit comment" input field scrolls up when tap enter in 1st line of text Aug 8, 2024
@dangrous
Copy link
Contributor

dangrous commented Aug 8, 2024

Updated the title since we're not on hold anymore, just waiting for the merge

@alexpensify
Copy link
Contributor

@dangrous should we move this to Weekly now?

@dangrous
Copy link
Contributor

dangrous commented Aug 8, 2024

I'm not quite sure how long it's going to be... I guess we could update to hold for #37374 instead?

Copy link

melvin-bot bot commented Aug 8, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@dangrous
Copy link
Contributor

dangrous commented Aug 9, 2024

Why is melvin talking about proposals? That's weird. I'll put it on hold for that PR to stop that from happening.

@dangrous dangrous changed the title [$1000] iOS - Chat - "Edit comment" input field scrolls up when tap enter in 1st line of text [HOLD #37374][$1000] iOS - Chat - "Edit comment" input field scrolls up when tap enter in 1st line of text Aug 9, 2024
@dangrous
Copy link
Contributor

ooh okay so we just merged to RN 0.75 (which presumably includes the changes in 0.74). Can we retest this and hopefully finally close?

@dangrous dangrous changed the title [HOLD #37374][$1000] iOS - Chat - "Edit comment" input field scrolls up when tap enter in 1st line of text [$1000] iOS - Chat - "Edit comment" input field scrolls up when tap enter in 1st line of text Aug 26, 2024
@dangrous
Copy link
Contributor

oh wait it's not on staging yet so we can't test yet. But soooooon

@dangrous
Copy link
Contributor

on staging I think! Let's test and close out, if we can!

@alexpensify
Copy link
Contributor

Heads up, I will be offline until Tuesday, September 3, 2024, and will not actively watch over this GitHub during that period.

If anything urgent is needed here, please ask for help in the #expensify-open-source Slack Room-- thanks! If we can wait, I can work on the payment process next week.

@fabOnReact
Copy link
Contributor

I don't have a computer. My laptop is at Apple Service. Sorry

IMG-20240828-WA0013.jpg

@dangrous
Copy link
Contributor

Confirmed tested on iOS staging! We should be good (finally) for payment! @alexpensify is out until 9/3, but ready when you're back!

@dangrous dangrous changed the title [$1000] iOS - Chat - "Edit comment" input field scrolls up when tap enter in 1st line of text [Ready for Payment][$1000] iOS - Chat - "Edit comment" input field scrolls up when tap enter in 1st line of text Aug 28, 2024
@alexpensify alexpensify added Daily KSv2 and removed Monthly KSv2 labels Sep 3, 2024
@melvin-bot melvin-bot bot added the Overdue label Sep 3, 2024
@alexpensify
Copy link
Contributor

@dangrous, thanks for the update! Tomorrow, I'll start working on the payment process.

@melvin-bot melvin-bot bot removed the Overdue label Sep 3, 2024
@alexpensify
Copy link
Contributor

alexpensify commented Sep 4, 2024

Payouts due: 4 September 2024

Upwork job is here.


@fabOnReact in Upwork says this project was paid in August 2023. Can you please double-check and reply if Upworks's information is inaccurate? Thanks! For now, I'm going to close this GH.

@JmillsExpensify
Copy link

$1,000 approved for @eVoloshchak

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 Engineering External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Status: No status
Development

No branches or pull requests

8 participants