-
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
[CP Staging] fix: remove using StatusBar height #55082
[CP Staging] fix: remove using StatusBar height #55082
Conversation
@ZhenjaHorbach Please 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] |
Reviewer Checklist
Screenshots/VideosAndroid: Native2025-01-10.18.16.07.movAndroid: mWeb ChromeNA iOS: NativeNA iOS: mWeb SafariNA MacOS: Chrome / SafariNA MacOS: DesktopNA |
It really works ! 2025-01-10.18.16.07.mov |
🚧 @mountiny has triggered a test build. You can view the workflow run here. |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
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.
Its not obvious why this change was needed it probably was some other issue with paddings, but seems like its safe to remove and worst case there will be too much inset at top
…nsets-on-android [CP Staging] fix: remove using StatusBar height (cherry picked from commit 15f0b50) (CP triggered by thienlnam)
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Cherry-picked to staging by https://github.com/thienlnam in version: 9.0.83-3 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.83-5 🚀
|
Explanation of Change
In scenario when the HybridApp is freshly installed, there is a bug that when the OD is starting, at the same time RN activity is run, resolving in executing the JS bundle which in turn loads modules. One of them (probably more so until we find a fix for early RN start, bugs can appear quite randomly),
StatusBar
, needscurrentActivity
to get its height: https://github.com/facebook/react-native/blob/fd0894b1c7fcb20dd213ec1e93aafef25935d709/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.kt#L49. It fails due to activity not being visible (?) so it returns0
as its height. This value is then read in the file changed by the PR, resulting in no top padding.I couldn't find a reason why those values are used at all when we have
SafeAreaProvider
that returns correct values, so I just removed it for now. cc @hannojg @chrispader since I saw you touched that code recently (#53223).Hopefully it fixes the same issue that happens only on ND, maybe those values are incorrect there too in some weird scenarios. Please try and test it.
Fixed Issues
$ #54988
PROPOSAL:
Tests
Offline tests
N/A
QA Steps
N/A
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop