-
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
Fix - Chat - Compose box stays in the middle when reduced with a several lines message #50520
base: main
Are you sure you want to change the base?
Fix - Chat - Compose box stays in the middle when reduced with a several lines message #50520
Conversation
@rayane-djouah Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
still working on native behaviour 👍 |
@FitseTLT Any update? |
@rayane-djouah, I am having difficulty scrolling the text input imperatively on native, unlike the web case. There is neither |
Will check on my end and let you know |
@FitseTLT The bug reported in #49541 (comment) is not reproducible on native platforms. Therefore, I believe we should maintain the current behavior for native. |
But @rayane-djouah I am seeing the same problem as the OP in IOS, for instance, 2024-10-22.16-03-05.mp4 |
Oh, so this bug is specific to iOS native? Then we need to find a solution for it. |
@rayane-djouah I have managed to scroll to cursor position, to indirectly solve the problem on native. Look at the results, I have now uploaded the native screenshots in OP, and let me know your opinion. |
@FitseTLT Jest tests and performance tests are failing |
@FitseTLT The solution is not working for me on iOS native: Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-11-01.at.20.23.04.mp4 |
Fixed I suspect it is related with regression caused by the bridge less pr solved it by giving some delay 2024-11-01.23-03-11.mp4 |
Hey @rayane-djouah I have been exploring how to programmatically scroll text inputs on natives and I found that we need to add scroll view for android, for instance, here |
@FitseTLT I will post an update today, could you please resolve the conflicts meanwhile? Thanks! |
@rayane-djouah resolved |
@Expensify/design We've addressed the issue as detailed in this comment. However, due to platform constraints on iOS native, we're unable to directly align the scroll position to the bottom of the composer bar, it's always aligned to the top by default. As a workaround, we've implemented a solution to programmatically scroll the input, which introduces a scrolling animation. Could you please review the two videos comparing the behavior before and after the fix? We would like your feedback on whether the scrolling animation is acceptable.
|
It feels a little teeny tiny bit weird to me, but I think I still prefer it over losing visibility of my cursor. Keen for the other designers to weigh in. |
Yup, I agree with that. Feels like an improvement for sure though! |
Agree with you both |
@FitseTLT There are merge conflicts |
Resolved @rayane-djouah |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and tests well 👍
return; | ||
} | ||
|
||
// We need the delay for setSelection to properly work for IOS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind putting a little more effort into this comment? We now have a great detailed explanation that should be easy to summarize. “We need the delay for setSelection to properly work for IOS” doesn’t really explain anything at all except that it's a platform workaround for some unknown issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry but we still don't know the correct root cause. can you suggest a comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this?
// We need the delay for setSelection to properly work for IOS in bridgeless mode due to a react native internal bug of dispatching the event before the component is ready for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah is there some kind of issue related to the bug that you can link? It sounds like we might be able to clean this up in the future.
Details
Fixed Issues
$ #49541
PROPOSAL: #49541 (comment)
Tests
Offline tests
Same as above
QA Steps
Same as above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
2024-10-23.19-07-45.mp4
Android: mWeb Chrome
aw.mp4
iOS: Native
2024-10-23.18-47-28.mp4
iOS: mWeb Safari
iw.mp4
MacOS: Chrome / Safari
w.mp4
MacOS: Desktop
d.mp4