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 2025-01-07] [$250] Android-Navigation bar shows purple color on "Submit an expense,get $250" page in offline mode #53444

Closed
2 of 8 tasks
IuliiaHerets opened this issue Dec 3, 2024 · 30 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Dec 3, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.70-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

Precondition:

  • Device navigation is buttons and not gestures.
  1. Launch ND or hybrid app.
  2. Go offline.
  3. Open FAB > Submit expense.
  4. Enter amount > Next.
  5. Tap "Submit an expense, get $250" banner.

Expected Result:

The device navigation bar will not have purple color.

Actual Result:

The device navigation bar shows purple color on "Submit an expense, get $250" page.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6682559_1733193867103.Screen_Recording_20241203_103842_Expensify.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021864014658060063799
  • Upwork Job ID: 1864014658060063799
  • Last Price Increase: 2024-12-03
  • Automatic offers:
    • dominictb | Reviewer | 105204909
    • nkdengineer | Contributor | 105204917
Issue OwnerCurrent Issue Owner: @anmurali
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Dec 3, 2024
Copy link
Contributor

github-actions bot commented Dec 3, 2024

👋 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.

@IuliiaHerets
Copy link
Author

IuliiaHerets commented Dec 3, 2024

Production

2024-12-03.11.25.02.AM.mp4

@puneetlath puneetlath added DeployBlockerCash This issue or pull request should block deployment and removed DeployBlockerCash This issue or pull request should block deployment labels Dec 3, 2024
Copy link

melvin-bot bot commented Dec 3, 2024

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

Copy link

melvin-bot bot commented Dec 3, 2024

💬 A slack conversation has been started in #expensify-open-source

Copy link
Contributor

github-actions bot commented Dec 3, 2024

👋 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.

@MarioExpensify
Copy link
Contributor

Hardly a deploy blocker. Demoting it.

@MarioExpensify MarioExpensify added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Dec 3, 2024
@mohammedmatar
Copy link

Proposal

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

The problem we're addressing is that the navigation bar color on the ReferralDetailsPage changes unexpectedly when the device goes offline. This creates an inconsistent user experience and doesn't align with the intended design of the page.

What is the root cause of that problem?

The root cause is that the navigation bar color is not being set explicitly for offline scenarios. When the device goes offline, it seems that a default or fallback styling is applied to the navigation bar, causing the unexpected color change.

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

To solve this issue, I've made the following changes:

  1. Updated the usage of the HeaderPageLayout component in ReferralDetailsPage to include the explicit background color for the header:
// ReferralDetailsPage.tsx
headerContainerStyles={[
    styles.staticHeaderImage,
    styles.justifyContentEnd,
    StyleUtils.getBackgroundColorStyle(colors.pink800)
]}.
  1. Modified the theme configuration for SCREENS.REFERRAL_DETAILS to set the backgroundColor[light theme] to colors.productLight100:
// themes/light.ts
[SCREENS.REFERRAL_DETAILS]: {
    backgroundColor: colors.productLight100
}
  1. Modified the theme configuration for SCREENS.REFERRAL_DETAILS to set the backgroundColor[dark theme] to colors.productDark100:
// themes/dark.ts
[SCREENS.REFERRAL_DETAILS]: {
    backgroundColor: colors.productDark100
}

These changes ensure that the header background color is explicitly set to pink800, while the overall page background is set to productLight100[light theme] & colors.productDark100[dark theme]. This should maintain the correct color scheme even when the device goes offline.

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

To prevent reintroducing this issue in the future, we should implement the following automated tests:

  1. Test correct rendering of navigation bar and header colors in online state.
  2. Verify color consistency when the app is in offline state.
  3. Check color stability during transitions between online and offline states.
  4. Test color consistency across different content types (e.g., REFER_FRIEND, SHARE_CODE).
  5. Verify correct colors when navigating to and from the ReferralDetailsPage.
  6. If applicable, test color consistency across different themes (e.g., light and dark mode).
  7. Check color stability during device orientation changes.

What alternative solutions did you explore? (Optional)

I considered using the StatusBar component and useNavBarSettings hook to manage the navigation bar color independently. However, the current solution using headerContainerStyles and updating the theme configuration is more in line with the existing codebase structure and doesn't require additional hooks or components.

The implemented solution maintains consistency with how other pages in the app handle background colors and should resolve the issue of unexpected color changes when offline.

@MarioExpensify MarioExpensify added the External Added to denote the issue can be worked on by a contributor label Dec 3, 2024
Copy link

melvin-bot bot commented Dec 3, 2024

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

@melvin-bot melvin-bot bot changed the title Android-Navigation bar shows purple color on "Submit an expense,get $250" page in offline mode [$250] Android-Navigation bar shows purple color on "Submit an expense,get $250" page in offline mode Dec 3, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 3, 2024
Copy link

