Skip to content
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

[HOLD for payment 2024-03-07] [$500] Android - Home - Time and other elements in phone header is not visible in light mode #33674

Closed
1 of 6 tasks
kbecciv opened this issue Dec 27, 2023 · 43 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Dec 27, 2023

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: 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

  1. Launch app
  2. 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?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d884bdaeefe025ea
  • Upwork Job ID: 1740123637523148800
  • Last Price Increase: 2024-01-03
  • Automatic offers:
    • jjcoffee | Reviewer | 28080054
    • tienifr | Contributor | 28080055
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 27, 2023
@melvin-bot melvin-bot bot 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 Dec 27, 2023
Copy link

melvin-bot bot commented Dec 27, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01d884bdaeefe025ea

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 27, 2023
Copy link

melvin-bot bot commented Dec 27, 2023

Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Copy link

melvin-bot bot commented Dec 27, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Dec 27, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External)

@rayane-d
Copy link
Contributor

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:

statusBarStyle: CONST.STATUS_BAR_STYLE.DARK_CONTENT,

What changes do you think we should make in order to solve the problem?

we should change it to:

    statusBarStyle: CONST.STATUS_BAR_STYLE.LIGHT_CONTENT,

Result:

before:

image

after:

image

What alternative solutions did you explore? (Optional)

@tienifr
Copy link
Contributor

tienifr commented 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 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 undefined here instead of initialize it with the theme current status bar.

const [statusBarStyle, setStatusBarStyle] = useState();

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.

@tienifr

This comment was marked as resolved.

@bfitzexpensify
Copy link
Contributor

Couple of proposals ready for review @jjcoffee - thank you!

@melvin-bot melvin-bot bot added the Overdue label Jan 1, 2024
Copy link

melvin-bot bot commented Jan 1, 2024

@jjcoffee, @bfitzexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@jjcoffee
Copy link
Contributor

jjcoffee commented Jan 2, 2024

@rayane-djouah seems to have the incorrect root cause as dark-content is the correct style to have here (per the docs this results in Light background, dark texts and icons).

@tienifr's proposal makes the most sense to me. I'm unsure if there would be any negative effects of initialising the status bar state to undefined, but we can test and deal with that on the PR.

🎀👀🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Jan 2, 2024
Copy link

melvin-bot bot commented Jan 2, 2024

Triggered auto assignment to @madmax330, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@situchan
Copy link
Contributor

situchan commented Jan 2, 2024

Dupe of #33309
cc: @grgia @chrispader

@grgia
Copy link
Contributor

grgia commented Jan 2, 2024

@madmax330 mind if I take this one?

@grgia
Copy link
Contributor

grgia commented Jan 2, 2024

@tienifr does your proposal fix it for both light mode and dark (#33309)

@tienifr
Copy link
Contributor

tienifr commented Jan 3, 2024

@tienifr does your proposal fix it for both light mode and dark (#33309)

@grgia yup it will fix for both, I can raise a PR asap once assigned

Copy link

melvin-bot bot commented Jan 3, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@jjcoffee
Copy link
Contributor

Apologies this one fell off my radar somehow, it's back on my list!

@jjcoffee
Copy link
Contributor

Reviewing now!

@jjcoffee
Copy link
Contributor

PR reviewed, @tienifr just needs to work on a tweak.

@bfitzexpensify
Copy link
Contributor

How's this one going @tienifr?

@tienifr
Copy link
Contributor

tienifr commented Feb 7, 2024

I'm having problems with perf test and investigating that.

@bfitzexpensify
Copy link
Contributor

Bump on this one @tienifr - how are the performance tests going?

@tienifr
Copy link
Contributor

tienifr commented Feb 29, 2024

PR was merged ytd.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 29, 2024
@melvin-bot melvin-bot bot changed the title [$500] Android - Home - Time and other elements in phone header is not visible in light mode [HOLD for payment 2024-03-07] [$500] Android - Home - Time and other elements in phone header is not visible in light mode Feb 29, 2024
Copy link

melvin-bot bot commented Feb 29, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 29, 2024
Copy link

melvin-bot bot commented 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:

Copy link

melvin-bot bot commented 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:

  • [@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:

@bfitzexpensify bfitzexpensify added Daily KSv2 and removed Weekly KSv2 labels Mar 6, 2024
@melvin-bot melvin-bot bot added the Overdue label Mar 6, 2024
@bfitzexpensify
Copy link
Contributor

Switching to Daily so that I action this when payment is due tomorrow

@melvin-bot melvin-bot bot removed the Overdue label Mar 6, 2024
@bfitzexpensify
Copy link
Contributor

Payments all done - please complete the BZ checklist when you get a moment @jjcoffee - thank you!

@jjcoffee
Copy link
Contributor

jjcoffee commented Mar 7, 2024

Regression Test Proposal

  1. Set app in light mode
  2. Reopen app
  3. Verify that the status bar renders correctly with the appropriate text colour for the theme
  4. Sign out and verify 3
  5. Sign in and verify 3
  6. Repeat all steps with dark mode
  7. Change theme from another device
  8. Verify theme and status bar are updated accordingly

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added Daily KSv2 and removed Daily KSv2 labels Mar 7, 2024
@bfitzexpensify
Copy link
Contributor

Looks good to me - proposed via https://github.com/Expensify/Expensify/issues/376686. Let's close this out - thanks everyone!

@github-project-automation github-project-automation bot moved this from In Progress to Merged in Theme Switching / Light Mode Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Development

No branches or pull requests

10 participants