You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-03-07] [$500] Android - Home - Time and other elements in phone header is not visible in light mode #33674
Version Number: 1.4.18-2 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: Applause - Internal Team Slack conversation:
Action Performed:
Pre-condition open app in light mode
Launch app
Note header elements like phone time etc.,
Expected Result:
Time and other elements in phone header must be visible in light mode
Actual Result:
Time and other elements in phone header is not visible in light mode
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Android - Home - Time and other elements in phone header is not visible in light mode[/-][+][$500] Android - Home - Time and other elements in phone header is not visible in light mode[/+]on Dec 27, 2023
Please re-state the problem that we are trying to solve in this issue.
Time and other elements in phone header is not visible in light mode
What is the root cause of that problem?
In here, we set the initial state of the status bar. But the status bar color isn't updated via updateStatusBarAppearance yet, that initial state causes the status bar not to change color due to this logic because we think that the color was already updated, but it was not, only the state was initialized.
What changes do you think we should make in order to solve the problem?
We can simply initiate the status bar state to undefinedhere instead of initialize it with the theme current status bar.
This will make sure initially when no status bar style is set, this will be evaluated to false and the status bar style will be set correctly.
Or in an useEffect, set the initial colors (same as initial value of statusBarStyle state) of the status bar by updateStatusBarAppearance, to make sure when we say, in the state, initial color of statusBar is something, it is correctly initialized like that.
What alternative solutions did you explore? (Optional)
Set barStyle prop for the StatusBar based on the status bar style in the initial state.
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.45-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@jjcoffee] The PR that introduced the bug has been identified. Link to the PR:
[@jjcoffee] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@jjcoffee] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@jjcoffee] Determine if we should create a regression test for this bug.
[@jjcoffee] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@JmillsExpensify / @bfitzexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
Determine if we should create a regression test for this bug. Yes
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Regression Test Proposal
Set app in light mode
Reopen app
Verify that the status bar renders correctly with the appropriate text colour for the theme
Sign out and verify 3
Sign in and verify 3
Repeat all steps with dark mode
Change theme from another device
Verify theme and status bar are updated accordingly
Activity
[-]Android - Home - Time and other elements in phone header is not visible in light mode[/-][+][$500] Android - Home - Time and other elements in phone header is not visible in light mode[/+]melvin-bot commentedon Dec 27, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01d884bdaeefe025ea
melvin-bot commentedon Dec 27, 2023
Triggered auto assignment to @bfitzexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Dec 27, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Dec 27, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (
External)rayane-d commentedon Dec 27, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Android status bar is not visible in light mode.
What is the root cause of that problem?
we are setting an incorrect status bar style here:
App/src/styles/theme/themes/light.ts
Line 139 in 93db6db
What changes do you think we should make in order to solve the problem?
we should change it to:
Result:
before:
after:
What alternative solutions did you explore? (Optional)
tienifr commentedon Dec 28, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Time and other elements in phone header is not visible in light mode
What is the root cause of that problem?
In here, we set the initial state of the status bar. But the status bar color isn't updated via
updateStatusBarAppearanceyet, that initial state causes the status bar not to change color due to this logic because we think that the color was already updated, but it was not, only the state was initialized.What changes do you think we should make in order to solve the problem?
We can simply initiate the status bar state to
undefinedhere instead of initialize it with the theme current status bar.This will make sure initially when no status bar style is set, this will be evaluated to false and the status bar style will be set correctly.
Or in an
useEffect, set the initial colors (same as initial value ofstatusBarStylestate) of the status bar byupdateStatusBarAppearance, to make sure when we say, in the state, initial color of statusBar is something, it is correctly initialized like that.What alternative solutions did you explore? (Optional)
Set barStyle prop for the
StatusBarbased on the status bar style in the initial state.tienifr commentedon Dec 28, 2023
bfitzexpensify commentedon Dec 29, 2023
Couple of proposals ready for review @jjcoffee - thank you!
56 remaining items
melvin-bot commentedon Feb 29, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.45-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-03-07. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Feb 29, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
bfitzexpensify commentedon Mar 6, 2024
Switching to Daily so that I action this when payment is due tomorrow
bfitzexpensify commentedon Mar 6, 2024
Payments all done - please complete the BZ checklist when you get a moment @jjcoffee - thank you!
jjcoffee commentedon Mar 7, 2024
Regression Test Proposal
Do we agree 👍 or 👎
bfitzexpensify commentedon Mar 8, 2024
Looks good to me - proposed via https://github.com/Expensify/Expensify/issues/376686. Let's close this out - thanks everyone!