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

[$250] mWeb/Safari - UI - The top part of the UI is white while the page is loading in dark mode #40683

Open
1 of 6 tasks
izarutskaya opened this issue Apr 22, 2024 · 20 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review

Comments

@izarutskaya
Copy link

izarutskaya commented Apr 22, 2024

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.62.17
Reproducible in staging?: Y
Reproducible in production?: N
Found when validating PR : https://github.com/Expensify/Expensify/issues/302570
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

Precondition: Dark mode should be enabled.

  1. Open any chat or room
  2. Refresh the page

Expected Result:

The whole UI should be in dark mode.

Actual Result:

The top part of the UI is white while the page is loading in dark mode. The issue appears when refreshing any room, or chat, or LHN and when you kill and re-open Safari.

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

Bug6456678_1713720715815.KRDX1564.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a67f702d8230d48e
  • Upwork Job ID: 1784920320468824064
  • Last Price Increase: 2024-04-29
  • Automatic offers:
    • getusha | Reviewer | 0
    • bernhardoj | Contributor | 0
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 22, 2024
Copy link

melvin-bot bot commented Apr 22, 2024

Triggered auto assignment to @grgia (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Apr 22, 2024

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.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Apr 22, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@izarutskaya
Copy link
Author

@johncschuster I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@mountiny mountiny added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Apr 22, 2024
@mountiny
Copy link
Contributor

This is minor ui bug, lets not block deploy on this given we are close to shipping it

@grgia
Copy link
Contributor

grgia commented Apr 22, 2024

@izarutskaya is this reproducible on the previous version?

@bernhardoj
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

The status bar of the mobile web (safari) is white instead of following the splash screen color.

What is the root cause of that problem?

The status bar color is based on the theme-color value

<meta name="theme-color" content="">

Since the value is empty, it just follows the device theme. The status bar is then updated depends on the page every time the nav state changes.

const updateStatusBarStyle = useCallback(
(listenerID?: number) => {
// Check if this function is either called through the current navigation listener
// react-navigation library has a bug internally, where it can't keep track of the listeners, therefore, sometimes when the useEffect would re-render and we run navigationRef.removeListener the listener isn't removed and we end up with two or more listeners.
// https://github.com/Expensify/App/issues/34154#issuecomment-1898519399
if (listenerID !== undefined && listenerID !== listenerCount.current) {
return;
}
// Set the status bar colour depending on the current route.
// If we don't have any colour defined for a route, fall back to
// appBG color.
let currentRoute: ReturnType<typeof navigationRef.getCurrentRoute> | undefined;
if (navigationRef.isReady()) {
currentRoute = navigationRef.getCurrentRoute();
}
let newStatusBarStyle = theme.statusBarStyle;
let currentScreenBackgroundColor = theme.appBG;
if (currentRoute && 'name' in currentRoute && currentRoute.name in theme.PAGE_THEMES) {
const pageTheme = theme.PAGE_THEMES[currentRoute.name];
newStatusBarStyle = pageTheme.statusBarStyle;
const backgroundColorFromRoute =
currentRoute?.params && 'backgroundColor' in currentRoute.params && typeof currentRoute.params.backgroundColor === 'string' && currentRoute.params.backgroundColor;
// It's possible for backgroundColorFromRoute to be empty string, so we must use "||" to fallback to backgroundColorFallback.
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
currentScreenBackgroundColor = backgroundColorFromRoute || pageTheme.backgroundColor;
}
prevStatusBarBackgroundColor.current = statusBarBackgroundColor.current;
statusBarBackgroundColor.current = currentScreenBackgroundColor;
if (currentScreenBackgroundColor !== theme.appBG || prevStatusBarBackgroundColor.current !== theme.appBG) {
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 overwirte the nested status bar style
if ((!didForceUpdateStatusBarRef.current && !prevIsRootStatusBarEnabled && isRootStatusBarEnabled) || newStatusBarStyle !== statusBarStyle) {
updateStatusBarAppearance({statusBarStyle: newStatusBarStyle});
setStatusBarStyle(newStatusBarStyle);
if (!prevIsRootStatusBarEnabled && isRootStatusBarEnabled) {
didForceUpdateStatusBarRef.current = true;
}
}
},
[prevIsRootStatusBarEnabled, isRootStatusBarEnabled, statusBarAnimation, statusBarStyle, theme.PAGE_THEMES, theme.appBG, theme.statusBarStyle],
);

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

Set theme-color initial value to the same as the splash background color, #03D47C.

@melvin-bot melvin-bot bot added the Overdue label Apr 24, 2024
@johncschuster
Copy link
Contributor

@melvin-bot melvin-bot bot removed the Overdue label Apr 24, 2024
@mvtglobally
Copy link

@grgia do you need us to check if it's still repro on the current build ?

@melvin-bot melvin-bot bot added the Overdue label Apr 29, 2024
@grgia grgia added the External Added to denote the issue can be worked on by a contributor label Apr 29, 2024
@melvin-bot melvin-bot bot changed the title mWeb/Safari - UI - The top part of the UI is white while the page is loading in dark mode [$250] mWeb/Safari - UI - The top part of the UI is white while the page is loading in dark mode Apr 29, 2024
Copy link

melvin-bot bot commented Apr 29, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 29, 2024
Copy link

melvin-bot bot commented Apr 29, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Apr 29, 2024
@grgia
Copy link
Contributor

grgia commented Apr 29, 2024

I'm going to make this external

@melvin-bot melvin-bot bot added the Overdue label May 1, 2024
@johncschuster
Copy link
Contributor

Not overdue. This was just made External

@melvin-bot melvin-bot bot removed the Overdue label May 1, 2024
@getusha
Copy link
Contributor

getusha commented May 2, 2024

@bernhardoj's proposal looks good to me
🎀 👀 🎀 C+ Reviewed!

Copy link

melvin-bot bot commented May 2, 2024

Current assignee @grgia is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

Copy link

melvin-bot bot commented May 7, 2024

@johncschuster, @grgia, @getusha Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 7, 2024
Copy link

melvin-bot bot commented May 7, 2024

📣 @getusha 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented May 7, 2024

📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@bernhardoj
Copy link
Contributor

PR is ready

cc: @getusha

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels May 31, 2024
Copy link

melvin-bot bot commented May 31, 2024

This issue has not been updated in over 15 days. @johncschuster, @grgia, @bernhardoj, @getusha eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

7 participants