App icon indicating copy to clipboard operation
App copied to clipboard

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

Open IuliiaHerets opened this issue 1 year ago β€’ 7 comments

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:

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

Screenshots/Videos

https://github.com/user-attachments/assets/b5528f94-10ce-4f08-a4ff-88ceaf4dafb1

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
Issue OwnerCurrent Issue Owner: @mananjadhav

IuliiaHerets avatar Dec 05 '24 19:12 IuliiaHerets

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.

melvin-bot[bot] avatar Dec 05 '24 19:12 melvin-bot[bot]

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 https://github.com/Expensify/App/blob/24793797a140b3f65a7de0511adccdcb51bc1394/src/pages/settings/Wallet/ExpensifyCardPage.tsx#L162

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.

nkdengineer avatar Dec 05 '24 19:12 nkdengineer

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 https://github.com/Expensify/App/blob/24793797a140b3f65a7de0511adccdcb51bc1394/src/pages/settings/Wallet/ExpensifyCardPage.tsx#L162 This is set to false because we are setting safeAreaPaddingBottomStyle style to the scroll view here https://github.com/Expensify/App/blob/48b80f65e80d304965cbeb3573d7d6678fb9bd3a/src/pages/settings/Wallet/ExpensifyCardPage.tsx#L165-L171 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 https://github.com/Expensify/App/blob/24793797a140b3f65a7de0511adccdcb51bc1394/src/pages/settings/Wallet/ExpensifyCardPage.tsx#L162 and then also remove safeAreaPaddingBottomStyle here https://github.com/Expensify/App/blob/48b80f65e80d304965cbeb3573d7d6678fb9bd3a/src/pages/settings/Wallet/ExpensifyCardPage.tsx#L165 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)

FitseTLT avatar Dec 06 '24 22:12 FitseTLT

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

melvin-bot[bot] avatar Dec 09 '24 09:12 melvin-bot[bot]

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!

RachCHopkins avatar Dec 09 '24 23:12 RachCHopkins

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

melvin-bot[bot] avatar Dec 09 '24 23:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 09 '24 23:12 melvin-bot[bot]

@nkdengineer's proposal looks good to me.

πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed.

mananjadhav avatar Dec 10 '24 19:12 mananjadhav

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

melvin-bot[bot] avatar Dec 10 '24 19:12 melvin-bot[bot]

@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 :eyes: again. Thx cc @johnmlee101

FitseTLT avatar Dec 10 '24 19:12 FitseTLT

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.

mananjadhav avatar Dec 10 '24 19:12 mananjadhav

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!

FitseTLT avatar Dec 10 '24 19:12 FitseTLT

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

nkdengineer avatar Dec 11 '24 03:12 nkdengineer

@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 πŸ‘

FitseTLT avatar Dec 11 '24 11:12 FitseTLT

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 avatar Dec 11 '24 13:12 twilight2294

@mananjadhav can you please review my proposal , thank you

twilight2294 avatar Dec 11 '24 13:12 twilight2294

hey @mananjadhav @johnmlee101 I also have this issue which appears to be the same problem in a different location (Android nav buttons sitting over Expensify buttons) - would the solution for this apply to the whole app or just this little piece?

RachCHopkins avatar Dec 13 '24 00:12 RachCHopkins

Looks like a similar issue and changes will be at separate places. But we can solve both of them in this same issue itself.

mananjadhav avatar Dec 13 '24 09:12 mananjadhav

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

melvin-bot[bot] avatar Dec 16 '24 09:12 melvin-bot[bot]

@mananjadhav can you please review my proposal here

twilight2294 avatar Dec 16 '24 15:12 twilight2294

Waiting for @johnmlee101 to respond on this.

mananjadhav avatar Dec 17 '24 12:12 mananjadhav

I think the RCA from @FitseTLT makes sense, and I'll go with that

johnmlee101 avatar Dec 17 '24 17:12 johnmlee101

πŸ“£ @FitseTLT πŸŽ‰ 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 πŸ“–

melvin-bot[bot] avatar Dec 17 '24 17:12 melvin-bot[bot]

@mananjadhav @johnmlee101 @RachCHopkins @FitseTLT this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] avatar Dec 19 '24 09:12 melvin-bot[bot]

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

https://github.com/Expensify/App/issues/53842 https://github.com/Expensify/App/issues/54637 https://github.com/Expensify/App/issues/53779

Pujan92 avatar Dec 30 '24 12:12 Pujan92

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

mananjadhav avatar Jan 01 '25 11:01 mananjadhav

Would be great to handle this holistically cc @kirillzyusko

mountiny avatar Jan 07 '25 20:01 mountiny

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

melvin-bot[bot] avatar Jan 08 '25 02:01 melvin-bot[bot]

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.81-6 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/54409

If no regressions arise, payment will be issued on 2025-01-15. :confetti_ball:

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

  • @mananjadhav requires payment through NewDot Manual Requests
  • @FitseTLT requires payment automatic offer (Contributor)

melvin-bot[bot] avatar Jan 08 '25 02:01 melvin-bot[bot]

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

melvin-bot[bot] avatar Jan 08 '25 02:01 melvin-bot[bot]