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-09] [$500] Hold Request - "Hold" banner is aligned to the top when there is scan request message #37536

Closed
6 tasks done
lanitochka17 opened this issue Feb 29, 2024 · 73 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

@lanitochka17
Copy link

lanitochka17 commented Feb 29, 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: 1.4.45-1
Reproducible in staging?: Y
Reproducible in production?: Y
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: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to 1:1 DM
  3. Create a scan request
  4. Go to request details page
  5. Click 3-dot menu > Hold request
  6. Add a reason and save it

Expected Result:

The "Hold" banner will be aligned in the middle of the given space

Actual Result:

The "Hold" banner is aligned to the top of the given space when there is scan request message

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

Bug6397350_1709227408773.20240229_234646.mp4
Bug6397350_1709227408781!Screenshot_2024-03-01_at_01 12 12

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01dd5d1b7c81a77704
  • Upwork Job ID: 1763306586849918976
  • Last Price Increase: 2024-03-07
  • Automatic offers:
    • neonbhai | Contributor | 0
Issue OwnerCurrent Issue Owner: @isabelastisser
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 29, 2024
Copy link

melvin-bot bot commented Feb 29, 2024

Triggered auto assignment to @isabelastisser (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave7
CC @RachCHopkins

@lanitochka17
Copy link
Author

@isabelastisser I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@gijoe0295
Copy link
Contributor

gijoe0295 commented Feb 29, 2024

Proposal

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

"Hold" banner is aligned to the top when there is scan request message

What is the root cause of that problem?

We only have bottom padding for hold banner as per here. It only works when there's only it and no other banners (money request status bar) above.

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

Add a prop shouldShowPaddingTop to HoldBanner. This check will be true when there's any other status bar above (e.g., MoneyRequestHeaderStatusBar).

<HoldBanner shouldShowPaddingTop={isPending || isScanning} />

In that case, we use styles.pv3 for the HoldBanner. Otherwise, only use pb3.

What alternative solutions did you explore? (Optional)

NA

@ghost
Copy link

ghost commented Feb 29, 2024

Proposal

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

Hold Request - "Hold" banner is aligned to the top when there is scan request message

What is the root cause of that problem?

Since,the last discussion on this issue i.e. this comment. The solution should be not showing a Hold banner for Scanningrequest. So here :

if (!isOnHold && (isRequestIOU || canModifyStatus)) {

we need to add a condition that if the request is scanning till then don't show hold. Also, we have just added a style for padding bottom - pb here :

<View style={[styles.dFlex, styles.flexRow, styles.alignItemsCenter, styles.pb3, styles.ph5, styles.borderBottom]}>

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

Here :

if (!isOnHold && (isRequestIOU || canModifyStatus)) {

we need to add a condition to check for !isScanning and also we need to add padding top i.e. pt with the same value as pb here :

<View style={[styles.dFlex, styles.flexRow, styles.alignItemsCenter, styles.pb3, styles.ph5, styles.borderBottom]}>

As per Comment this we need to use these styles mentioned here :

<View style={[styles.dFlex, styles.flexRow, styles.alignItemsCenter, styles.flexGrow1, styles.overflowHidden, styles.ph5, styles.pb3, borderBottomStyle]}>
<View style={[styles.moneyRequestHeaderStatusBarBadge]}>
<Text style={[styles.textStrong, styles.textMicroBold]}>{title}</Text>
</View>
<View style={[styles.flexShrink1]}>
<Text style={[styles.textLabelSupporting]}>{description}</Text>
</View>
</View>

and add change it here :

<View style={[styles.dFlex, styles.flexRow, styles.alignItemsCenter, styles.pb3, styles.ph5, styles.borderBottom]}>
<TextPill>{translate('iou.hold')}</TextPill>
<Text style={[styles.textLabel, styles.pl3, styles.mw100, styles.flexShrink1]}>{translate('iou.requestOnHold')}</Text>
</View>

To make the Hold request similar to Scanning... request ofcourse with danger background.

Just like moneyRequestHeaderBadge here :

App/src/styles/index.ts

Lines 4134 to 4143 in a04481f

moneyRequestHeaderStatusBarBadge: {
width: 68,
height: variables.inputHeightSmall,
borderRadius: variables.componentBorderRadiusSmall,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: theme.border,
marginRight: 12,
},

We need can a new class like holdRequestHeaderBadge, we can copy the entire style but just the background can be changed to backgroundColor: theme.danger

What alternative solutions did you explore? (Optional)

Alternatively, what we can do is
Here :

if (!isOnHold && (isRequestIOU || canModifyStatus)) {

we need to add a condition to check for !isScanning and then here :

<View style={[styles.dFlex, styles.flexRow, styles.alignItemsCenter, styles.pb3, styles.ph5, styles.borderBottom]}>

we can add pv3 or padding vertical - 03 and remove padding-bottom or pb completely, which will make the padding equal from top and bottom to adjust the "Hold" banner in the centre.

Results

Screen.Recording.2024-03-06.at.12.33.13.PM.mp4
Screenshot 2024-03-06 at 7 59 46 PM Screenshot 2024-03-06 at 8 03 24 PM

@isabelastisser
Copy link
Contributor

@lanitochka17 I agree that this can barely be noticed. I raised it for discussion in Slack.

@isabelastisser isabelastisser added External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Feb 29, 2024
@melvin-bot melvin-bot bot changed the title Hold Request - "Hold" banner is aligned to the top when there is scan request message [$500] Hold Request - "Hold" banner is aligned to the top when there is scan request message Feb 29, 2024
Copy link

melvin-bot bot commented Feb 29, 2024

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

Copy link

melvin-bot bot commented Feb 29, 2024

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

@isabelastisser
Copy link
Contributor

I confirmed this can be handled externally. @Santhosh-Sellavel to review the proposals above. Thanks!

@neonbhai
Copy link
Contributor

neonbhai commented Feb 29, 2024

Proposal

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

"Hold" banner is aligned to the top when there is scan request message

What is the root cause of that problem?

The style for the banner is incorrect

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

We should add styles.pv3 instead of pb3 here:

<View style={[styles.dFlex, styles.flexRow, styles.alignItemsCenter, styles.pb3, styles.ph5, styles.borderBottom]}>

@ghost
Copy link

ghost commented Feb 29, 2024

This is my proposal.

@ghost
Copy link

ghost commented Mar 1, 2024

Updated Proposal

@askavyblr
Copy link

Proposal

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

Hold Request - "Hold" banner is aligned to the top when there is a scan request message

What is the root cause of that problem?

Missing top padding styles.pt3

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

Need to add top padding styles.pt3

<View style={[styles.dFlex, styles.flexRow, styles.alignItemsCenter, styles.pb3, styles.ph5, styles.borderBottom]}>

What alternative solutions did you explore? (Optional)

N/A

Padding issue

@isabelastisser
Copy link
Contributor

Hi @Santhosh-Sellavel, please review the proposals above. Thanks!

@dragnoir
Copy link
Contributor

dragnoir commented Mar 1, 2024

Proposal

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

A seperator botween Scanning and HOLD

What is the root cause of that problem?

The issues is that the component MoneyRequestHeaderStatusBar for the Scanning, is showing the border bottom when HOLD is diplayed

{isPending && (
<MoneyRequestHeaderStatusBar
title={translate('iou.pending')}
description={translate('iou.transactionPendingText')}
shouldShowBorderBottom={!isScanning}
/>
)}
{isScanning && (
<MoneyRequestHeaderStatusBar
title={translate('iou.receiptStatusTitle')}
description={translate('iou.receiptStatusText')}
shouldShowBorderBottom
/>
)}
{isOnHold && <HoldBanner />}

as you can see the 1st component for PENDING is showing only the border at the bottom when there's no scanning shouldShowBorderBottom={!isScanning}

{isPending && (
  <MoneyRequestHeaderStatusBar
    title={translate('iou.pending')}
    description={translate('iou.transactionPendingText')}
    shouldShowBorderBottom={!isScanning}
  />
)}

And this give the result below when SCANNING and PENDING are on the screen. (we don't need to ad margin top to SCANNING)

image

We should follow the same for SCANNING and ONHOLD. The component at the top, SCANNING, should check if ONHOLD is displayed before displaying the border at the bottom

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

1 - Disable the border on the bottom from the Scanning part when the HOLD is diplayed

Same as pending component checking f scanning component is displayed to display the border on the bottom, we should do the same. The logic is that every component should check if any thing below it will be displayed. IF there's a nother part displayed below it, then there's no need to display a border at the bottom.

{!isScanning && (
  <MoneyRequestHeaderStatusBar
    title={translate('iou.receiptStatusTitle')}
    description={translate('iou.receiptStatusText')}
-     shouldShowBorderBottom
+     shouldShowBorderBottom={!isOnHold}
  />
)}

2 - Use the same style for HOLD as SCANNING

As the last request from the design team, to make the HOLD part similar visually as SCANNING and PENDING, we can use the same component MoneyRequestHeaderStatusBar istead of HoldBanner adding a new prop for style (backgroundColor to danger).

{isPending && (
  <MoneyRequestHeaderStatusBar
    title={translate('iou.pending')}
    description={translate('iou.transactionPendingText')}
    shouldShowBorderBottom={!isScanning}
  />
)}

{isScanning && (
  <MoneyRequestHeaderStatusBar
    title={translate('iou.receiptStatusTitle')}
    description={translate('iou.receiptStatusText')}
    shouldShowBorderBottom={!isOnHold}
  />
)}

{isOnHold && (
  <MoneyRequestHeaderStatusBar
    title={translate('iou.hold')}
    description={translate('iou.requestOnHold')}
    shouldShowBorderBottom={isOnHold}
    backgroundColor={themeColors.danger}
  />
)}

POC:

image

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Mar 4, 2024
@Santhosh-Sellavel
Copy link
Collaborator

I've been OOO, will check this in a day

@melvin-bot melvin-bot bot removed the Overdue label Mar 4, 2024
@Santhosh-Sellavel
Copy link
Collaborator

@Expensify/design Do we need a separator between Scanning & Hold status banner? Or should the hold status banner should be aligned center vertically?

Screenshot 2024-03-04 at 11 56 58 PM

@shawnborton
Copy link
Contributor

Whoa! I would think that we only ever show one of these banners at once. cc @trjExpensify @JmillsExpensify

Also, why are the banner styles so different? The font colors and font sizes are way different across the badge and the message next to it. cc @robertjchen - any context there?

@JmillsExpensify
Copy link

Yeah you shouldn't be able to hold a scanning request. That feels like the solution in my opinion.

@melvin-bot melvin-bot bot changed the title [$500] Hold Request - "Hold" banner is aligned to the top when there is scan request message [HOLD for payment 2024-05-09] [$500] Hold Request - "Hold" banner is aligned to the top when there is scan request message May 2, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 2, 2024
Copy link

melvin-bot bot commented May 2, 2024

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

Copy link

melvin-bot bot commented May 2, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.69-2 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-09. 🎊

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

Copy link

melvin-bot bot commented May 2, 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:

  • [@Santhosh-Sellavel] The PR that introduced the bug has been identified. Link to the PR:
  • [@Santhosh-Sellavel] 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:
  • [@Santhosh-Sellavel] 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:
  • [@Santhosh-Sellavel] Determine if we should create a regression test for this bug.
  • [@Santhosh-Sellavel] 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.
  • [@isabelastisser] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels May 8, 2024
@isabelastisser
Copy link
Contributor

Not overdue.

@Santhosh-Sellavel, please complete the BZ list above before I can process the payments in Upwork and close the issue. Thanks!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 8, 2024
@dragnoir
Copy link
Contributor

@Santhosh-Sellavel friendly bump :)

@isabelastisser
Copy link
Contributor

It looks like @Santhosh-Sellavel is OOO until May 15. I've sent them a DM for visibility.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 13, 2024
@isabelastisser
Copy link
Contributor

Bump @Santhosh-Sellavel

@Santhosh-Sellavel
Copy link
Collaborator

Santhosh-Sellavel commented May 16, 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:

Copy link

melvin-bot bot commented May 16, 2024

@francoisl, @dragnoir, @isabelastisser, @neonbhai, @Santhosh-Sellavel Whoops! This issue is 2 days overdue. Let's get this updated quick!

@francoisl
Copy link
Contributor

Works for me. @isabelastisser feel free to process the payments and close the issue. Thanks!

@neonbhai
Copy link
Contributor

Noting that the PR was reviewed by me here but seems like the automation didn't mention it. Please take a look 🙇

cc: @isabelastisser

@dragnoir
Copy link
Contributor

@isabelastisser pls consider this when payment #37536 (comment)

Thank you

@isabelastisser
Copy link
Contributor

isabelastisser commented May 17, 2024

Based on @shawnborton's comment here, I'm increasing the payment to @dragnoir to $750.

Payments summary:

@dragnoir requires payment $750 (manual offer https://www.upwork.com/nx/wm/offer/102358820)
@neonbhai requires payment automatic offer (Contributor) $750
@Santhosh-Sellavel requires payment through NewDot Manual Requests $500 PENDING

@melvin-bot melvin-bot bot removed the Overdue label May 17, 2024
@isabelastisser
Copy link
Contributor

All set!

@dragnoir
Copy link
Contributor

@isabelastisser offer accepted. Thank you

@neonbhai
Copy link
Contributor

@isabelastisser hi, the original job was split with me and @dragnoir. As noted here #37536 (comment)

I also ended up reviewing one of the linked PRs, so the payout would be $250 + $500 for me! Please take a look 🙇

@Santhosh-Sellavel
Copy link
Collaborator

Requested on ND

@JmillsExpensify
Copy link

$500 approved for @Santhosh-Sellavel

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

No branches or pull requests