-
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
Keyboard is visible for a brief moment on request/send money page after getting back from currency search page #15205
Keyboard is visible for a brief moment on request/send money page after getting back from currency search page #15205
Conversation
…er getting back from currency search page
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.
This is looking good to me! I have noticed there is a slight delay for the numpad to go down on iOS Safari not sure if that is on main as well.
@0xmiroslav there was also an alternative proposal to add this listener to the ScreenWrapper so this handles all the pages. From the linked issue:
We can solve issue in 2 ways - globally and locally.
For global one - we can add subscription to event beforeremove inside ScreenWrapper class and add in compose withKeyboardState HOC - which will guaranty that keyboard will be closed on any screen which was wrapped in ScreenWrapper
For local one - doing the same steps - but only under IOUCurrencySelection class
Curious what do you think of it @0xmiroslav? I am just worried we might not be able to catch some issues this might cause on some other pages, but it might be better to move this level up, what do you think?
Yup for safari on mobile it's the same on main branch. Happened because keyboard is coming from device, and when it's closing, web receive this info with delay and re-build UI. As a workaround it can be fixed using setTimeout - but that's may cause some issues on slow devices |
Thanks for the context 🙇 I think we dont have to worry about this then! |
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.
@0xmiroslav I have asked @narefyev91 to move the logic up but if you have any concerns, feel free to raise them.
Would be great to test some other screens which this might influence it
add spacing Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
reviewing today |
First of all, this issue is duplicated with #13449 which is on hold for navigation reboot. I have some feedback about current code changes: Regarding general solution:
Regarding possible regression:
My suggestion:
I like this general solution and this is implemented already in current PR. |
@0xmiroslav thank you very much!
I think in near future we could have form flow where there could be multiple pages in row which will also have autofocus in it, so I think we might want to get ready for that. Then the props would be useful I imagine. @narefyev91 Could you try to implement the |
@narefyev91 there is also merge conflict |
# Conflicts: # src/components/ScreenWrapper/index.js
@mountiny @0xmiroslav Yup i get you guys - btw we could not really worried about navigation between screen - navigation event handler will unmount keyboard before moving to next screen and in case based on your paradigm and controlling directly focus event in didMount such issues will not be happened Screen.Recording.2023-02-22.at.15.58.19.mov |
yes, I had this concern below but I confirmed that keyboard dismisses instantly when navigate to new screen, unlike when navigate to previous screen which is already mounted: Actually, this is android issue. On iOS, keyboard dismisses instantly always - either navigating to previous or next |
yup - that's totally makes sense - @0xmiroslav @mountiny added additional prop to handle event handlers - let me know - if that works! |
Thanks everyone! @0xmiroslav will you be able to go through the PR review checklist? |
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.
Codewise looks good to me!
@mountiny @0xmiroslav pushed description for prop |
msafari.mp4The issue is still reproducible in mWeb as mentioned before. |
That will be pretty tricky to find a way to fix that on mWeb. We may not block this current fix for android and I will start investigating mWeb issue - it happened in different places in the app. And to find global fix will be very hard - I will do a workaround inside currency screens, and will keep posted what I will find |
@0xmiroslav I think we have confirmed though that behaviour is same on |
@narefyev91 More conflicts, can you please resolve those? |
# Conflicts: # src/components/ScreenWrapper/index.js # src/components/ScreenWrapper/propTypes.js
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.mp4Desktopdesktop.moviOSios.mp4Androidandroid.mov |
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.
This is android fix only.
Other platforms just keep same behavior as production.
Known that mWeb issues are difficult to fix, we agreed they are considered as separate 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.
One NAB
update words Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
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.
Thanks!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Performance Comparison Report 📊Significant Changes To DurationThere are no entries Meaningless Changes To DurationShow entries
Show details
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.2.77-0 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.2.77-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.2.77-4 🚀
|
Details
Implement new event handler for navigation which will close keyboard before user will go out from the screen
Fixed Issues
$ #15085
$ #15085 (comment)
Tests
Offline tests
This feature doesn't change or is impacted by offline mode.
QA Steps
Same as above.
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
Screen.Recording.2023-02-16.at.12.22.18.mov
Mobile Web - Chrome
device-2023-02-16-113949.mp4
Mobile Web - Safari
Screen.Recording.2023-02-16.at.11.58.19.mov
Desktop
Screen.Recording.2023-02-16.at.12.24.49.mov
iOS
Screen.Recording.2023-02-16.at.12.20.10.mov
Android
device-2023-02-16-113435.mp4