melvin-bot bot commented Dec 3, 2024

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

@Krishna2323

This comment was marked as off-topic.

@Krishna2323

This comment was marked as off-topic.

@Krishna2323
Copy link
Contributor

Sorry for comments above, I misunderstood the issue.

@nkdengineer
Copy link
Contributor

nkdengineer commented Dec 4, 2024

Edited by proposal-police: This proposal was edited at 2024-12-04 04:03:37 UTC.

Proposal

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

Navigation bar shows purple color on "Submit an expense,get $250" page in offline mode

What is the root cause of that problem?

When the user is offline, isSafeAreaBottomPaddingApplied becomes true

const isSafeAreaBottomPaddingApplied = includeSafeAreaPaddingBottom || (isOffline && shouldShowOfflineIndicator);

Which makes the wrap view have a padding-bottom is the safe area padding-bottom

style={[styles.flex1, {minHeight}]}

Then purple color is displayed at the bottom because the wrap view's background color

backgroundColor={theme.PAGE_THEMES[SCREENS.REFERRAL_DETAILS].backgroundColor}

style={[StyleUtils.getBackgroundColorStyle(backgroundColor ?? theme.appBG)]}

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

We should not apply the padding-bottom to the wrap view here of includeSafeAreaPaddingBottom is false

  1. Remove the isSafeAreaBottomPaddingApplied and replace this with includeSafeAreaPaddingBottom

const isSafeAreaBottomPaddingApplied = includeSafeAreaPaddingBottom || (isOffline && shouldShowOfflineIndicator);

  1. If includeSafeAreaPaddingBottom we need to add the safeAreaPaddingBottomStyle to the container of the offline indicator
<OfflineIndicator
    style={[offlineIndicatorStyle]}
    containerStyles={
        includeSafeAreaPaddingBottom
            ? []
            : [styles.offlineIndicatorMobile, {paddingBottom: paddingBottom + 30}]
    }
/>

<OfflineIndicator style={offlineIndicatorStyle} />

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

NA

What alternative solutions did you explore? (Optional)

@dominictb
Copy link
Contributor

@mohammedmatar Thank you for your proposal but your RCA is not clear. The solution is not correct because it makes the status bar to not match with the header color which is against the UI design:

Screenshot 2024-12-05 at 16 09 22

@nkdengineer RCA and proposed solution here LGTM 🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 5, 2024

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

Copy link

melvin-bot bot commented Dec 5, 2024

Triggered auto assignment to @anmurali (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.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Dec 9, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Dec 31, 2024
@melvin-bot melvin-bot bot changed the title [$250] Android-Navigation bar shows purple color on "Submit an expense,get $250" page in offline mode [HOLD for payment 2025-01-07] [$250] Android-Navigation bar shows purple color on "Submit an expense,get $250" page in offline mode Dec 31, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 31, 2024
Copy link

melvin-bot bot commented Dec 31, 2024

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

Copy link

melvin-bot bot commented Dec 31, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.79-5 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 2025-01-07. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Dec 31, 2024

@dominictb @anmurali @dominictb The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Jan 7, 2025
@anmurali
Copy link

anmurali commented Jan 9, 2025

@dominictb @nkdengineer - does this need a regression test?

@melvin-bot melvin-bot bot removed the Overdue label Jan 9, 2025
@anmurali anmurali removed the Awaiting Payment Auto-added when associated PR is deployed to production label Jan 9, 2025
@dominictb
Copy link
Contributor

dominictb commented Jan 10, 2025

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] 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: NA

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: NA

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

  • Device uses button navigation, not gesture

Test:

  1. Go offline.
  2. Open FAB > Submit expense.
  3. Enter amount > Next.
  4. Tap "Submit an expense, get $250" banner.
  5. Verify the button navigation bar does not have purple background

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added the Overdue label Jan 13, 2025
Copy link

melvin-bot bot commented Jan 13, 2025

@anmurali, @nkdengineer, @dominictb, @MarioExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Jan 15, 2025

@anmurali, @nkdengineer, @dominictb, @MarioExpensify Eep! 4 days overdue now. Issues have feelings too...

@MarioExpensify
Copy link
Contributor

@anmurali the BZ Checklist has been provided, is there any further action pending before we close this one?

Copy link

melvin-bot bot commented Jan 17, 2025

@anmurali, @nkdengineer, @dominictb, @MarioExpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

Copy link

melvin-bot bot commented Jan 21, 2025

@anmurali, @nkdengineer, @dominictb, @MarioExpensify 10 days overdue. I'm getting more depressed than Marvin.

@anmurali
Copy link

Added test and paid.

@melvin-bot melvin-bot bot removed the Overdue label Jan 21, 2025
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. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants