-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fixed: Chat header goes out of the view after opening keyboard #13801
Conversation
@pecanoro @mananjadhav One of you needs to 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] |
@s77rt The Android error means that you already have another upgraded version installed. Can you uninstall the existing one in your device/emulator and attempt to run it again ? |
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.
Changes look fine, I am going to test these today.
@mananjadhav Indeed uninstalling the App did solve the Android installation issue. I was not expecting this kind of issue since I'm expecting to upgrade the App not downgrade it. Anyway, I have updated the test video for Android. |
@mananjadhav Can you complete the reviewer list and add videos for the other platforms? I will add whatever is missing due to the problems with the IPs. |
Okay sure rest I did check everything, so I'll update the checklist and screencasts in a few mins. |
I get a weird glitch with scrolling: Monosnap.screencast.2022-12-28.20-51-50.mp4 |
@pecanoro I think that's expected to happen since you are scrolling the view. Can you try scroll a chat with messages and scroll the messages and not the view |
@mananjadhav are you able to reproduce the weird glitch? |
@s77rt I don't see the same behavior in any of the platforms, so I would say it is not expected. Can you see the thing happening on the native apps? I couldn't but maybe I missed something. |
I meant it's expected based on the implemented code. Other platforms don't have same behavior because only android Chrome shifts the view on scroll. On Safari the view will be shifted on resize event so scrolling have no effect. Did you test this with a chat with messages? If you scroll the messages you should not experience that weird behavior. I don't think we can prevent the behavior but maybe we should wrap the call in a debounce function so the header is only set on top after you stop scrolling (maybe after 1 second delay). |
@pecanoro In
With
And
With
|
So I was finally able to test this on mobile web. @s77rt I am able to reproduce the glitch that @pecanoro shared the video of. While applying chat-header-ios-chrome-scroll-issues.MP4Please check the behavior of the Header when the keyboard hides/shows or we scroll. |
@mananjadhav I don't think we have much options here. For now I think debounce with minimal timer should be enough (1000ms is too much, try with 100ms) Maybe bring this to slack? |
Here is a video of a chat with more messages, and the same weird glitch. Though I am getting a weird behavior with the keyboard and I am not sure if it's coming from main or it's just the emulator. Monosnap.screencast.2023-01-04.12-01-08.mp4 |
@pecanoro You are still scrolling the view. Are you testing after applying the debounce function? PS: The space between the keyboard and the composer is another issue, I'm sure I seen it in GH not sure what we decided on it though. |
@s77rt Are you suggesting this exists in the main/staging/production too? If yes then we can ignore, but if not then whether we scroll View/Header/Message, etc. we don't want unwanted surprises with our change here. |
@mananjadhav What I meant is scrolling the view will trigger the header to be set on top (apply marginTop). If we don't trigger the callback on scrolling the view then the header will stay out of view (recreating the issue) |
It used to work fine earlier. This should work correctly, doesn't matter if the user is scrolling the view. I have tested this on a real device and it is definitely not expected. |
@thesahindia Are you saying that the chat header was always staying at the top (on Android Chrome)? If that's not what you meant then here what I have in mind since I can't reproduce the scroll issue reliability, create a slack discussion to see how we should move forward:
|
@s77rt I agree with what @thesahindia mentioned. I think @pecanoro and I've posted videos along with the behaviours. Can you please help us with the updates on fixes for the same? |
@mananjadhav Isn't the debounce fix enough? I don't have any other solution in mind especially that I can't really reproduce the behaviour on my side |
@pecanoro Yes, but if it's not much trouble can you actually try apply that PR (it's only one line change) so we can be sure it will fix the glitch. Otherwise putting on hold is okay |
@s77rt Would you mind merging this PR with the main branch so anyone can test this and see it's working? It's been a month so let's make sure the code is up to date. |
@pecanoro Updated the branch. Looks there is no conflicts here. |
@mananjadhav When you have some time, can you test the PR and fill out the reviewer list again? Also last time we were having some problems with the IPs and you should be able to add screenshots for all platforms. @s77rt Do you mind updating the description with updated videos to show it's working without glitches now, please? |
@pecanoro I never experienced the glitch from my side and the emulator is not effected by this issue at all.. Can we just relay on @mananjadhav 's checklist videos for this one? |
@s77rt I was looking at the videos you posted originally, and you can briefly see how the header jumps when you open the keyboard so the video needs to be updated so we can see that's not happening anymore. |
@pecanoro Ah yes, that's something that has been changed. Alright will update the videos soon. |
Updated the videos (keyboard related) Tests must be done on physical devices. On Simulators/Emulators works fine. |
I've tested and this works fine for me. I didn't see the glitch on my Android device (but my device is a bit slower). @pecanoro I've uploaded the screencasts and completed the checklist. All yours. |
Reviewer Checklist
Screenshots/VideosWebweb-chat-header-view.movMobile Web - Chromemweb-android-chrome-chat-header-view.mp4Mobile Web - Safarimweb-ios-chrome-chat-header-view.mp4mweb-safari-chat-header-view.mp4Desktopdesktop-chat-header-view.moviOSios-chat-header-view.movAndroidandroid-chat-header-view.mov |
I deleted the comment of the previous checklist because I think GH actions are getting confused 🤔 |
It seems to work fine for me without glitches except for Safari on iOS. However it's not the same as before, the header disapears a moment to be placed properly again. Funny thing is that only happens the first time I open the keyboard, after the first one, everything works as expected. I am not sure if it's a glitch only happening on emulator or a real device as well. |
@mananjadhav @pecanoro What's the status on this? And what about the timeline, did it reset after the other mentioned PR got merged? |
Let me retest again, I think I still find that super small glitch on Safari, but not sure if it's just Safari behavior. Either way, we have conflicts, if you can fix them, it would be great. |
This is interesting, but I think this new code does not change the behavior at all. Behavior in |
@pecanoro Resolved the conflicts. Last time I checked it seemed to work fine, and looking at @mananjadhav uploaded videos it seems fixed too. Can you double check from your side? |
I can see the small jump on the keyboard even on @mananjadhav's video on Safari, right when you open it or close it, then it works just fine. Though again, I think this PR didn't change the behavior of main. |
@pecanoro Just noticed. I think that's out of the scope of the issue. This was the case for the very first time the page was implemented. I don't think we can get rid of the jump behaviour, if that was possible we wouldn't even had to add the |
@s77rt Either way, even if we omit that detail, these changes don't change any behavior from main, it is actually the same. |
@pecanoro This PR targets Android. I think the behaviour is different on Android. Can you please test on that instead? |
Yes, nothing changes for Android, it works just fine on main. |
@pecanoro I understand that the chat header remains on view after opening the keyboard, is that right? If so then we can close both this PR and the issue. But let's get a confirmation from @mananjadhav for the same. Also per the latest comment here we may end up holding the issue again before making any further decision. |
@mananjadhav @pecanoro
Details
Fixed Issues
$ #13491
PROPOSAL: #13491 (comment)
Tests
Offline tests
N.A
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.Screenshots/Videos
Web
web.mp4
Mobile Web - Chrome
mweb-chrome.mp4
Mobile Web - Safari
mweb-safari.mp4
Desktop
desktop.mp4
iOS
ios.mp4
Android
android.mp4