Open m-natarajan opened 3 weeks ago
Triggered auto assignment to @johncschuster (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
i guess this https://github.com/Expensify/App/pull/44048 might be offending PR.
cc @tienifr @alitoshmatov
I don't think so, because your linked PR hasn't hit staging yet and I reported this bug last week from Staging.
oh i didn't check PR status assumed its on stag. sorry for false alert. ~But may be that has fixed it? i'll check on dev~
Here's the offending PR: https://github.com/Expensify/App/pull/42592 (hmm but it doesn't reach staging yet 🤦, my bad). Disable StrictMode will fix the issue.
Not overdue. This is actively being discussed.
Just bumping to get this one picked back up. @shawnborton, does the status of the PR @hungvu193 mentioned (https://github.com/Expensify/App/pull/42592) line up with when you reported the issue?
Hmm that one is above my head! Let's see if @roryabraham has any thoughts there since he is a reviewer on that mentioned PR.
Assigning Rory for his insight 🙏
@johncschuster @roryabraham this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
@johncschuster, @roryabraham Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@roryabraham can you help us get unstuck when you get a sec? I'm looking for some insight on this question. Thank you!
oh hey. So one thing that React's strict mode does is run all effects twice. Why? No idea. I'm sure the React devs had a good reason 🙃
It's possible that might effect the code that sets status bar colors, but not obvious. IIRC most of the relevant logic is in these few files:
and on iOS Safari it's controlled by this theme-color meta tag.
Unfortunately it's like 2am for me, so I'm not able to help further right now 😞
also, I'm going to be OOO until Friday. I'll circle back as soon as I can, but let's avoid blocking on me for this. I imagine that if we make this external we'll get some reasonable proposals for me to review by the time I get back.
In light mode, the status bar is using a dark green color even if the device is in light mode. I believe this is a FE issue and should be external.
This is reproducible locally (please disable strict mode) or staging by doing the following:
We are using nested CustomStatusBarAndBackground
, with the inner CustomStatusBarAndBackground
applies the dark theme to the sign-in page. This causes the status bar of the sign-in page to be in dark green
However, after signing in, the inner CustomStatusBarAndBackground
will be unmounted, and in here, we have forced update the status bar again, but only the style, not the background color.
The idea is that in case the inner nested CustomStatusBarAndBackground
is unmounted, we should update both the status bar color and style. Change here to following:
useEffect(() => ....
const triggerUpdateStatusBarAppearance = () => {
updateStatusBarAppearance({statusBarStyle: newStatusBarStyle});
setStatusBarStyle(newStatusBarStyle);
}
const triggerUpdateStatusBarBackgroundColor = () => {
statusBarAnimation.value = 0;
statusBarAnimation.value = withDelay(300, withTiming(1));
}
// Don't update the status bar style if it's the same as the current one, to prevent flashing.
// Force update if the root status bar is back on active or it won't overwrite the nested status bar style
if ((!didForceUpdateStatusBarRef.current && !prevIsRootStatusBarEnabled && isRootStatusBarEnabled)) {
triggerUpdateStatusBarAppearance();
triggerUpdateStatusBarBackgroundColor();
if (!prevIsRootStatusBarEnabled && isRootStatusBarEnabled) {
didForceUpdateStatusBarRef.current = true;
}
return;
}
if(statusBarStyle !== newStatusBarStyle) {
triggerUpdateStatusBarAppearance();
}
if(prevStatusBarBackgroundColor.current !== theme.appBG || currentScreenBackgroundColor !== theme.appBG) {
triggerUpdateStatusBarBackgroundColor();
}
....
There're a second problem: The status bar won't change to the correct theme background color, instead still kept at the light green color (theme.splashBG
) when running in strict mode locally. The root cause is because the react-native-reanimated 3.8.1
doesn't work well with StrictMode. Here's the issue for tracking: https://github.com/software-mansion/react-native-reanimated/issues/6264.
Job added to Upwork: https://www.upwork.com/jobs/~0119d994ad59578254
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eh2077 (External
)
@dominictb Thanks for sharing reproduction steps and investigating the issue! Their proposal looks good to me.
🎀👀🎀 C+ reviewed
Current assignee @roryabraham is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.3-1 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @shawnborton Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1719557238761689
Action Performed:
Expected Result:
Should not be a dark color
Actual Result:
In light mode, the status bar is using a dark green color
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
![IMG_0375]()
https://github.com/Expensify/App/assets/38435837/a34f31bf-7341-4356-a5a5-600dd33dd80a
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @eh2077