-
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
Viewport jumping up #16443
Viewport jumping up #16443
Conversation
@hayata-suenaga @thesahindia 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] |
@gedu thank you for the quick PR. I was wondering if the original issue is the IOU amount page specific. as we discussed before, this jumping issue might exist on other screens, too. |
@hayata-suenaga |
@gedu thank you for the detailed explanation. I think we can find and fix all places where this issue is observed. |
@hayata-suenaga do you mean in this PR or on follow-up PRs? |
@gedu I believe we should handle all similar issues in your PRs as the root cause is the same among them. |
@hayata-suenaga I went through the app and found 2 places that I think make sense to add this new flag, Report List, and Profile screen, I'm adding videos so you can see the before and after BeforeLHN_before.mp4AfterLHN_after.mp4BeforeProfile_before.mp4AfterProfile_after.mp4 |
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! @thesahindia could you also review this one, please?
@hayata-suenaga I was looking at some edit comment issues and saw this behavior, I think we should apply this fix to the ReportScreen BeforeReport_before.mp4AfterReport_after.mp4 |
# Conflicts: # src/pages/home/ReportScreen.js
Didn't get enough time today to review this PR. It's EOD for me. I will get to this in the morning. |
@gedu good catch! |
@hayata-suenaga is all ok? is something that I can help with? |
@gedu could you check this comment? |
@hayata-suenaga replied |
Received the list of which screens the button should avoid the keyboard. Working on them |
# Conflicts: # src/pages/iou/IOUModal.js
@gedu please ping @thesahindia and me when you're ready for the review again 🙂 |
# Conflicts: # src/pages/iou/MoneyRequestModal.js
Fixed the conflicts, the comment and fixed MoneyRequestDescriptionPage so the save button moves up |
@@ -44,6 +48,7 @@ const defaultProps = { | |||
onEntryTransitionEnd: () => {}, | |||
modal: {}, | |||
keyboardAvoidingViewBehavior: 'padding', | |||
shouldEnableMaxHeight: !DeviceCapabilities.canUseTouchScreen(), |
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.
@gedu, why aren't we using false
here?
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.
Because the issue was reported mainly on web mobile, so I wanna leave the behavior for web as is just in case, but I think it can be false
, should I change 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.
Yes. We should use false
.
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.
Updated
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-04-18.at.2.22.47.AM.movMobile Web - ChromeScreen.Recording.2023-04-18.at.12.57.46.AM.movMobile Web - SafariScreen.Recording.2023-04-18.at.12.43.55.AM.movDesktopScreen.Recording.2023-04-18.at.1.01.21.AM.movAndroidScreen.Recording.2023-04-18.at.12.58.54.AM.mov |
Looks good. Will approve once #16443 (comment) gets resolved. |
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.
It's probably discussed previously, but could you remind me again why we're not using enabled
prop of KeyboardAvoidingView
and instead setting maxHeight
?
I believe it doesn't work on ios safari (tested just now), I think that's why we used |
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.
Looks good and works well!
All yours @hayata-suenaga
for a moment, I completely forgot the purpose of this PR. please never mind the above question. |
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
NAB: just a question
does anybody know why we're not using flex: 1
and instead using maxHeight
on KeyboardAvodingView?
Congrats, that’s your 5th PR merged! 🎉 Do you know about the ContributorPlus role? It’s an opportunity to earn more in the Expensify Open Source community. Keep up the great work - 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. |
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.3.4-0 🚀
|
Hey, looks the PR didn't fix all the instances of the view port jump behaviour on the request money page, we got another report here #17866 |
@@ -109,7 +111,7 @@ class ScreenWrapper extends React.Component { | |||
paddingStyle, | |||
]} | |||
> | |||
<KeyboardAvoidingView style={[styles.w100, styles.h100, {maxHeight: this.props.windowHeight}]} behavior={this.props.keyboardAvoidingViewBehavior}> | |||
<KeyboardAvoidingView style={[styles.w100, styles.h100, {maxHeight}]} behavior={this.props.keyboardAvoidingViewBehavior}> |
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.
No inline styles cc: @thesahindia
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.4-0 🚀
|
The linked issue seems to be a little bit different from the original issue (button jumps to the bottom vs. keyboard jumps to the top). @gedu @thesahindia could one of you check if this is a regression caused from this PR? |
nudging @thesahindia and @gedu about ^ regression question so we can determine if we should move forward with this job as a separate fix. Thanks! |
Ahh sorry, I forgot to comment here. Actually I wasn't able to repro the issue and I don't think it is a regression from this PR. |
The purpose of this PR was fixing the jump issue on ios safari. |
We didn't handle all the pages that needs the |
Details
Added a new prop to
ScreenWrapper
which lets you ignore the change added in this ticket. This new prop will make the component use 100% height. So on screens that you don't want the components get moved up by the Keyboard in this case you will have to setlockHeight
to trueFixed Issues
$ #15270
PROPOSAL: #15270 (comment)
Tests
Offline tests
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.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
Web
noJumpingChrome.mp4
noJumpingSafari.mp4
Mobile Web - Chrome
noJumpingChromeMobile.mp4
Mobile Web - Safari
noJumpingSafariMobile.mp4
Desktop
noJumpingDesktop.mp4
iOS
noJumpingIphone.mp4
Android
noJumpingAndroid.mp4