Skip to content

Expense - Receipt modal is long in landscape mode #87320

Closed

Description

@jponikarchuk

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: 9.3.54-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #85229
Email or phone of affected tester (no customers): jsdjosidjiojisojio3@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Samsung Galaxy S25 FE / Android 16
App Component: Money Requests

Action Performed:

  1. Launch Expensify app in landscape mode.
  2. Go to workspace chat.
  3. Create an expense without receipt.
  4. Open the report.

Expected Result:

Receipt thumbnail should have the same dimension in landscape and portrait mode.

Actual Result:

Receipt thumbnail on review duplicates confirm page is long in landscape mode.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Video.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @jakubstec

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 8, 2026
  2. melvin-bot commented on Apr 8, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #85229

  3. melvin-bot commented on Apr 8, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. github-actions commented on Apr 8, 2026

    @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.
  5. OSBotify commented on Apr 8, 2026

    @OSBotify
    Contributor

    Investigation Summary: Frontend bug. Causing PR: 85229 (Unlock landscape mode) by @GCyganek - High confidence. Recommendation: REVERT. PR 85229 unlocked landscape mode on iOS/Android phones. The receipt thumbnail computes its height based on windowWidth via getCompactReceiptDimensions in src/components/MoneyRequestConfirmationListFooter.tsx. In landscape mode windowWidth is the long dimension causing the thumbnail height to grow disproportionately. Before 85229 phones were portrait-locked. Reverting 85229 is recommended as it is a new feature not yet in production and caused multiple regressions. Labels: DeployBlockerCash kept. Assigned: @GCyganek @rushatgabhane @truph01 @mjasikowski

  6. MelvinBot commented on Apr 8, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The receipt thumbnail in MoneyRequestReceiptView uses the expenseViewImageSmall style (src/styles/index.ts:4616-4620) which sets maxWidth: 440 and aspectRatio: 16/9. In portrait mode on a phone (~395dp width), the container is constrained by available space to ~355dp wide. But in landscape (~930dp width), the container expands to its full 440dp maxWidth, making the image taller due to the fixed aspect ratio. Since the screen height is much shorter in landscape, the receipt dominates the view and appears "long/stretched."

    The style selection at MoneyRequestReceiptView.tsx:400-408 has no landscape-specific handling — on native, shouldUseNarrowLayout is always true (since isSmallScreenWidth is hardcoded true), so expenseViewImageSmall is always used regardless of orientation.

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

    In MoneyRequestReceiptView.tsx, when selecting the receipt style for narrow layout, constrain maxWidth to the screen's shorter dimension (minus margins) so the receipt never grows wider in landscape than it would be in portrait. Use Math.min(windowWidth, windowHeight) from the existing window dimensions to compute this constraint, and merge it with the existing expenseViewImageSmall style.

    What alternative solutions did you explore? (Optional)

    1. Modifying expenseViewImageSmall globally — rejected because the style is shared and a static style can't access window dimensions.
    2. Adding a fixed maxHeight — this would work but breaks the clean aspect-ratio-driven sizing and could cause issues on smaller devices.
    3. Using isInLandscapeMode to pick a different style — possible but less robust than simply constraining to the shorter dimension, which works regardless of orientation.

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  7. 6 remaining items

  8. melvin-bot commented on Apr 14, 2026

    @melvin-bot

    @jakubstec Huh... This is 4 days overdue. Who can take care of this?

  9. melvin-bot commented on Apr 16, 2026

    @melvin-bot

    @jakubstec Still overdue 6 days?! Let's take care of this!

  10. jakubstec commented on Apr 16, 2026

    @jakubstec
    Member

    Working on it. @mrejdak is helping me

  11. melvin-bot commented on May 13, 2026

    @melvin-bot

    This issue has not been updated in over 15 days. @mjasikowski, @GCyganek, @jakubstec, @truph01 eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  12. GCyganek commented on May 14, 2026

    @GCyganek
    Contributor

    PR was deployed to prod

  13. GCyganek commented on May 25, 2026

    @GCyganek
    Contributor

    can be closed

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.EngineeringMonthlyKSv2ReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions