-
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 for: mWeb/Chrome - Payment - The keyboard overlaps the "Make default payment method" button #14725
Conversation
@jasperhuangg @aimane-chnaif 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] |
KeyboardSpacer.displayName = 'KeyboardSpacer'; | ||
|
||
export default withWindowDimensions(KeyboardSpacer); | ||
export default KeyboardSpacer; |
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.
We can remove this file.
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.
@Ollyws Now that this file is removed, we may need to change comment in index.js
On non native platforms we do not need to implement a keyboard spacer, so we return a null component.
to something like this:
On non iOS platforms we do not need to implement a keyboard spacer, so we return a null component.
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.
@aimane-chnaif All done.
@@ -478,6 +480,7 @@ class BasePaymentsPage extends React.Component { | |||
)} | |||
</Popover> | |||
<PasswordPopover | |||
disableCoverScreen |
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.
let's add comment what this prop is for
@Ollyws Also, please pull from latest |
@aimane-chnaif All done. Thanks! |
@Ollyws I have feedback so far:
msafari.mp4Entire payments page shifts up and then down.
I see some more padding between button and keyboard than before: |
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.
Mostly looks good! Just a few minor comments, and please address @aimane-chnaif's feedback
@aimane-chnaif Thanks for the feedback. I can't seem to replicate the iOS native padding issue, Is this occuring on the emulator or a real device? |
emulator. did you compare with production version? |
@aimane-chnaif Ah yes I see. We could update the value of CONST.IOS_KEYBOARD_SPACE_OFFSET to compensate, a value of
Could you clarify what you meant here? I didn't quite understand. Thanks. |
glitch.mov@Ollyws you see page glitches in this video? |
@aimane-chnaif Yes but did you mean you think it's unfixable? In that case what would be the best course of action? |
That never happens on native app. So it's ideal if we could fix it to be like native app. |
@aimane-chnaif It would be ideal. However, on production the behaviour on Safari is slightly different to Native in that it pushes the entire screen up when they keyboard opens. Obviously we are now offsetting this using |
@aimane-chnaif After some research it seems like it's an issue with the fact it's a child of |
@jasperhuangg what do you think about this? |
@aimane-chnaif @Ollyws I agree that we should try diff 2 |
@Ollyws let's update code accordingly |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.mp4Mobile Web - Safarimsafari.mp4Desktopdesktop.moviOSios.mp4Androidandroid.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.
Latest code changes look good to me and tests work as expected, except 3 issues I mentioned above.
@Ollyws is there really no way to fix these issues before merging this PR? Like disabling scroll while the modal is open? |
@jasperhuangg I don't think so unfortunately. It's similar to this issue, which they decided was a seperate issue when merging their PR. |
@Ollyws Looks like this is already a known issue and could potentially be fixed by solving that other issue later on. That makes sense. Thanks @aimane-chnaif for clarifying. Let's also update #14718 to include the fact that this issue will crop up in the make default payment method modal once this PR is merged/deployed. |
src/components/Modal/BaseModal.js
Outdated
@@ -77,6 +77,7 @@ class BaseModal extends PureComponent { | |||
}, | |||
this.props.popoverAnchorPosition, | |||
this.props.containerStyle, | |||
this.props.extraModalStyles, |
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 don't really like the name extraModalStyles
, can we come up with something a bit more descriptive?
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.
Sure, any suggestions?
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.
@jasperhuangg customModalStyles?
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.
@aimane-chnaif Any ideas?
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.
Since this is already Modal, no need to label Modal
I think.
So maybe something like customContainerStyle
?
All yours @jasperhuangg
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 for your patience guys have been out sick.
I like outerStyle
? And I think we can rename containerStyle
to innerContainerStyle
since the container those styles are being applied to lives inside the modal.
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.
@jasperhuangg sorry, hope you'd feel better now.
Good suggestion. I agree with that approach. But how about contentContainerStyle
since this name is more common and already used in other places?
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.
@jasperhuangg No worries, hope you're feeling better.
outerStyle
and innerContainerStyle
make sense to me, just give me the word and I'll implement these changes.
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.
@jasperhuangg sorry bump, can you please confirm the preferred name soon? Hope delay for waiting this won't affect timeline
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.
@Ollyws yeah go ahead! Sorry for the delay
Sure. That issue is locked so can you please do that in behalf? |
@aimane-chnaif will do once this is deployed! |
@jasperhuangg gentle bump! |
@Ollyws please fix conflicts |
@aimane-chnaif All fixed. |
Once we have better naming of |
@jasperhuangg just to confirm again: you're suggesting |
@aimane-chnaif I believe he was. Names updated. |
✋ 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/jasperhuangg in version: 1.2.69-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.2.69-2 🚀
|
Details
Fixed Issues
$ #14003
PROPOSAL: #14003 (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.Screenshots/Videos
Web
MacOS_Chrome.mp4
Mobile Web - Chrome
Android_Chrome.mp4
Mobile Web - Safari
iOS_Safari.mp4
Desktop
MacOS_Desktop.mp4
iOS
iOS_Native.mp4
Android
Android_Native.mp4