-
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
fix wrong height calculation in android modal with statusBarTranslucent #14704
fix wrong height calculation in android modal with statusBarTranslucent #14704
Conversation
@arosiclair @mollfpr 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] |
@@ -107,7 +107,7 @@ class BaseModal extends PureComponent { | |||
hasBackdrop={this.props.fullscreen} | |||
coverScreen={this.props.fullscreen} | |||
style={modalStyle} | |||
deviceHeight={this.props.windowHeight} | |||
deviceHeight={this.props.windowHeight + ((this.props.statusBarTranslucent && StatusBar.currentHeight) || 0)} |
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.
Can you just add a small comment on how this fixes android?
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.
// When `statusBarTranslucent` is true on Android, the modal fully covers the status bar.
// Since `windowHeight` doesn't include status bar height, it should be added in the `deviceHeight` calculation.
How about this?
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.
Added some small edits to your snippet. Should be good now 👍
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. Checklist is all yours @mollfpr
@arosiclair Thanks for taking the review quickly! Yup, I'm on it the checklist now! |
Reviewer Checklist
Screenshots/VideosWeb14704.Web.movMobile Web - Chrome14704.mWeb.Chrome.MP4Mobile Web - Safari14704.mWeb.Safari.mp4Desktop14704.Desktop.moviOS14704.iOS.mp4Android14704.Android.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.
Ready to merge @arosiclair
Performance Comparison Report 📊Significant Changes To DurationThere are no entries Meaningless Changes To DurationShow entries
Show details
|
🚀 Deployed to staging by https://github.com/arosiclair in version: 1.2.64-2 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.64-7 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.64-7 🚀
|
1 similar comment
🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.64-7 🚀
|
Details
Include status bar height in
deviceHeight
calculation whenstatusBarTranslucent
prop set totrue
inModal
Fixed Issues
$ #14563
PROPOSAL: #14563 (comment)
Tests
Offline tests
Cannot test in offline mode because "Add Payment method" is disabled
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.mov
Mobile Web - Chrome
mchrome.mp4
Mobile Web - Safari
msafari.mp4
Desktop
desktop.mov
iOS
ios.mp4
Android
android.mp4