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

[$250] Distance - The route is cut off in the receipt in the split #55079

Open
8 tasks
lanitochka17 opened this issue Jan 10, 2025 · 4 comments
Open
8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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

Comments

@lanitochka17
Copy link

lanitochka17 commented Jan 10, 2025

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.83-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5436429
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team

Action Performed:

  1. Open NewDot app
  2. Log in to the HT account
  3. Create any conversation or go to an existing one
  4. Create distance split with any valid route
  5. Go to the details of the created split

Expected Result:

The itinerary must fit completely on the receipt in the split section

Actual Result:

The route is cut off in the receipt in the split

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos

Add any screenshot/video evidence
Bug6711112_1736523786049.Recording__269.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021877833668969168684
  • Upwork Job ID: 1877833668969168684
  • Last Price Increase: 2025-01-10
Issue OwnerCurrent Issue Owner: @eh2077
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 10, 2025
Copy link

melvin-bot bot commented Jan 10, 2025

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

@Krishna2323
Copy link
Contributor

Krishna2323 commented Jan 10, 2025

Edited by proposal-police: This proposal was edited at 2025-01-10 17:25:34 UTC.

Proposal

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

Distance - The route is cut off in the receipt in the split

What is the root cause of that problem?

  • Aspect ratio and height auto is applied to the image which causes the image to be top aligned.
    style={[style, shouldSetAspectRatioInStyle && aspectRatio ? {aspectRatio, height: 'auto'} : {}, shouldOpacityBeZero && {opacity: 0}]}

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

  1. Add style={{height: '100%'}} to the receipt container.
    disabled={!shouldDisplayReceipt || isThumbnail}
    accessibilityRole={CONST.ROLE.BUTTON}
    accessibilityLabel={translate('accessibilityHints.viewAttachment')}
    disabledStyle={styles.cursorDefault}
    >
  2. Wrap MoneyRequestConfirmationList with ImageBehaviorContextProvider.
    {!!participants.length && (
    <MoneyRequestConfirmationList
    payeePersonalDetails={payeePersonalDetails}
    selectedParticipants={participantsExcludingPayee}
    iouAmount={splitAmount ?? 0}
    iouCurrencyCode={splitCurrency}
    iouComment={splitComment}
    iouCreated={splitCreated}
    shouldDisplayReceipt
    iouMerchant={splitMerchant}
    iouCategory={splitCategory}
    iouIsBillable={splitBillable}
    iouType={CONST.IOU.TYPE.SPLIT}
    isReadOnly={!isEditingSplitBill}
    shouldShowSmartScanFields
    receiptPath={transaction?.receipt?.source}
    receiptFilename={transaction?.filename}
    isEditingSplitBill={isEditingSplitBill}
    hasSmartScanFailed={hasSmartScanFailed}
    reportID={reportID}
    reportActionID={reportAction?.reportActionID}
    transaction={isEditingSplitBill && draftTransaction ? draftTransaction : transaction}
    onConfirm={onConfirm}
    isPolicyExpenseChat={ReportUtils.isPolicyExpenseChat(report)}
    policyID={ReportUtils.isPolicyExpenseChat(report) ? report?.policyID : undefined}
    action={isEditingSplitBill ? CONST.IOU.ACTION.EDIT : CONST.IOU.ACTION.CREATE}
    onToggleBillable={(billable) => {
    IOU.setDraftSplitTransaction(transaction?.transactionID ?? '-1', {billable});
    }}
    isConfirmed={isConfirmed}
    />
    )}
  3. Set the value for shouldSetAspectRatioInStyle prop to shouldSetAspectRatioInStyle={!TransactionUtils.isDistanceRequest(transaction)}.
                    <ImageBehaviorContextProvider shouldSetAspectRatioInStyle={!TransactionUtils.isDistanceRequest(transaction)}>
                        {!!participants.length && (
                            <MoneyRequestConfirmationList
                                payeePersonalDetails={payeePersonalDetails}
                                selectedParticipants={participantsExcludingPayee}
  1. Do the same in other similar components if the bug happens there.
  2. If we want then we can wrap the receipt directly in MoneyRequestConfirmationListFooter.tsx.

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


What alternative solutions did you explore? (Optional)

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label Jan 10, 2025
@melvin-bot melvin-bot bot changed the title Distance - The route is cut off in the receipt in the split [$250] Distance - The route is cut off in the receipt in the split Jan 10, 2025
Copy link

melvin-bot bot commented Jan 10, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 10, 2025
Copy link

melvin-bot bot commented Jan 10, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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
Projects
None yet
Development

No branches or pull requests

4 participants