-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix/pdf not showing for money request #40385
Fix/pdf not showing for money request #40385
Conversation
edde210
to
1ca5520
Compare
@cristipaval 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] |
@thienlnam Can you please help review this one from #38709 |
@@ -894,7 +894,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ | |||
isLocalFile && Str.isPDF(receiptFilename) ? ( | |||
<PDFThumbnail | |||
// eslint-disable-next-line @typescript-eslint/non-nullable-type-assertion-style | |||
previewSourceURL={resolvedThumbnail as string} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this fix this? I would imagine that the thumbnail should be the source for <PDFThumbnail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was like this before, thats exactly what made me believe thumbnail goes here lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we see why this is failing? or what is even in resolvedThumbnail?
Perhaps we just change it to this
resolvedThumbnail || resolvedReceiptImage || ''
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep i'll give this fair look again tomorrow, currently got afk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we just change it to this
resolvedThumbnail || resolvedReceiptImage || ''
No need IMO, local files don't have thumbnail:
Lines 47 to 49 in 3cf796c
if ((isReceiptImage || isReceiptPDF) && typeof path === 'string' && (path.startsWith('blob:') || path.startsWith('file:'))) { | |
return {image: path, isLocalFile: true, filename}; | |
} |
This is fixing #40476 |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
Chatted with @thienlnam , will proceed with this fix for now |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…ey-request Fix/pdf not showing for money request (cherry picked from commit 1db9087)
…ey-request Fix/pdf not showing for money request (cherry picked from commit 1db9087)
…g-40385-1 🍒 Cherry pick PR #40385 to staging 🍒
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 1.4.63-4 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀
|
Details
Fixed Issues
$ https://expensify.slack.com/archives/C01GTK53T8Q/p1713382047884229
$ #40476
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-04-17.at.2.17.36.AM.mov
MacOS: Desktop