-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 facebook/react-native#46411[$250] iOS - Chat - Composer not auto scrolled to the bottom when editing message with 10 line breaks #48122
Comments
Triggered auto assignment to @deetergp ( |
👋 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:
|
Production: Bug6584462_1724784043018.prod.mp4 |
Nothing in the deploy checklist jumps out at me as the cause of this. But I also think it isn't significant enough to block on, so I am going to remove the blocker label, set to Daily, and make it External. |
Job added to Upwork: https://www.upwork.com/jobs/~01c809bc476538a5ae |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra ( |
Triggered auto assignment to @VictoriaExpensify ( |
@MrRefactor @WoLewicki Can you please look into this? |
I will use a combination of ref and the setNativeProps method to programmatically set the cursor position. |
📣 @bigshoesdev! 📣
|
ProposalPlease re-state the problem that we are trying to solve in this issue.iOS - Chat - Composer not auto scrolled to the bottom when editing message with 10 line breaks What is the root cause of that problem?We do not wrap the compose text input inside the ScrollView and we do not auto scroll to the end inside the input What changes do you think we should make in order to solve the problem?We can wrap the compose input inside the ScrollView and link the ScrollView to useRef and invoke the scrollEnd function What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Compose box is not auto scrolled to the end of the message, 6th is the last line visible to the user What is the root cause of that problem?This issue happen on native TextInput in iOS, but not Android. The reason is because in Android, when we set Unfortunately, we don't have the same mechanism in the iOS. We only call What changes do you think we should make in order to solve the problem?Based on this: facebook/react-native#38679, we can add a function in - (void)scrollCursorIntoView {
// Assuming you have a UITextView or similar text input view
UITextRange *selectedRange = _backedTextInputView.selectedTextRange;
// Updating the UITextView attributedText, for example changing the lineHeight, the color or adding
// a new paragraph with \n, causes the cursor to move to the end of the Text and scroll.
// This is fixed by restoring the cursor position and scrolling to that position (iOS issue 652653).
if (selectedRange.empty) {
// Maintaining a cursor position relative to the end of the old text.
NSInteger offsetStart = [_backedTextInputView offsetFromPosition:_backedTextInputView.beginningOfDocument
toPosition:selectedRange.start];
[_backedTextInputView scrollRangeToVisible:NSMakeRange(offsetStart, 0)];
}
} And add the calls when the text view is being auto focused or focused programmatically here ....
[_backedTextInputView becomeFirstResponder];
[self scrollCursorIntoView];
.... What alternative solutions did you explore? (Optional) |
Asked for 2nd opinion here https://expensify.slack.com/archives/C066HJM2CAZ/p1725018537186099 |
@dominictb Can you create an upstream PR to fix this? |
This is just a pure chat bug, moving to #vip-vsb. |
@dominictb I think you need to repro this issue on react-native test app. And file this as bug there too. |
Alright, I'll file an issue in the upstream repo. I could reproduce the bug in the their example app. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@deetergp @VictoriaExpensify @shubham1206agra 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! |
Since this is an upstream bug and out of our control, I'm going to demote it to weekly and check back at that cadence. |
Thanks for filing the bug @dominictb. Can you link it here? |
Hmm, I'm not sure we need to file an issue in the upstream repo. I take a look at this PR facebook/react-native#38679 and it doesn't link to any github issue. Also check the contributing guideline there and saw no requirement of creating issue before submitting PR However, I added some more reproduction steps and video here, hoping that it is clearer for the reviewer. Let's wait for their feedback then. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
1 similar comment
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@shubham1206agra @deetergp can I get assigned here? My PR is being reviewed by the Meta team. Thank you! |
@deetergp @VictoriaExpensify @shubham1206agra this issue is now 4 weeks old, please consider:
Thanks! |
📣 @shubham1206agra 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @dominictb 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@VictoriaExpensify Can you add [HOLD for facebook/react-native#46411] to indicate we're holding for the upstream PR? |
This issue has not been updated in over 15 days. @deetergp, @VictoriaExpensify, @shubham1206agra, @dominictb eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
@dominictb Hold added |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.25-8
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4895266
Email or phone of affected tester (no customers): applausetester+ak827@applause.expensifail.com
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
Compose box should be auto scrolled to the bottom of the message, the end of the message should be visible.
Cursor should be placed at the end of the message
Actual Result:
Compose box is not auto scrolled to the end of the message, 6th is the last line visible to the user
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6584462_1724784043034.staging.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @shubham1206agraThe text was updated successfully, but these errors were encountered: