Skip to content

[$250] Distance - The route image is cropped in the IOU preview #40791

Closed

Description

@lanitochka17

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-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4502640
Issue reported by: Applause - Internal Team

Action Performed:

Prerequisites:
Create WS collect, invite an employee

  1. Open https://staging.new.expensify.com/
  2. Log in to the employee account
  3. Navigate to a workspace room
  4. Create a Distance IOU with any 2 waypoints
  5. Navigate to Report Conversation

Expected Result:

The route image must fit completely in the IOU preview

Actual Result:

The route image is cropped in the IOU preview

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

Bug6458075_1713824565000.Recording__75.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0160841ad69bf530a2
  • Upwork Job ID: 1782777779723137024
  • Last Price Increase: 2024-04-23

Activity

  1. melvin-bot commented on Apr 23, 2024

    @melvin-bot

    Triggered auto assignment to @Gonals (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  2. github-actions commented on Apr 23, 2024

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  3. lanitochka17 commented on Apr 23, 2024

    @lanitochka17
    Author

    @Gonals FYI 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

  4. lanitochka17 commented on Apr 23, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #wave-collect - Release 1

  5. ra-md commented on Apr 23, 2024

    @ra-md
    Contributor

    Proposal

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

    The route image is cropped in the IOU preview

    What is the root cause of that problem?

    In this PR #35041, Object position top is added to resolve the issue of the receipt thumbnail not displaying its top portion. However, this causes the map distance request to appear cropped in the IOU preview.

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

    First, we need to update ReceiptImage to accept a new additional prop objectPosition. We will use this to change the objectPosition of ThumbnailImage.

    Then, in DistanceEReceipt, we can use the prop we just added and set it to CONST.IMAGE_OBJECT_POSITION.INITIAL.

    Next, in the ReceiptUtils.getThumbnailAndImageURIs function, we need to update this line to return transaction. We will use this to check if the transaction is a distanceRequest in ReportActionItemImage.

    return {thumbnail: `${path}.1024.jpg`, image: path, filename, transaction};

    Finally, in here, we will set the objectPosition to CONST.IMAGE_OBJECT_POSITION.INITIAL if the request is a distance request.

    const isDistanceRequest = transaction && TransactionUtils.isDistanceRequest(transaction);
    
    propsObj = {
       shouldUseThumbnailImage: true,
       source: thumbnailSource,
       fallbackIcon: Expensicons.Receipt,
       fallbackIconSize: isSingleImage ? variables.iconSizeSuperLarge : variables.iconSizeExtraLarge,
       isAuthTokenRequired: true,
       objectPosition: isDistanceRequest ? CONST.IMAGE_OBJECT_POSITION.INITIAL : CONST.IMAGE_OBJECT_POSITION.TOP
    };

    What alternative solutions did you explore? (Optional)

    N/A

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Apr 23, 2024
  7. melvin-bot commented on Apr 23, 2024

    @melvin-bot
  8. changed the title [-]Distance - The route image is cropped in the IOU preview[/-] [+][$250] Distance - The route image is cropped in the IOU preview[/+] on Apr 23, 2024
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Apr 23, 2024
  10. melvin-bot commented on Apr 23, 2024

    @melvin-bot

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

  11. 3 remaining items

  12. Gonals commented on Apr 23, 2024

    @Gonals
    Contributor

    @Pujan92, what do you think of @ra-md's proposal?

  13. Pujan92 commented on Apr 23, 2024

    @Pujan92
    Contributor

    @ra-md Object position top is added to fix issue #34120.

    @Gonals This seems to be a regression from #35041

    cc: @dukenv0307

  14. ra-md commented on Apr 23, 2024

    @ra-md
    Contributor

    @Pujan92 Oh, I see. 😅

  15. Gonals commented on Apr 23, 2024

    @Gonals
    Contributor

    I think this may not be a blocker, since it just kinda moves an existing bug a few pixels 😆. What do you think, @mountiny?

  16. Beamanator commented on Apr 23, 2024

    @Beamanator
    Contributor

    Aah this could be related to my Web-PDFs change where I centered receipts to the top - https://github.com/Expensify/Web-PDFs/pull/572

    I also don't think this is a blocker

  17. neil-marcellini commented on Apr 23, 2024

    @neil-marcellini
    Contributor

    The root cause is on the backend and already on prod so yeah, not a blocker. It would be great to fix soon though. It looks bad for distance requests.

  18. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Apr 23, 2024
  19. ra-md commented on Apr 23, 2024

    @ra-md
    Contributor
  20. Beamanator commented on Apr 24, 2024

    @Beamanator
    Contributor

    I believe this should be handled by @dukenv0307 in #34120 since this is a regression of a PR from that issue

  21. dukenv0307 commented on Apr 24, 2024

    @dukenv0307
    Contributor

    @Beamanator I will add the fix in this PR #40763.

  22. garrettmknight commented on Apr 24, 2024

    @garrettmknight
    Contributor

    Cool, closing this one in favor of the other then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions