Skip to content

Conversation

@adamgrzybowski
Copy link
Contributor

@adamgrzybowski adamgrzybowski commented Jul 31, 2025

Explanation of Change

Implementation of the wide RHP functionality to always show the receipt image on the wide layout.

Fixed Issues

$ #64025
PROPOSAL:

Tests

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

  • Verify that no errors appear in the JS console

Verify if the receipt is displayed correctly on the wide screen
(You should do these steps for 5 different types of receipt image: empty, PDF, photo, distance, e-receipt)

  1. Open expenses
  2. Open an expense (one of the types mentioned above)
  3. Verify if the receipt image displays correctly.

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
ios.mp4
iOS: mWeb Safari
iosWeb.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4

@github-actions
Copy link
Contributor

🚧 @shawnborton has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@shawnborton
Copy link
Contributor

Some quick notes:

  • I left you some design comments in the issue, would love to see it implemented
  • The RHP opening still feels super fast and unnatural compared to normal RHPs opening
  • We need to make sure the top bar for the expense works as if it was in desktop mode width - meaning, the "More" button should be skinnier and over to the right side. Basically as if you opened up an Expense directly from Inbox: CleanShot 2025-07-31 at 17 03 11@2x

@shawnborton
Copy link
Contributor

The very past part of the RHP animation - it kind of quickly moves to it's final resting point and doesn't arrive there smoothly, almost like a sudden shift at the end:

CleanShot.2025-07-31.at.17.06.02.mp4

@adamgrzybowski adamgrzybowski force-pushed the @adamgrzybowski/better-rhp-view branch from 8605dbb to fa291aa Compare August 6, 2025 16:12
@github-actions
Copy link
Contributor

🚧 @shawnborton has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions
Copy link
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
Built from App PR #67533.

Android 🤖 iOS 🍎
https://ad-hoc-expensify-cash.s3.amazonaws.com/android/67533/index.html https://ad-hoc-expensify-cash.s3.amazonaws.com/ios/67533/index.html
Android iOS
Desktop 💻 Web 🕸️
https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/67533/NewExpensify.dmg https://67533.pr-testing.expensify.com
Desktop Web

👀 View the workflow run that generated this build 👀

@shawnborton
Copy link
Contributor

It still feels very very choppy when you open up the RHP:

CleanShot.2025-08-10.at.17.50.16.mp4

@shawnborton
Copy link
Contributor

Can we make sure the bottom of the receipt area has a padding of 20px too? This way it matches the left and right padding:
CleanShot 2025-08-10 at 17 50 52@2x

@shawnborton
Copy link
Contributor

I mentioned this in the other issue but I think the right pane should start off with everything aligned to the top, not the bottom:
CleanShot 2025-08-10 at 17 52 06@2x

@shawnborton
Copy link
Contributor

There's extra space below the header... we have a dead div that is eating up some dead vertical space:
CleanShot 2025-08-10 at 17 52 46@2x

The header height should just be 72px to match other places, unless there is some kind of next steps banner there.

@shawnborton
Copy link
Contributor

For eReceipts, the container is not as tall as it should be:
CleanShot 2025-08-10 at 17 53 30@2x

@shawnborton
Copy link
Contributor

Here is a case where the More button is not using the correct format (top right):
CleanShot 2025-08-10 at 17 54 02@2x

@shawnborton
Copy link
Contributor

Also, in that same example, the eReceipt doesn't show here:
CleanShot 2025-08-10 at 17 54 51@2x

But I see it on staging:
CleanShot 2025-08-10 at 17 55 07@2x

@adamgrzybowski adamgrzybowski force-pushed the @adamgrzybowski/better-rhp-view branch 2 times, most recently from 7939cac to 5a477ca Compare August 14, 2025 11:35
@adamgrzybowski
Copy link
Contributor Author

adamgrzybowski commented Aug 14, 2025

Here is a case where the More button is not using the correct format (top right):

@shawnborton, can you share this report with me somehow? I can't find such case using my account

@shawnborton
Copy link
Contributor

Sure, should we run another test build too and then I can check my reports again?

@adamgrzybowski
Copy link
Contributor Author

Sure, should we run another test build too and then I can check my reports again?

Yeah, I think that would be the best option.

@adamgrzybowski
Copy link
Contributor Author

You can also look if there is anything else worth fixing

@adamgrzybowski adamgrzybowski force-pushed the @adamgrzybowski/better-rhp-view branch from c6adadc to 9b8ee8f Compare August 14, 2025 13:23
@github-actions
Copy link
Contributor

🚧 @shawnborton has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions
Copy link
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
Built from App PR #67533.

Android 🤖 iOS 🍎
https://ad-hoc-expensify-cash.s3.amazonaws.com/android/67533/index.html ❌ FAILED ❌
Android The QR code can't be generated, because the iOS build failed
Desktop 💻 Web 🕸️
https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/67533/NewExpensify.dmg https://67533.pr-testing.expensify.com
Desktop Web

👀 View the workflow run that generated this build 👀

@shawnborton
Copy link
Contributor

shawnborton commented Aug 14, 2025

Big receipt not working here:
CleanShot 2025-08-14 at 11 05 16@2x

It's actually a PDF receipt, in case that helps you diagnose:
CleanShot 2025-08-14 at 11 05 53@2x

What's odd is that it is not showing on the expenses list either... but if you click on the empty rectangle from the expense view, it launches the attachment viewer:
CleanShot 2025-08-14 at 11 06 47@2x

@shawnborton
Copy link
Contributor

FWIW ^ that seems to happen to me for all PDF receipts. Here is what staging looks like:
CleanShot 2025-08-14 at 11 07 36@2x

@shawnborton
Copy link
Contributor

Hmm when a single expense report opens, it looks like I don't get the wide view...
CleanShot 2025-08-14 at 11 07 59@2x

@shawnborton
Copy link
Contributor

The initial loading skeleton isn't as wide as the final RHP, so that's slightly jarring... not sure if we can do anything about that?

CleanShot.2025-08-14.at.11.12.00.mp4

@shawnborton
Copy link
Contributor

Any updates on this one? I would love to speed this one up if possible, thanks!

@adamgrzybowski
Copy link
Contributor Author

@shawnborton We had a holiday on Friday in Poland. It was mentioned on Slack, but I forgot to mention it here

I am currently working on the responsive pane for the 800px to 840px range. It should be ready soon.

And about the PDFs. That's weird. It seems to work fine on my end. Is there anything else that could be different in our cases? Also, could you please try the same on the new account with a new PDF report?

The initial loading skeleton isn't as wide as the final RHP, so that's slightly jarring... not sure if we can do anything about that?

I think I could try to implement an optimistic solution that will work if the user navigates from this specific page (expenses) and probably the other one (search/r)

@melvin-bot melvin-bot bot removed the request for review from a team August 28, 2025 13:48
@melvin-bot
Copy link

melvin-bot bot commented Aug 28, 2025

@getusha Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@mountiny
Copy link
Contributor

Started a new build @getusha are you up for this PR review and testing?

@github-actions
Copy link
Contributor

🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here.

@mountiny
Copy link
Contributor

@adamgrzybowski can you please thing of more specific test cases - for different expense types, card, eReceipt, with or without receipt, distance etc

@mountiny mountiny requested review from eh2077 and removed request for getusha August 28, 2025 15:54
@github-actions
Copy link
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
Built from App PR #67533.

Android 🤖 iOS 🍎
https://ad-hoc-expensify-cash.s3.amazonaws.com/android/67533/index.html https://ad-hoc-expensify-cash.s3.amazonaws.com/ios/67533/index.html
Android iOS
Desktop 💻 Web 🕸️
https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/67533/NewExpensify.dmg https://67533.pr-testing.expensify.com
Desktop Web

👀 View the workflow run that generated this build 👀

@JmillsExpensify
Copy link
Contributor

This isn't necessarily strictly related to this PR, though @Expensify/design it's a bit weird that we have the background at the top on the right, and then for the left, that ends up creating a bunch of empty space below the receipt.
CleanShot 2025-08-29 at 00 39 16@2x

@dubielzyk-expensify
Copy link
Contributor

I don't think the background in the top right is a problem personally. The empty space on the left looks a bit weird, but I'm not sure if we wanna stretch it and then crop out some parts of the receipt. Curious to hear what @shawnborton envisioned.

@dannymcclain
Copy link
Contributor

dannymcclain commented Aug 29, 2025

Same - I feel like maybe he had a solution in mind for that situation, though I can't remember exactly how he was handling it.

Edit: Actually, looking at this prototype he posted in Slack, it looks like he has it growing/stretching with cropping up to a certain height, and then it looks fairly similar to what Jason is showing in his screenshot.

@shawnborton
Copy link
Contributor

it's a bit weird that we have the background at the top on the right, and then for the left, that ends up creating a bunch of empty space below the receipt.

Totally agree, I think ideally we would just anchor both views to the top, and given that we would always start off at the top, I think we could probably just kill the background illustration and get something that looks like this:
image

@WojtekBoman WojtekBoman requested a review from a team as a code owner September 1, 2025 14:00
@mountiny
Copy link
Contributor

mountiny commented Sep 1, 2025

I just merged this PR that should ensure the expense details are anchored to the top #68932 btw

@dubielzyk-expensify
Copy link
Contributor

I think we could probably just kill the background illustration and get something that looks like this:

Would we do that for regular chat too or just expenses?

@shawnborton
Copy link
Contributor

I think we'd only need to do it for chats that we purposely top-anchor, which would be expenses and reports.

@dannymcclain
Copy link
Contributor

Totally agree, I think ideally we would just anchor both views to the top, and given that we would always start off at the top, I think we could probably just kill the background illustration and get something that looks like this:

@shawnborton would you mind posting a mock of how you envision that layout on a super tall screen? (Like one Jason would use 😂) Just trying to get a sense of the ideal alignment in that not-so-ideal case, mostly in the bottom right corner.

@shawnborton
Copy link
Contributor

I think we'd get something like this:

  • everything is top-anchored to start
  • the receipt gets a max-height so we don't have a super silly tall empty state
CleanShot 2025-09-02 at 10 48 27@2x

@dannymcclain
Copy link
Contributor

Ok cool! That's what I was expecting—but I wanted to make sure we were on the same page. Thanks!

@JmillsExpensify
Copy link
Contributor

Nice, great improvement!

@mountiny
Copy link
Contributor

@adamgrzybowski I believe we can clean this one up now as the last PR, right?

@adamgrzybowski
Copy link
Contributor Author

@mountiny, this is the last one, with v4 #69875

The one we are currently discussing is the old one that was later split into 4 smaller PRs. I will close it

@mountiny
Copy link
Contributor

Yeah no problem, I was not sure if you wanted to repurpose this one after merging main

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants