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 2024-05-22] Bottom button on missing padding #40827

Closed
6 tasks done
m-natarajan opened this issue Apr 23, 2024 · 19 comments
Closed
6 tasks done

[HOLD for payment 2024-05-22] Bottom button on missing padding #40827

m-natarajan opened this issue Apr 23, 2024 · 19 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

Comments

@m-natarajan
Copy link

m-natarajan commented Apr 23, 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.64-3
Reproducible in staging?: y
Reproducible in production?: couldn't check
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @Jonvrebdubielzyk
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1713832272368439

Action Performed:

  1. Click on Profile photo in botton navigation bar
  2. Click on Wallet
  3. Under "Assigned cards", click on one of the cards
  4. Click on "Report virtual card fraud" or "Report physical card loss / damage"
  5. Look at the footer button that has no padding

Expected Result:

On step 5 I would expect the footer button to have correct padding of 20px on both sides and bottom

Actual Result:

On step 5 it didn't have any padding. See screenshots in thread

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

Add any screenshot/video evidence




Snip - (4) New Expensify

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @trjExpensify
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 23, 2024
Copy link

melvin-bot bot commented Apr 23, 2024

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

@ShridharGoel
Copy link
Contributor

ShridharGoel commented Apr 23, 2024

Proposal

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

Bottom button is missing padding on some card related pages.

What is the root cause of that problem?

FormAlertWithSubmitButton doesn't have padding set at the below places.

<FormAlertWithSubmitButton
isAlertVisible={shouldShowAddressError}
onSubmit={handleSubmitSecondStep}
message="reportCardLostOrDamaged.addressError"
isLoading={formData?.isLoading}
buttonText={isDamaged ? translate('reportCardLostOrDamaged.shipNewCardButton') : translate('reportCardLostOrDamaged.deactivateCardButton')}
/>
</>

<FormAlertWithSubmitButton
isAlertVisible={shouldShowReasonError}
onSubmit={handleSubmitFirstStep}
message="reportCardLostOrDamaged.reasonError"
buttonText={translate('reportCardLostOrDamaged.nextButtonLabel')}
/>

<FormAlertWithSubmitButton
isAlertVisible={Boolean(virtualCardError)}
onSubmit={() => Card.reportVirtualExpensifyCardFraud(virtualCard.cardID)}
message={virtualCardError}
isLoading={formData?.isLoading}
buttonText={translate('reportFraudPage.deactivateCard')}
/>

<View>
<FormAlertWithSubmitButton
buttonText={translate('transferAmountPage.transfer', {
amount: isTransferable ? CurrencyUtils.convertToDisplayString(transferAmount) : '',
})}
isLoading={walletTransfer?.loading}
onSubmit={() => selectedAccount && PaymentMethods.transferWalletBalance(selectedAccount)}
isDisabled={isButtonDisabled || isOffline}
message={errorMessage}
isAlertVisible={!isEmptyObject(errorMessage)}
/>
</View>

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

Wrap FormAlertWithSubmitButton inside a View and add styles.mh5, styles.mb5.

Example:

<View style={[styles.mh5, styles.mb5]}>
    <FormAlertWithSubmitButton
        isAlertVisible={Boolean(virtualCardError)}
        onSubmit={() => Card.reportVirtualExpensifyCardFraud(virtualCard.cardID)}
        message={virtualCardError}
        isLoading={formData?.isLoading}
        buttonText={translate('reportFraudPage.deactivateCard')}
    />
</View>

For transfer balance page, View is already there. We just need to add the styles.

In the same way, update at all the mentioned places.

@neonbhai
Copy link
Contributor

neonbhai commented Apr 23, 2024

Proposal

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

Bottom button on missing padding

What is the root cause of that problem?

We are missing containerStyles in the FormAlertWithSubmitButton the reported pages

<FormAlertWithSubmitButton

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

We will pass styles.mb5 and styles.ph5 as the containerStyles in the reported pages:

<FormAlertWithSubmitButton

<FormAlertWithSubmitButton

Additionally

The confirm task page also seems to be missing the bottom padding:

Image Screenshot 2024-04-24 at 2 12 05 AM

We will pass styles.mb5 here:

containerStyles={[styles.mh0, styles.mt5, styles.flex1, styles.ph5]}

@luacmartins luacmartins self-assigned this Apr 23, 2024
@luacmartins
Copy link
Contributor

luacmartins commented Apr 23, 2024

@lukemorawski it seems like #38039 caused a regression in a few other places. Could you please take a look at this issue and work on a fix? cc @abdulrahuman5196

@lukemorawski
Copy link
Contributor

@luacmartins sure, though I need to add some fake cards, as I don't have access to those pages now.

@shawnborton
Copy link
Contributor

Another case to consider is the View debug console page:
image

@shawnborton
Copy link
Contributor

What's the latest on this one?

@MrMuzyk
Copy link
Contributor

MrMuzyk commented May 7, 2024

I've been asked to take over this issue. I've pushed latest changes to the branch that was previously created and uploaded screenshots with fixed screens

@shawnborton
Copy link
Contributor

Thanks! This regression has been live for a couple of weeks now, so I would love to get this cleaned up ASAP.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels May 15, 2024
@melvin-bot melvin-bot bot changed the title Bottom button on missing padding [HOLD for payment 2024-05-22] Bottom button on missing padding May 15, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 15, 2024
Copy link

melvin-bot bot commented May 15, 2024

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

Copy link

melvin-bot bot commented May 15, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.73-7 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 2024-05-22. 🎊

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

Copy link

melvin-bot bot commented May 15, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@luacmartins] The PR that introduced the bug has been identified. Link to the PR:
  • [@luacmartins] 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:
  • [@luacmartins] A discussion in #expensify-bugs 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:
  • [@lukemorawski] Determine if we should create a regression test for this bug.
  • [@lukemorawski] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@trjExpensify
Copy link
Contributor

@mollfpr was the C+ on this one! Checklist when you're ready.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 21, 2024
Copy link

melvin-bot bot commented May 22, 2024

Payment Summary

Upwork Job

  • Reviewer: @mollfpr owed $250 via NewDot
  • Contributor: @lukemorawski is from an agency-contributor and not due payment

BugZero Checklist (@trjExpensify)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@melvin-bot melvin-bot bot added the Overdue label May 23, 2024
@trjExpensify
Copy link
Contributor

Bump for the checklist!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 24, 2024
@luacmartins
Copy link
Contributor

@mollfpr could you please complete the checklist?

@trjExpensify
Copy link
Contributor

Melv only listens to me, Carlos.

@melvin-bot melvin-bot bot removed the Overdue label May 28, 2024
@mollfpr
Copy link
Contributor

mollfpr commented May 28, 2024

The PR that introduced the bug has been identified. Link to the PR:

#38039

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:

https://github.com/Expensify/App/pull/38039/files

A discussion in #expensify-bugs 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:

We already have the check when updating a generic component, we should do the test diligently.

Determine if we should create a regression test for this bug.
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

I don't think we need to add a new test case here.

@trjExpensify
Copy link
Contributor

Alrighty, thanks. Confirming payment summary as follows:

$250 to @mollfpr for the C+ review. Go ahead and submit an expense.

Closing!

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
Projects
None yet
Development

No branches or pull requests

9 participants