Skip to content

[Due for payment 2025-06-12] [Due for payment 2025-06-11] [$250] Receipt Preview Does Not Span Full Width on Wider Mobile Devices #62533

Closed

Description

@m-natarajan

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:
Reproducible in staging?:
Reproducible in production?:
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: @shawnborton
Slack conversation (hyperlinked to channel name): #Expensify Bugs

Action Performed:

  1. Open a receipt preview on a wider mobile device (e.g. certain Android phones)
  2. Observe that the preview does not take up the full width of the screen.

Expected Result:

The receipt preview should span the full width of the viewport on wider mobile devices. Additionally, we should consider enforcing a 16:9 aspect ratio, similar to how we handle expense previews, to ensure visual consistency.

Actual Result:

The receipt preview appears narrower than the full width of the screen on wider mobile devices, reducing visual clarity

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021925616857476464526
  • Upwork Job ID: 1925616857476464526
  • Last Price Increase: 2025-05-22
Issue OwnerCurrent Issue Owner: @NicMendonca

Activity

  1. added
    Daily
    Bug
    on May 21, 2025
  2. melvin-bot commented on May 21, 2025

    @melvin-bot

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

  3. Krishna2323 commented on May 22, 2025

    @Krishna2323
    Contributor

    Proposal

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

    Receipt Preview Does Not Span Full Width on Wider Mobile Devices

    What is the root cause of that problem?

    • The maxWidth is set to 360 for receipts in money request view.

      App/src/styles/index.ts

      Lines 4869 to 4871 in 6871ba9

      expenseViewImage: {
      maxWidth: 360,
      },

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

    • We can increase the maxWidth.
    • If we increase the width, we would also need to increase the height. We can add the expenseViewImage so that it doesn't affect other receipt images.
    • If needed, we can use isSmallScreenWidth to increase the width conditionally. This way, we can keep the maxWidth at 360 on medium and large screen width devices.
    • According to this blog, the maximum width of a smartphone can be up to 428.

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

    N/A

    What alternative solutions did you explore? (Optional)

    • On small screen width devices, we can set the width to 100%.

    Result

  4. bernhardoj commented on May 22, 2025

    @bernhardoj
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-05-22 03:04:10 UTC.

    Proposal

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

    Receipt doesn't take the full width in small screen.

    What is the root cause of that problem?

    We apply a max width style to the receipt component (placeholder and receipt).

    <View style={[styles.moneyRequestViewImage, styles.expenseViewImage]}>
    <ReportActionItemImage

    isInMoneyRequestView && styles.expenseViewImage,

    App/src/styles/index.ts

    Lines 4869 to 4871 in 6871ba9

    expenseViewImage: {
    maxWidth: 360,
    },

    We don't apply the max width in the IOU confirmation flow page, so it can stretch like this because no aspect ratio is set and a fixed height is set (from #58898).

    Image

    const receiptThumbnailContent = useMemo(
    () => (
    <View style={styles.moneyRequestImage}>

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

    If we want it to take full width on small screen, then we can create a new style for the small screen and remove the maxWidth style and use aspectRatio: 16/9 instead.

    expenseViewImage: {
        maxWidth: 360,
        aspectRatio: 16/9,
        height: 'auto',
    },
    expenseViewImageSmall: {
        aspectRatio: 16/9,
        height: 'auto',
    },
    

    Then, we apply expenseViewImageSmall for small screen (isSmallScreenWidth).

    <View style={[styles.moneyRequestViewImage, styles.expenseViewImage]}>
    <ReportActionItemImage

    For MoneyRequestConfirmationListFooter, we can always use expenseViewImageSmall.

    <View style={styles.moneyRequestImage}>
    {isLocalFile && Str.isPDF(receiptFilename) ? (

    However, the height won't be resized automatically because we set a fixed height, that's why we set it to auto to unset it.

    height: 180,

    This way, both large and small screens will have a 16:9 ratio, with the large screen having a max width of 360. For the receipt empty state, we can add a new prop to use the style because we want to use it in MoneyRequestConfirmationListFooter (IOU confirm page) too, not only in MoneyRequestView.

    isInMoneyRequestView && styles.expenseViewImage,

    shouldUseAspectRatio && isSmallScreenWidth ? styles.expenseViewImageSmall : styles.expenseViewImage
    

    Then, pass shouldUseAspectRatio for both ReceiptEmptyState in MoneyRequestView and MoneyRequestConfirmationListFooter.

    Since small screen breakpoint is 800, it can appears very large. If needed, we can still keep the max width for small screen, but increase the value.
    Image

    Or we can apply this to native platforms only.

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

    N/A

  5. DylanDylann commented on May 22, 2025

    @DylanDylann
    Contributor

    @NicMendonca Could you please assign me as C+ reviewer on this issue? Because this is a follow-up from my previous PR

    cc @shawnborton

  6. added
    External
    on May 22, 2025
  7. changed the title [-]Receipt Preview Does Not Span Full Width on Wider Mobile Devices[/-] [+][$250] Receipt Preview Does Not Span Full Width on Wider Mobile Devices[/+] on May 22, 2025
  8. melvin-bot commented on May 22, 2025

    @melvin-bot
  9. added
    Help Wanted
    on May 22, 2025
  10. melvin-bot commented on May 22, 2025

    @melvin-bot

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

  11. 29 remaining items

  12. changed the title [-][Due for payment 2025-06-11] [$250] Receipt Preview Does Not Span Full Width on Wider Mobile Devices[/-] [+][Due for payment 2025-06-12] [Due for payment 2025-06-11] [$250] Receipt Preview Does Not Span Full Width on Wider Mobile Devices[/+] on Jun 5, 2025
  13. melvin-bot commented on Jun 5, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.59-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 2025-06-12. 🎊

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

    • @bernhardoj requires payment through NewDot Manual Requests
    • @DylanDylann requires payment through NewDot Manual Requests
  14. melvin-bot commented on Jun 5, 2025

    @melvin-bot

    @DylanDylann @NicMendonca @DylanDylann 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]

  15. NicMendonca commented on Jun 10, 2025

    @NicMendonca
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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:

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    Do we agree 👍 or 👎

  16. DylanDylann commented on Jun 11, 2025

    @DylanDylann
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: No. this seems like a new design update

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Test:

    1. Press FAB > Create request (Manual) and proceed to the confirm step
    2. Verify the receipt preview takes full width
    3. Create the request and open the transaction thread
    4. On small screen, verify the receipt preview takes full width
    5. Create another manual request, but this time, add a receipt at the confirm page
    6. Verify the receipt preview takes full width
    7. Open the transaction thread
    8. On small screen, verify the receipt preview takes full width

    Do we agree 👍 or 👎

  17. added
    Daily
    and removed
    Weekly
    on Jun 11, 2025
  18. NicMendonca commented on Jun 11, 2025

    @NicMendonca
    Contributor

    Payment Summary

    Contributor: @bernhardoj - $250 paid via NewDot
    Contributor+" @DylanDylann - $250 paid via NewDot

  19. bernhardoj commented on Jun 12, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  20. JmillsExpensify commented on Jun 12, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

  21. JmillsExpensify commented on Aug 12, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @DylanDylann

  22. quinthar commented on Aug 13, 2025

    @quinthar
    Contributor

    $250 approved for @DylanDylann

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions