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

[Paid] [$250] Android - Wallet - "Get physical card" button overlaps with device navigation bar #53650

Open
2 of 8 tasks
IuliiaHerets opened this issue Dec 5, 2024 · 40 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

@IuliiaHerets
Copy link

IuliiaHerets commented Dec 5, 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.72-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
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.
  • User has been assigned a physical Expensify card.
  1. Launch ND or hybrid app.
  2. Go to Wallet.
  3. Tap on the physical card.

Expected Result:

"Get physical card" button will not overlap with device navigation bar.

Actual Result:

"Get physical card" button overlaps with device navigation bar.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6685385_1733419664616.1733419531016_Screen_Recording_20241206_012359_Expensify.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021866268126921141487
  • Upwork Job ID: 1866268126921141487
  • Last Price Increase: 2024-12-09
  • Automatic offers:
    • FitseTLT | Contributor | 105374034
Issue OwnerCurrent Issue Owner: @mananjadhav
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 5, 2024
Copy link

melvin-bot bot commented Dec 5, 2024

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

@nkdengineer
Copy link
Contributor

Proposal

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

"Get physical card" button overlaps with device navigation bar.

What is the root cause of that problem?

In ExpensifyCardPage component we are setting includeSafeAreaPaddingBottom as false

includeSafeAreaPaddingBottom={false}

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

We should pass includeSafeAreaPaddingBottom as true

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)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@FitseTLT
Copy link
Contributor

FitseTLT commented Dec 6, 2024

Proposal

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

Android - Wallet - "Get physical card" button overlaps with device navigation bar

What is the root cause of that problem?

This happens because we have set includeSafeAreaPaddingBottom to false here

includeSafeAreaPaddingBottom={false}

