[$250] Android - Wallet - "Get physical card" button overlaps with device navigation bar
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.
- Launch ND or hybrid app.
- Go to Wallet.
- 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
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 Owner
Current Issue Owner: @mananjadhav
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.
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.
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)
@RachCHopkins Whoops! This issue is 2 days overdue. Let's get this updated quick!
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!
Job added to Upwork: https://www.upwork.com/jobs/~021866268126921141487
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (External)
Triggered auto assignment to @johnmlee101, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@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
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.
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 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 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 π
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):
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 :
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
@mananjadhav can you please review my proposal , thank you
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?
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, @johnmlee101, @RachCHopkins Whoops! This issue is 2 days overdue. Let's get this updated quick!
@mananjadhav can you please review my proposal here
Waiting for @johnmlee101 to respond on this.
I think the RCA from @FitseTLT makes sense, and I'll go with that
π£ @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 π
@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!
@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
Yes I agree we should handle all of them together. @johnmlee101 @FitseTLT what do you folks think?
Would be great to handle this holistically cc @kirillzyusko
Reviewing label has been removed, please complete the "BugZero Checklist".
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)
@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]