This is set to false because we are setting safeAreaPaddingBottomStyle style to the scroll view here
{({safeAreaPaddingBottomStyle}) => (
<>
<HeaderWithBackButton
title={pageTitle}
onBackButtonPress={() => Navigation.goBack()}
/>
<ScrollView contentContainerStyle={safeAreaPaddingBottomStyle}>

but the all the buttons are not children of the scroll view so the safe padding will not be applied for them.

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

The best approach is to enable includeSafeAreaPaddingBottom on the screen wrapper as it is the highest parent in the page. So remove this

includeSafeAreaPaddingBottom={false}

and then also remove safeAreaPaddingBottomStyle here
{({safeAreaPaddingBottomStyle}) => (

and render the children of the screen wrapper directly not function (as we no more need safeAreaPaddingBottomStyle) 👍

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

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Dec 9, 2024
Copy link

melvin-bot bot commented Dec 9, 2024

@RachCHopkins Whoops! This issue is 2 days overdue. Let's get this updated quick!

@RachCHopkins
Copy link
Contributor

Yes, can repro. It's a PITA too, because when you click activate physical card, you tap the main home button - I thought the app was crashing at first!

@melvin-bot melvin-bot bot removed the Overdue label Dec 9, 2024
@RachCHopkins RachCHopkins added External Added to denote the issue can be worked on by a contributor Overdue labels Dec 9, 2024
@melvin-bot melvin-bot bot changed the title Android - Wallet - "Get physical card" button overlaps with device navigation bar [$250] Android - Wallet - "Get physical card" button overlaps with device navigation bar Dec 9, 2024
Copy link

melvin-bot bot commented Dec 9, 2024

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

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

melvin-bot bot commented Dec 9, 2024

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

@mananjadhav
Copy link
Collaborator

@nkdengineer's proposal looks good to me.

🎀 👀 🎀 C+ reviewed.

Copy link

melvin-bot bot commented Dec 10, 2024

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

@FitseTLT
Copy link
Contributor

@nkdengineer's proposal looks good to me.

🎀 👀 🎀 C+ reviewed.

@mananjadhav I disagree with you. The selected proposal did not have the correct the RCA (why the safeAreaPaddingStyle already applied doesn't work) and the solution doesn't mention all the the needed changes that is to remove the unnecessary redundant safeAreaPaddingStyle we are applying now and this is an important point that's why I commented a proposal in the first place. Please take a 👀 again. Thx
cc @johnmlee101

@mananjadhav
Copy link
Collaborator

mananjadhav commented Dec 10, 2024

I think the redundant safeAreaPaddingStyle can be handled within the code. But I'll let @johnmlee101 decide.

@johnmlee101 For you to check this comment before assigning.

@FitseTLT
Copy link
Contributor

I think the redundant safeAreaPaddingStyle can be handled within the code. But I'll let @johnmlee101 decide.

@johnmlee101 For you to check this comment before assigning.

It's not about removing the code in the PR phase or not but the RCA of the chosen proposal is wrong. The root cause of the issue is not even setting includeSafeAreaPaddingBottom to false b/c they were correct to set it to false as they have applied the safeAreaPadding here but the scroll view is not a parent of the buttons, this is the correct RCA and then a correct and comprehensive solution follows from the correct RCA. @johnmlee101 please take a look at my proposal correct RCA and full solution is important. Thx!

@nkdengineer
Copy link
Contributor

@FitseTLT My proposal is first and your solution is just more detailed than my proposal. And the redundant safeAreaPaddingStyle can be handled in the PR phase.

@FitseTLT
Copy link
Contributor

@FitseTLT My proposal is first and your solution is just more detailed than my proposal. And the redundant safeAreaPaddingStyle can be handled in the PR phase.

Nope @nkdengineer it's not about being detailed my proposal is the only one that identifies the correct RCA and provide full solution. Let's just wait for @johnmlee101 👍

@twilight2294
Copy link
Contributor

Proposal

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

"Get physical card" button overlaps with device navigation bar

What is the root cause of that problem?

The safeAreaPaddingBottomStyle is not captured using the hook useStyledSafeAreaInsets which causes it to not add padding on some devices.

( Note that we can see no issues if we have a Notch as bottom tab instead of button):

Screenshot 2024-12-11 at 6 53 15 PM

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

We should get the safeAreaPaddingBottomStyle from useStyledSafeAreaInsets and apply that style :
Screenshot 2024-12-11 at 6 54 01 PM

this will give us the correct bottom padding on different type of devices :

+    const {safeAreaPaddingBottomStyle} = useStyledSafeAreaInsets();

     return (
         <ScreenWrapper
             includeSafeAreaPaddingBottom={false}
             testID={ExpensifyCardPage.displayName}
         >
-            {({safeAreaPaddingBottomStyle}) => (
-                <>
+
                     <HeaderWithBackButton
                         title={pageTitle}
                         onBackButtonPress={() => Navigation.goBack()}
@@ -280,7 +281,7 @@ function ExpensifyCardPage({
                             </>
                         )}
                     </ScrollView>

                         <Button
                             success
                             large
@@ -313,8 +314,7 @@ function ExpensifyCardPage({
                         title={translate('cardPage.validateCardTitle')}
                         descriptionPrimary={translate('cardPage.enterMagicCode', {contactMethod: primaryLogin})}
                     />
-                </>
-            )}
+
         </ScreenWrapper>
     );
 }

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

N/A UI bug

What alternative solutions did you explore? (Optional)

N/A

@twilight2294
Copy link
Contributor

@mananjadhav can you please review my proposal , thank you

@Pujan92
Copy link
Contributor

Pujan92 commented Dec 30, 2024

@RachCHopkins @johnmlee101 @mananjadhav Do you think we need to handle other similar issues in this single PR?

#53842
#54637
#53779

@mananjadhav
Copy link
Collaborator

Yes I agree we should handle all of them together. @johnmlee101 @FitseTLT what do you folks think?

@mountiny
Copy link
Contributor

mountiny commented Jan 7, 2025

Would be great to handle this holistically cc @kirillzyusko

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 8, 2025
@melvin-bot melvin-bot bot changed the title [$250] Android - Wallet - "Get physical card" button overlaps with device navigation bar [HOLD for payment 2025-01-15] [$250] Android - Wallet - "Get physical card" button overlaps with device navigation bar Jan 8, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 8, 2025
Copy link

melvin-bot bot commented Jan 8, 2025

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

Copy link

melvin-bot bot commented Jan 8, 2025

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

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

Copy link

melvin-bot bot commented Jan 8, 2025

@mananjadhav @RachCHopkins @mananjadhav 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]

@mountiny
Copy link
Contributor

mountiny commented Jan 8, 2025

@RachCHopkins RachCHopkins changed the title [HOLD for payment 2025-01-15] [$250] Android - Wallet - "Get physical card" button overlaps with device navigation bar [Due for payment 2025-01-15] [$250] Android - Wallet - "Get physical card" button overlaps with device navigation bar Jan 10, 2025
@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jan 14, 2025
@mananjadhav
Copy link
Collaborator

@RachCHopkins This is ready for payout but I think we'll need to keep the issue open because we plan to work on some follow up items.

@mananjadhav
Copy link
Collaborator

mananjadhav commented Jan 15, 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: I think we don't have a specific offending PR. We didn't consider the device navigation with buttons.

  • [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: https://github.com/Expensify/Expensify/issues/462852

Although I am suggesting the Regression Test Proposal, I think we should have one comprehensive test for the same.

Regression Test Proposal

Precondition:

  • Device navigation is buttons and not gestures.
  • User has been assigned a physical Expensify card.

Test:

  1. Go to Settings > Wallet
  2. Tap on the physical card.
  3. "Get physical card" / "Activate physical" button will not overlap with device navigation bar.

Do we agree 👍 or 👎

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

melvin-bot bot commented Jan 17, 2025

@mananjadhav, @johnmlee101, @RachCHopkins, @FitseTLT Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@RachCHopkins
Copy link
Contributor

Sorry I have been OOO. Back today and will handle asap.

@melvin-bot melvin-bot bot removed the Overdue label Jan 19, 2025
@RachCHopkins
Copy link
Contributor

Payment Summary:

  • Contributor: @FitseTLT to be paid $250 via Upwork
  • Contributor+: @mananjadhav to be paid $250 via NewDot manual request

Upwork job here

@RachCHopkins
Copy link
Contributor

Contributor has been paid, the contract has been completed, and the Upwork post has been closed.

Leaving issue open per comment for follow-up tasks.

@RachCHopkins RachCHopkins changed the title [Due for payment 2025-01-15] [$250] Android - Wallet - "Get physical card" button overlaps with device navigation bar [Paid] [$250] Android - Wallet - "Get physical card" button overlaps with device navigation bar Jan 20, 2025
@garrettmknight
Copy link
Contributor

$250 approved for @mananjadhav

Copy link

melvin-bot bot commented Jan 24, 2025

@mananjadhav, @johnmlee101, @RachCHopkins, @FitseTLT Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Jan 24, 2025
@mananjadhav
Copy link
Collaborator

@mountiny Are we tracking the changes as a separate issue? Should we close this one out?

@melvin-bot melvin-bot bot removed the Overdue label Jan 26, 2025
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
Development

No branches or pull requests

10 participants